Skip to content

[google_maps_flutter] Fix ios tile overlay not loading when dealing with wide gamut images #6377

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

Merged
merged 10 commits into from
Mar 27, 2024

Conversation

LouiseHsu
Copy link
Contributor

@LouiseHsu LouiseHsu commented Mar 22, 2024

Fixes flutter/flutter#135252
Google maps does not currently support the use of wide gamut images.
Since engine uses 16 bit floats when dealing with wide gamut images (here), when we detect that an image is using that format, we downsample it.

434666538_7633704776682015_2581174196928191417_n.mp4

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@LouiseHsu LouiseHsu changed the title remove extra proj files Fix ios tile overlay not loading when dealing with wide gamut images Mar 22, 2024
@LouiseHsu LouiseHsu changed the title Fix ios tile overlay not loading when dealing with wide gamut images [google_maps_flutter] Fix ios tile overlay not loading when dealing with wide gamut images Mar 22, 2024
@LouiseHsu LouiseHsu marked this pull request as ready for review March 26, 2024 23:44
@LouiseHsu LouiseHsu requested a review from hellohuanlin as a code owner March 26, 2024 23:44
Copy link
Contributor

@hellohuanlin hellohuanlin left a comment

Choose a reason for hiding this comment

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

lgtm after nits

size_t bitsPerComponent = CGImageGetBitsPerComponent(imageRef);

XCTAssert(isFloat == false);
XCTAssert(bitsPerComponent != 16);
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the value actually gonna be?

Copy link
Contributor Author

@LouiseHsu LouiseHsu Mar 27, 2024

Choose a reason for hiding this comment

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

non-wide gamut imgs are 8 bit, changed to test that instead

@LouiseHsu LouiseHsu merged commit 00d29b1 into flutter:main Mar 27, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 27, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 27, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 27, 2024
flutter/packages@ab1630b...e6b3e11

2024-03-27 49699333+dependabot[bot]@users.noreply.github.com [camera]: Bump androidx.annotation:annotation from 1.7.0 to 1.7.1 in /packages/camera/camera_android/android (flutter/packages#5707)
2024-03-27 [email protected] [google_maps_flutter] Fix ios tile overlay not loading when dealing with wide gamut images (flutter/packages#6377)
2024-03-26 [email protected] [flutter_lints] Updates various links (flutter/packages#6400)
2024-03-26 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.24.7 to 3.24.9 (flutter/packages#6386)
2024-03-26 [email protected] Roll Flutter from 14774b9 to dbdcead (38 revisions) (flutter/packages#6399)
2024-03-26 49699333+dependabot[bot]@users.noreply.github.com [in_app_pur]: Bump org.json:json from 20231013 to 20240303 in /packages/in_app_purchase/in_app_purchase_android/example/android/app (flutter/packages#6255)

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 [email protected],[email protected] 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
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
…ith wide gamut images (flutter#6377)

Fixes flutter/flutter#135252
Google maps does not currently support the use of wide gamut images.
Since engine uses 16 bit floats when dealing with wide gamut images
([here](https://github.com/flutter/engine/blob/8a51e124fbf168295a1b05f8d66459bfb29ae8a9/shell/platform/darwin/ios/framework/Source/FlutterView.mm#L125)),
when we detect that an image is using that format, we downsample it.



https://github.com/flutter/packages/assets/36148254/2d67418d-53a9-472b-b03e-86fb24f9610c


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran the
auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages
repo does use `dart format`.)
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I updated `pubspec.yaml` with an appropriate new version according
to the [pub versioning philosophy], or this PR is [exempt from version
changes].
- [x] I updated `CHANGELOG.md` to add a description of the change,
[following repository CHANGELOG style].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
[exempt from version changes]:
https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version-and-changelog-updates
[following repository CHANGELOG style]:
https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[google_maps_flutter] iOS TileOverlay stops loading tiles after backgrounding app (3.13+)
2 participants