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

Android Embedding PR25: Prevent black rectangle when launching FlutterActivity#8460

Merged
matthew-carroll merged 2 commits intoflutter:masterfrom
matthew-carroll:android_embedding_refactor_pr25_activity_launch_black_rectangle
Apr 5, 2019
Merged

Android Embedding PR25: Prevent black rectangle when launching FlutterActivity#8460
matthew-carroll merged 2 commits intoflutter:masterfrom
matthew-carroll:android_embedding_refactor_pr25_activity_launch_black_rectangle

Conversation

@matthew-carroll
Copy link
Contributor

Android Embedding PR25: Prevent black rectangle when launching FlutterActivity.

This PR sets our SurfaceView to use PixelFormat.TRANSPARENT to avoid a brief black flicker when launching a FlutterActivity. This is a distinct problem from a black flicker that occurs when removing a FlutterFragment.

This change may have performance implications but I don't know what they are yet. I'm going to look into setting up benchmarks with the new embedding, but I think we want this change for @mjohnsullivan's code lab. We can adjust this implementation detail after the fact, if needed.

If any reviewers know anything concrete about the performance implications, please let me know.

Copy link
Contributor

@dnfield dnfield 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
Copy link
Contributor Author

@tvolkert @dnfield based on some code that I found in our existing FlutterActivityDelegate I was able to solve the opening black rectangle problem in a much better way. Now I'm using a content view to cover everything until Flutter is ready. No more transparent pixel format for the SurfaceView.

@dnfield
Copy link
Contributor

dnfield commented Apr 5, 2019

Nice. It may still make sense to expose this as a property a caller could set, but that should be a separate patch anyway.

@matthew-carroll matthew-carroll merged commit d3fbaea into flutter:master Apr 5, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 5, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 5, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2019
liyuqian added a commit to liyuqian/flutter that referenced this pull request Apr 6, 2019
flutter/engine@6bc33b5...fea42a2

git log 6bc33b5..fea42a2 --no-merges --oneline
fea42a2 Roll src/third_party/dart 9e1adc54a7..389ccc9000 (10 commits)
d6cf2bd Roll src/third_party/dart da4ccd0855..9e1adc54a7 (3 commits)
0c2a2c1 Initialize OpacityLayer&flutter#39;s matrix to identity (flutter/engine#8467)
7fd4caf Roll src/third_party/dart 1ad11facec..da4ccd0855 (6 commits)
d3fbaea Android Embedding PR25: Prevent black rectangle when launching FlutterActivity (flutter/engine#8460)
99da038 Document the leak_vm flag. (flutter/engine#8462)
ce7c21c Log the correct function on error in the embedder. (flutter/engine#8461)
e10d464 Improve path metrics tests and docs (flutter/engine#7851)
424045c Enable shutting down all root isolates in a VM. (flutter/engine#8457)
816e3dc Roll src/third_party/dart 907c514c89..1ad11facec (7 commits)
45dc353 Roll src/third_party/skia 0e35ce27e0e9..053b2939938c (10 commits) (flutter/engine#8458)

This roll also includes manual fix for @mustCallSuper update: call the
super method whenever possible, and suppress warnings in tests.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 6, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Apr 6, 2019
flutter/engine@6bc33b5...0c393d6

git log 6bc33b5..0c393d6 --no-merges --oneline
0c393d6 Roll dart back to 907c514c8937cf76e (flutter/engine#8473)
fea42a2 Roll src/third_party/dart 9e1adc54a7..389ccc9000 (10 commits)
d6cf2bd Roll src/third_party/dart da4ccd0855..9e1adc54a7 (3 commits)
0c2a2c1 Initialize OpacityLayer's matrix to identity (flutter/engine#8467)
7fd4caf Roll src/third_party/dart 1ad11facec..da4ccd0855 (6 commits)
d3fbaea Android Embedding PR25: Prevent black rectangle when launching FlutterActivity (flutter/engine#8460)
99da038 Document the leak_vm flag. (flutter/engine#8462)
ce7c21c Log the correct function on error in the embedder. (flutter/engine#8461)
e10d464 Improve path metrics tests and docs (flutter/engine#7851)
424045c Enable shutting down all root isolates in a VM. (flutter/engine#8457)
816e3dc Roll src/third_party/dart 907c514c89..1ad11facec (7 commits)
45dc353 Roll src/third_party/skia 0e35ce27e0e9..053b2939938c (10 commits) (flutter/engine#8458)

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 ([email protected]), and stop
the roller if necessary.
RBogie pushed a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
RBogie added a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
RBogie added a commit to RBogie/flutter-engine that referenced this pull request Apr 8, 2019
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.

4 participants