-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix Google Maps rendering issues in TLHC mode when using LATEST renderer #5408
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
Fix Google Maps rendering issues in TLHC mode when using LATEST renderer #5408
Conversation
|
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 or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
stuartmorgan-g
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.
We should update https://pub.dev/packages/google_maps_flutter_android#texture-layer-hybrid-composition with new guidance. Although if possible, we should also switch the default if this resolves the issue (and leave the switch only as an escape hatch if there are surprise issues). I think this would address all cases:
- LATEST would always get this codepath (and work)
- LEGACY would presumably either get this codepath (and work) or hit the SurfaceView codepath in Maps and then automatically fall out of TLHC anyway due to the engine fallback logic (so work).
Does that sound right?
...flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java
Outdated
Show resolved
Hide resolved
...flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java
Outdated
Show resolved
Hide resolved
...flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java
Outdated
Show resolved
Hide resolved
...flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java
Outdated
Show resolved
Hide resolved
I've updated the docs, PTAL. |
...ges/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/README.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/README.md
Outdated
Show resolved
Hide resolved
...ges/google_maps_flutter/google_maps_flutter_android/lib/src/google_maps_flutter_android.dart
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/README.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/README.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/README.md
Outdated
Show resolved
Hide resolved
packages/google_maps_flutter/google_maps_flutter_android/README.md
Outdated
Show resolved
Hide resolved
...flutter_android/android/src/main/java/io/flutter/plugins/googlemaps/GoogleMapController.java
Outdated
Show resolved
Hide resolved
The Google Maps LATEST renderer always uses a TextureView. We can use a signal from this TextureView to perform view invalidation that fixes the rendering glitches (missing updates) in TLHC mode. NOTE: We have an internal bug 311013682 requesting an official way of achieving this functionality but if the bug is ever acted on it will take many months/years before we can rely on this functionality. In the meantime, chain the internal SurfaceTextureListener with our own and piggyback on the OnSurfaceTextureUpdated callback to invalidate the MapView. Fixes flutter/flutter#103686 Tested on an emulator and a physical device (Pixel 6 Pro).
stuartmorgan-g
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 with nit
| ## 2.6.0 | ||
|
|
||
| * Fixes missing updates in TLHC mode. | ||
| * Switched default display mode to TLHC mode. |
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: Switches
(Per our style guide for changelogs.)
flutter/packages@e4aaba8...bc72d15 2023-11-30 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[pointer_interceptor] Add platform interface" (flutter/packages#5524) 2023-11-30 louisehsu@google.com [pointer_interceptor] Add platform interface (flutter/packages#5499) 2023-11-29 engine-flutter-autoroll@skia.org Roll Flutter from 6bf3ccd to 5e5b529 (58 revisions) (flutter/packages#5519) 2023-11-29 john@johnmccutchan.com Fix Google Maps rendering issues in TLHC mode when using LATEST renderer (flutter/packages#5408) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@e4aaba8...bc72d15 2023-11-30 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[pointer_interceptor] Add platform interface" (flutter/packages#5524) 2023-11-30 louisehsu@google.com [pointer_interceptor] Add platform interface (flutter/packages#5499) 2023-11-29 engine-flutter-autoroll@skia.org Roll Flutter from 6bf3ccd to 5e5b529 (58 revisions) (flutter/packages#5519) 2023-11-29 john@johnmccutchan.com Fix Google Maps rendering issues in TLHC mode when using LATEST renderer (flutter/packages#5408) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
The Google Maps LATEST renderer always uses a TextureView. We can use a signal from this TextureView to perform view invalidation that fixes the rendering glitches (missing updates) in TLHC mode.
NOTE: We have an internal bug 311013682 requesting an official way of achieving this functionality but if the bug is ever acted on it will take many months/years before we can rely on this functionality.
In the meantime, chain the internal SurfaceTextureListener with our own and piggyback on the OnSurfaceTextureUpdated callback to invalidate the MapView.
Fixes flutter/flutter#103686
Tested on an emulator and a physical device (Pixel 6 Pro).