-
Notifications
You must be signed in to change notification settings - Fork 69
Use renderer type for engine #393
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
Conversation
|
I think |
This is a problem that is implemented incorrectly in the engine. I will fix it soon |
aea21cd to
1585e61
Compare
| /// <summary> | ||
| /// The renderer type of Flutter engine. | ||
| /// </summary> | ||
| protected FlutterDesktopRendererType RendererType { get; set; } = FlutterDesktopRendererType.kEGL; |
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.
What if the selected type is not supported by the current profile? (i.e. wearable)
How do we automatically select the kEvasGL type for wearable apps?
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.
I added profile check macro for this.
d3e6882 to
6b9e2b7
Compare
|
Could you please validate a service app? a service app goes into the crash with this PR and flutter-tizen/engine#312 |
embedding/cpp/include/flutter_app.h
Outdated
| // | ||
| // Defaults to kEGL. If the profile is wearable, defaults to kEvasGL. | ||
| #ifdef WEARABLE_PROFILE | ||
| FlutterDesktopRendererType renderer_type_ = |
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.
The type FlutterDesktopRendererType is not expected to be exposed through the public interface of the embedding. I'll talk to you offline in detail.
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.
In the case of the app, if you want the renderer type to be fixed to the profile, we can remove this member.
(wearable app = EvasGL, others = EGL)
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.
I added FlutterRendererType to C# and Cpp.
(I have a question. FlutterDesktopPluginRegistrar and FlutterDesktopEngineRef are already exposed. Should these be fixed later as well? )
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.
Should these be fixed later as well?
Well, I think the cases you mentioned are implemented in that way on purpose (to directly access underlying native pointers) and thus won't need a fix. However, let me take a look again.
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.
IPluginRegistry is a C# version of C++'s PluginRegistry, and its GetRegistrarForPlugin method is expected to return a raw FlutterDesktopPluginRegistrar handle.
That said, we can still provide a higher level API of FlutterDesktopPluginRegistrar in the C# side which provides the same functionality as C++'s PluginRegistrar class. However, even if it's implemented, there will be no use for it.
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.
Also I was thinking of introducing a new public interface for FlutterApp that can be used to configure all (currently experimental) window-related properties (such as window_offset_x_ and is_window_transparent_) and also the renderer type in this PR at once using a single struct. I don't have a concrete plan yet. You may think about it if interested (maybe later).
3b97a81 to
c849340
Compare
swift-kim
left a comment
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.
Only minor nitpicks.
Could you also change the file mode of FlutterEngine.cs to 644? (It's accidentally 755 right now.)
I tested on multi-app samples. now works fine |
c37af37 to
3bff10b
Compare
Set the renderer type before creating the engine. The window is selected as EcoreWl2 or ElmWin according to the renderer type. This commit requires engine side commits. (flutter-tizen/engine#312)
3bff10b to
78543fb
Compare
Set the renderer type before creating the engine.
The window is selected as EcoreWl2 or ElmWin
according to the renderer type.
This commit requires engine side commits.
(flutter-tizen/engine#312)