This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Android Embedding PR27: Fix SurfaceView flicker in Fragment transactions #8504
Merged
matthew-carroll
merged 2 commits into
flutter:master
from
matthew-carroll:android_embedding_refactor_pr27_fix_surfaceview_flicker
Apr 9, 2019
Merged
Android Embedding PR27: Fix SurfaceView flicker in Fragment transactions #8504
matthew-carroll
merged 2 commits into
flutter:master
from
matthew-carroll:android_embedding_refactor_pr27_fix_surfaceview_flicker
Apr 9, 2019
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
shell/platform/android/io/flutter/embedding/android/FlutterView.java
Outdated
Show resolved
Hide resolved
shell/platform/android/io/flutter/embedding/android/FlutterView.java
Outdated
Show resolved
Hide resolved
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 9, 2019
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 9, 2019
This was referenced Apr 9, 2019
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 10, 2019
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 10, 2019
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 10, 2019
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Apr 10, 2019
engine-flutter-autoroll
added a commit
to flutter/flutter
that referenced
this pull request
Apr 10, 2019
flutter/engine@eec74e5...905c571 git log eec74e5..905c571 --no-merges --oneline 905c571 Add windows host_debug_unopt build (flutter/engine#8515) 39e1d00 Remove redundant specification of the |flutter| namespace in the engine. (flutter/engine#8523) 56052c7 Rename the shell namespace to flutter. (flutter/engine#8520) ca1d163 Support message loops whose tasks are executed concurrently. (flutter/engine#8419) 8ae84ec Roll src/third_party/skia de8362c6f212..10bf7020aa15 (5 commits) (flutter/engine#8522) 2dbd981 Roll src/third_party/dart 06ed3f598c..1490a90bc1 (8 commits) 5279132 Android Embedding PR27: Fix SurfaceView flicker in Fragment transactions (flutter/engine#8504) 86ab45c Remove the unused EnableBlink flag. (flutter/engine#8518) d5880a6 Roll src/third_party/skia b5d8c634f95b..de8362c6f212 (14 commits) (flutter/engine#8519) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff (jsimmons@google.com), and stop the roller if necessary.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Android Embedding PR27: Fix SurfaceView flicker in Fragment transactions.
@jason-simmons discovered that enabling transparency and setting a
SurfaceView
as being on top of everything else resulted in a transparent background that eliminates the black flicker. This solution comes with the cost that suchFragment
s must always render with transparency.The use of transparency can be controlled.
FlutterActivity
uses aFlutterFragment
with transparency turned off. However,FlutterFragment
defaults to transparent because most uses of aFragment
involveFragment
replacements over time, which results in the black flicker. Therefore, by making transparency the default, developers get what they expect when they use aFlutterFragment
, rather than us having to educate allFlutterFragment
users to enable a flag to avoid a black flicker.I'm still considering this bug as an issue until we hear back from the Android team about what exactly can, and cannot be done to resolve this. I'm still hoping that there is some way to avoid the black flicker without exposing any new APIs or requiring more developer intervention.