-
Notifications
You must be signed in to change notification settings - Fork 6k
Android platform view static thread merging #19242
Android platform view static thread merging #19242
Conversation
…rams to calculate the final bounding rect for platform view (flutter#19170)" (flutter#19204)" This reverts commit 9cecc5f.
91de367 to
86967e6
Compare
| result.engineCachesPath, | ||
| initTimeMillis); | ||
| initTimeMillis, | ||
| use_embedded_view); |
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.
this also needs a change in FlutterJNI#nativeInit signature
|
|
||
| FlutterJNI.nativeInit( | ||
| applicationContext, | ||
| shellArgs.toArray(new String[0]), |
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.
nit: what about passing the flag in shellArgs?
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.
done
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
common/settings.h
Outdated
| /// to log a timeline event that tracks the latency of engine startup. | ||
| std::chrono::microseconds engine_start_timestamp = {}; | ||
|
|
||
| /// Does the application claim that it uses the android embedded view for platform views. |
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.
nit: is this missing a question mark?
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.
Updated to "Whether"
| // https://github.com/flutter/flutter/issues/59930 | ||
| flutter::TaskRunners task_runners(thread_label, // label | ||
| platform_runner, // platform | ||
| platform_runner, // raster |
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.
nit: formatting
blasten
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.
LGTM
|
Until flutter/flutter#55326 is fixed, tests will be added to the framework where we can run e2e tests. |
cyanglaz
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.
Updated with review comments
common/settings.h
Outdated
| /// to log a timeline event that tracks the latency of engine startup. | ||
| std::chrono::microseconds engine_start_timestamp = {}; | ||
|
|
||
| /// Does the application claim that it uses the android embedded view for platform views. |
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.
Updated to "Whether"
|
|
||
| FlutterJNI.nativeInit( | ||
| applicationContext, | ||
| shellArgs.toArray(new String[0]), |
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.
done
| if (use_embedded_view) { | ||
| shellArgs.add("--use-embedded-view"); | ||
| if (bundle != null) { | ||
| boolean use_embedded_view = bundle.getBoolean("io.flutter.embedded_views_preview"); |
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.
minor nit: io.flutter.embeddedViewsPreview
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.
offline discussion: We will keep the flag name same as iOS.
Description
Make the raster task runner always run on the platform thread when user enables 'io.flutter.embedded_views_preview` in Manifest.xml
Related Issues
flutter/flutter#60016
Tests
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.Breaking Change
Did any tests fail when you ran them? Please read handling breaking changes.