Skip to content
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

Enable transparent FlutterViews #6163

Merged
merged 1 commit into from
Sep 5, 2018
Merged

Enable transparent FlutterViews #6163

merged 1 commit into from
Sep 5, 2018

Conversation

mklim
Copy link
Contributor

@mklim mklim commented Sep 5, 2018

  • Changes rasterizer to clear the canvas with SkColor_TRANSPARENT
  • Removes the unused backgroundColor param from FlutterView.java

Partially addresses #9627

- Changes rasterizer to clear the canvas with `SkColor_TRANSPARENT`
- Removes the unused `backgroundColor` param from `FlutterView.java`
Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

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

Can you verify this on iOS as well? Thanks.

@mklim
Copy link
Contributor Author

mklim commented Sep 5, 2018

Yes, verified on iOS too.

@mklim mklim merged commit 0981731 into flutter:master Sep 5, 2018
@mklim mklim deleted the transparent-view branch September 5, 2018 17:44
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 5, 2018
flutter/engine@de4c7a5...0981731

git log de4c7a5..0981731 --no-merges --oneline
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (flutter#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 5, 2018
flutter/engine@de4c7a5...e6d9b34

git log de4c7a5..e6d9b34 --no-merges --oneline
e6d9b34 Remove the old location of the ICU data asset (flutter/engine#6170)
9f0ad8b Fixes negative end selection offset. (flutter/engine#6171)
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (flutter#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 5, 2018
flutter/engine@de4c7a5...a0f30b3

git log de4c7a5..a0f30b3 --no-merges --oneline
a0f30b3 Roll src/third_party/skia 9d1c88d9912d..343553a1fe9e (16 commits) (flutter/engine#6175)
e6d9b34 Remove the old location of the ICU data asset (flutter/engine#6170)
9f0ad8b Fixes negative end selection offset. (flutter/engine#6171)
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (flutter#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 6, 2018
flutter/engine@de4c7a5...f6ad3e0

git log de4c7a5..f6ad3e0 --no-merges --oneline
f6ad3e0 Roll Tonic (flutter/engine#6177)
a0f30b3 Roll src/third_party/skia 9d1c88d9912d..343553a1fe9e (16 commits) (flutter/engine#6175)
e6d9b34 Remove the old location of the ICU data asset (flutter/engine#6170)
9f0ad8b Fixes negative end selection offset. (flutter/engine#6171)
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (flutter#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 6, 2018
flutter/engine@de4c7a5...108e0a6

git log de4c7a5..108e0a6 --no-merges --oneline
108e0a6 Add transparency helpers to FlutterView.java (flutter/engine#6172)
f6ad3e0 Roll Tonic (flutter/engine#6177)
a0f30b3 Roll src/third_party/skia 9d1c88d9912d..343553a1fe9e (16 commits) (flutter/engine#6175)
e6d9b34 Remove the old location of the ICU data asset (flutter/engine#6170)
9f0ad8b Fixes negative end selection offset. (flutter/engine#6171)
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (flutter#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 6, 2018
flutter/engine@de4c7a5...572753f

git log de4c7a5..572753f --no-merges --oneline
572753f Roll src/third_party/skia 343553a1fe9e..ffbcc3fadfa1 (6 commits) (flutter/engine#6178)
108e0a6 Add transparency helpers to FlutterView.java (flutter/engine#6172)
f6ad3e0 Roll Tonic (flutter/engine#6177)
a0f30b3 Roll src/third_party/skia 9d1c88d9912d..343553a1fe9e (16 commits) (flutter/engine#6175)
e6d9b34 Remove the old location of the ICU data asset (flutter/engine#6170)
9f0ad8b Fixes negative end selection offset. (flutter/engine#6171)
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (flutter#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 6, 2018
flutter/engine@de4c7a5...ade0f22

git log de4c7a5..ade0f22 --no-merges --oneline
ade0f22 Remove unused file picture_serializer. (flutter/engine#6179)
572753f Roll src/third_party/skia 343553a1fe9e..ffbcc3fadfa1 (6 commits) (flutter/engine#6178)
108e0a6 Add transparency helpers to FlutterView.java (flutter/engine#6172)
f6ad3e0 Roll Tonic (flutter/engine#6177)
a0f30b3 Roll src/third_party/skia 9d1c88d9912d..343553a1fe9e (16 commits) (flutter/engine#6175)
e6d9b34 Remove the old location of the ICU data asset (flutter/engine#6170)
9f0ad8b Fixes negative end selection offset. (flutter/engine#6171)
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (flutter#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 6, 2018
flutter/engine@de4c7a5...1768bed

git log de4c7a5..1768bed --no-merges --oneline
1768bed Roll src/third_party/skia ffbcc3fadfa1..71f8475a0dba (3 commits) (flutter/engine#6181)
ade0f22 Remove unused file picture_serializer. (flutter/engine#6179)
572753f Roll src/third_party/skia 343553a1fe9e..ffbcc3fadfa1 (6 commits) (flutter/engine#6178)
108e0a6 Add transparency helpers to FlutterView.java (flutter/engine#6172)
f6ad3e0 Roll Tonic (flutter/engine#6177)
a0f30b3 Roll src/third_party/skia 9d1c88d9912d..343553a1fe9e (16 commits) (flutter/engine#6175)
e6d9b34 Remove the old location of the ICU data asset (flutter/engine#6170)
9f0ad8b Fixes negative end selection offset. (flutter/engine#6171)
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (flutter#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 6, 2018
flutter/engine@de4c7a5...897178c

git log de4c7a5..897178c --no-merges --oneline
897178c Roll src/third_party/skia 71f8475a0dba..33d3d31a7e28 (6 commits) (flutter/engine#6182)
1768bed Roll src/third_party/skia ffbcc3fadfa1..71f8475a0dba (3 commits) (flutter/engine#6181)
ade0f22 Remove unused file picture_serializer. (flutter/engine#6179)
572753f Roll src/third_party/skia 343553a1fe9e..ffbcc3fadfa1 (6 commits) (flutter/engine#6178)
108e0a6 Add transparency helpers to FlutterView.java (flutter/engine#6172)
f6ad3e0 Roll Tonic (flutter/engine#6177)
a0f30b3 Roll src/third_party/skia 9d1c88d9912d..343553a1fe9e (16 commits) (flutter/engine#6175)
e6d9b34 Remove the old location of the ICU data asset (flutter/engine#6170)
9f0ad8b Fixes negative end selection offset. (flutter/engine#6171)
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (flutter#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 6, 2018
flutter/engine@de4c7a5...5f61056

git log de4c7a5..5f61056 --no-merges --oneline
5f61056 Revert "Dart SDK roll for 2018/09/04 (flutter#6161)" (flutter/engine#6183)
897178c Roll src/third_party/skia 71f8475a0dba..33d3d31a7e28 (6 commits) (flutter/engine#6182)
1768bed Roll src/third_party/skia ffbcc3fadfa1..71f8475a0dba (3 commits) (flutter/engine#6181)
ade0f22 Remove unused file picture_serializer. (flutter/engine#6179)
572753f Roll src/third_party/skia 343553a1fe9e..ffbcc3fadfa1 (6 commits) (flutter/engine#6178)
108e0a6 Add transparency helpers to FlutterView.java (flutter/engine#6172)
f6ad3e0 Roll Tonic (flutter/engine#6177)
a0f30b3 Roll src/third_party/skia 9d1c88d9912d..343553a1fe9e (16 commits) (flutter/engine#6175)
e6d9b34 Remove the old location of the ICU data asset (flutter/engine#6170)
9f0ad8b Fixes negative end selection offset. (flutter/engine#6171)
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (flutter#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
liyuqian pushed a commit to flutter/flutter that referenced this pull request Sep 6, 2018
flutter/engine@de4c7a5...5f61056

git log de4c7a5..5f61056 --no-merges --oneline
5f61056 Revert "Dart SDK roll for 2018/09/04 (#6161)" (flutter/engine#6183)
897178c Roll src/third_party/skia 71f8475a0dba..33d3d31a7e28 (6 commits) (flutter/engine#6182)
1768bed Roll src/third_party/skia ffbcc3fadfa1..71f8475a0dba (3 commits) (flutter/engine#6181)
ade0f22 Remove unused file picture_serializer. (flutter/engine#6179)
572753f Roll src/third_party/skia 343553a1fe9e..ffbcc3fadfa1 (6 commits) (flutter/engine#6178)
108e0a6 Add transparency helpers to FlutterView.java (flutter/engine#6172)
f6ad3e0 Roll Tonic (flutter/engine#6177)
a0f30b3 Roll src/third_party/skia 9d1c88d9912d..343553a1fe9e (16 commits) (flutter/engine#6175)
e6d9b34 Remove the old location of the ICU data asset (flutter/engine#6170)
9f0ad8b Fixes negative end selection offset. (flutter/engine#6171)
0981731 Enable transparent FlutterViews (flutter/engine#6163)
3a7d0b5 Roll buildroot to 7aadfaf196f9cd8a299f9ad78fab63362800466d (flutter/engine#6169)
564d214 Roll src/third_party/skia d0f0cb8ffc5e..9d1c88d9912d (12 commits) (flutter/engine#6168)
6af60d7 Remove obsolete discovery mechanism from FlutterView (flutter/engine#6157)
b22badf Dart SDK roll for 2018/09/04 (flutter/engine#6161)
6d0fbc7 Roll src/third_party/skia 9478f7a38e6c..d0f0cb8ffc5e (1 commits) (flutter/engine#6167)
5063a8a Roll src/third_party/skia 72a02112a99f..9478f7a38e6c (1 commits) (flutter/engine#6166)
19a3bc8 Roll src/third_party/skia 85f4e40c5481..72a02112a99f (1 commits) (flutter/engine#6165)
9643a50 Roll src/third_party/skia fddc6fa394cb..85f4e40c5481 (1 commits) (flutter/engine#6164)
6ad3183 Fix windows build. (flutter/engine#6162)
30af2f2 Roll src/third_party/skia e486bbaae296..fddc6fa394cb (2 commits) (flutter/engine#6159)
b32ceaf Add some more logs for diagnosing screenshot failures (flutter/engine#6156)
c173655 Roll src/third_party/skia b84576af0a43..e486bbaae296 (9 commits) (flutter/engine#6155)
aaf98fb Use double multiplication by a scale instead of 3 divides for speed. (flutter/engine#6154)
593ed59 Revert "Use Skia normalize again after Skia precision fix. (#6121)" (flutter/engine#6122)
137389a Roll src/third_party/skia a45e1a71f548..b84576af0a43 (16 commits) (flutter/engine#6153)
f89a386 Roll src/third_party/skia cff3fd834ca8..a45e1a71f548 (1 commits) (flutter/engine#6152)
b0b8daa Unregister onFrameAvailable callbacks when a TextureEntry is released. (flutter/engine#6079)
2dc8271 Roll src/third_party/skia 24e58341fbcd..cff3fd834ca8 (1 commits) (flutter/engine#6151)
eea3a21 Roll src/third_party/skia bf67741140fd..24e58341fbcd (2 commits) (flutter/engine#6148)
bdcbe80 Roll src/third_party/skia 88119de2b849..bf67741140fd (1 commits) (flutter/engine#6147)

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, who should
be CC'd on the roll, and stop the roller if necessary.
@matthew-carroll
Copy link
Contributor

@mklim Maybe I already asked this, but why was the background color removed? You said it was unused but you removed code that reads the value from incoming attributes which means it may very well be used. Can you explain the thinking there? I have to make analogous changes within my refactor but I'm not sure we should have removed that.

@mklim
Copy link
Contributor Author

mklim commented Sep 19, 2018

@matthew-carroll

On it being unused: as far as I can tell the backgroundColor attribute was only ever read as a local variable in FlutterView.java's constructor. There was some logic there for falling back to a default if it was unset. (Formerly lines 131-138.) That local variable was then only ever used to pass into nativeSurfaceCreated, here. That call goes through the JNI layer to PlatformViewAndroid::SurfaceCreated. But backgroundColor wasn't actually being used anywhere in that method. So in the end none of the computations and calls up until that point mattered, and the attribute was ultimately unused.

I removed the code as a refactor while I was already going through these bits of code to work on the related AndroidView.java transparency. The combined defaulting-to-a-safe-color logic in AndroidView.java and the JNI call made it difficult to trace that backgroundColor wasn't really being used in the end and didn't affect anything. That's relevant for this bug since it could have theoretically been related: did AndroidView.java need to have a transparent backgroundColor in its layout file for transparency to work? Would having an explicitly opaque color as its attribute interfere with a transparent background set in the Flutter framework? In the end this had no effect at all, and removing this code meant removing that potential source of confusion.

@matthew-carroll
Copy link
Contributor

So here are the lines in question:

    int color = 0xFF000000;
    TypedValue typedValue = new TypedValue();
    context.getTheme().resolveAttribute(android.R.attr.colorBackground, typedValue, true);
    if (typedValue.type >= TypedValue.TYPE_FIRST_COLOR_INT && typedValue.type <= TypedValue.TYPE_LAST_COLOR_INT) {
          color = typedValue.data;
    }

Notice that color may be set to typedValue.data, which comes from android.R.attr.colorBackground.

There are 2 questions I still think need to be answered:

  1. Why isn't the above code considered a "use" of the background color? Am I misreading something?

  2. At this point in time, given the change you merged, how would one give the FlutterView a background color before Flutter starts rendering? Are we saying that the only way to do that is to make it transparent and then set the background behind it? That might work for a number of cases, but might also be impossible for some unusual cases where there are other Views behind the FlutterView that would then show through.

So my thinking is that we should provide general support for a color. That color might be transparent, translucent, or opaque, and we should apply it accordingly. Any reason why that would be a problem?

@mklim
Copy link
Contributor Author

mklim commented Sep 19, 2018

  1. Right, those are the former lines 131-138 I mentioned as having some safety checks and falling back to a default in my earlier comment. To try and clarify further, the "use" in those lines only existed to set the local variable int color. int color was then only used within AndroidView.java to set another local variable, final int backgroundColor, and then that was only ever used when it was passed to PlatformViewAndroid::SurfaceCreated through the JNI layer via the nativeSurfaceCreated method. PlatformViewAndroid::SurfaceCreated had a parameter for backgroundColor (linked above), but the parameter was never referred to or used in any way in the method body at all. So the attribute was ultimately unused to actually do anything, even though it was read in AndroidView.java and passed through the JNI. Does that make sense?

  2. Right now (and before this deletion, since these deleted lines never actually affected anything), the color or transparency of a partial Android view is completely controlled by Flutter itself, not by the Android layout. If I'm remembering right for manual debugging I altered the main.dart of the flutter_view example (here) so that its only UI element was a Container with a color. I then could see that the color of the AndroidView was rendered correctly to whatever I put it in dart, and supported transparency (via setting the color to Colors.transparent). Unfortunately I don't still have that exact debugging code to show, but it should be easy enough to repro if you'd like.

I think the AndroidView layout attributes probably shouldn't control the background color, because then Flutter devs would need to tweak Android and iOS layout files individually for add-to-app scenarios instead of being able to control the entire thing from one place, within their main flutter UI layout. It seems like that would also introduce potential strange bugs where any one of the three conflicted.

@matthew-carroll
Copy link
Contributor

Spoke offline.

The primary use-case in my mind is around splash color while Flutter is loading. I'm going to try to segment the API such that developers have splash color control, and then general transparency control for when Flutter is rendering, but we'll avoid supporting a general background color that goes from Android to Flutter.

amirh pushed a commit to amirh/engine that referenced this pull request Sep 21, 2018
- Changes rasterizer to clear the canvas with `SkColor_TRANSPARENT`
- Removes the unused `backgroundColor` param from `FlutterView.java`
amirh pushed a commit to amirh/engine that referenced this pull request Sep 21, 2018
- Changes rasterizer to clear the canvas with `SkColor_TRANSPARENT`
- Removes the unused `backgroundColor` param from `FlutterView.java`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants