-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add platform view support for linux #26288
Add platform view support for linux #26288
Conversation
@robert-ancell @iskakaushik This PR contains parts other than |
cc @gw280 as well. I know you are looking at the Mac side of things but it may be a good idea to go over this once to look for common patterns. |
when will it be merged? |
why does it blocked here |
@robert-ancell Please take a look at this pr. |
const gchar* view_type, | ||
FlValue* args, | ||
GAsyncReadyCallback cb) { | ||
FlValue* create_args = fl_value_new_map(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing g_autoptr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invoke_method
takes ownership of create_args
here. So we cannot free it after this method finished.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small fixes required, but otherwise looks great. Thanks @huanghongxun!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing status as a few small things to fix.
b1a8771
to
2962099
Compare
anything blocked? |
It seems that few people can review this and the dart side pull requests. And these people have no time. |
Maybe cc @cbracken and @gspencergoog ? |
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. |
@huanghongxun it's been a long while, but is this patch something you're willing to get rebased and tests fixed or would you like someone to pick this up and continue with it? Unfortunately we've been pretty short on people who could spend the appropriate amount of review time on this (and flutter/flutter#74814) but I've got time to take a look. |
5094123
to
d906b26
Compare
@cbracken rebased on main. |
Added some comments to flutter/flutter#74814 covering the framework side of this work. I think the embedder side is much less likely to be affected by the framework-side design work. I've pulled this patch down locally and am playing with it a bit to get a feel for it while I review. Thanks again for your patience on this. |
I'm going to close this for the time being, in order to get it off the review queue until we've worked out the right approach to consolidating the API in a way that works for all platforms. That's a problem being actively hacked out right now on macOS and Windows/Linux are on our agenda next. I do think that some of the consolidation work in the framework PR is something we want to followup on though. Once we're set with macOS, we will absolutely want to get back to landing platform views for Linux. |
@cbracken Sorry for pinging you, but I have been following the platform view implementations already for quite some time. |
I think this would have to be a new PR at this point as a lot of things have changed. There's also a lot of change occurring at the moment adding support for multi-view. However, getting platform views would be great too! |
@robert-ancell where can i get the progress of multi-window of linux; |
|
This pull request is part of #24169. For framework API, see flutter/flutter#74814.
This pull request adds platform view API to Linux shell, without support for touch events and clipping mutations, which are splitted and proposed later when this PR get landed.
Code changes:
FlPlatformView
to wrap a GtkWidget, owned byFlPlatformViewsPlugin
. This abstraction allows us to owning aFlMethodChannel
inFlPlatformView
for communication with dart codes.FlPlatformViewFactory
for creating platform views for specific view type. Flutter Framework will call functions ofFlPlatformViewFactory
when creating a new platform view.FlPlatformViewsPlugin
for implementingSystemChannels.platform_views
from Flutter services library.A working demo with webview: https://github.com/wechat-miniprogram/gtktest.
This pr does not support applying mutations on the platform views yet. I will open a PR later to implement that feature.
This pr is part of platform view implementation on Linux, related issue: flutter/flutter#41724.
Pre-launch Checklist
writing and running engine tests.
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.