Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Android Embedding PR27: Fix SurfaceView flicker in Fragment transactions #8504

Conversation

matthew-carroll
Copy link
Contributor

@matthew-carroll matthew-carroll commented Apr 9, 2019

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 such Fragments must always render with transparency.

The use of transparency can be controlled. FlutterActivity uses a FlutterFragment with transparency turned off. However, FlutterFragment defaults to transparent because most uses of a Fragment involve Fragment replacements over time, which results in the black flicker. Therefore, by making transparency the default, developers get what they expect when they use a FlutterFragment, rather than us having to educate all FlutterFragment 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.

Copy link
Member

@jason-simmons jason-simmons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matthew-carroll matthew-carroll merged commit 5279132 into flutter:master Apr 9, 2019
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
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.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants