Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Aug 1, 2025

Docs for CGBitmapContextCreate bitmapInfo parameter say:

The constants for specifying the alpha channel information are declared with the CGImageAlphaInfo type but can be passed to this parameter safely. You can also pass the other constants associated with the CGBitmapInfo type.

The docs still show kCGImageAlphaPremultipliedLast being passed in directly.

Instead of casting to CGBitmapInfo (which would also work I believe), use kCGBitmapAlphaInfoMask.

Further explanation at inkling/Subliminal#23 (comment).

Tested here:

UIImage *downsampledImage = [controller handleResultTile:wideGamutImage];

Fixes flutter/flutter#170440

Pre-Review Checklist

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

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request fixes a compiler warning in the iOS implementation related to an implicit enum conversion when creating a bitmap context. The change correctly uses kCGBitmapAlphaInfoMask to avoid the warning. The pubspec.yaml version and CHANGELOG.md are updated accordingly. I have one suggestion to align the changelog entry with the repository's style guide.

@@ -1,3 +1,7 @@
## 2.15.5

* Fixes `kCGImageAlphaPremultipliedLast` implicit conversion from enumeration type warning.

Choose a reason for hiding this comment

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

medium

Per the repository's contribution guide1, which specifies the CHANGELOG style, entries should be in the past tense and be a complete sentence ending with a period. Please update this entry to align with the guide.

Style Guide References

Suggested change
* Fixes `kCGImageAlphaPremultipliedLast` implicit conversion from enumeration type warning.
* Fixed `kCGImageAlphaPremultipliedLast` implicit conversion from enumeration type warning.

Footnotes

  1. PR descriptions should include the Pre-Review Checklist from the PR template, with all of the steps completed. (link)

Copy link
Member Author

Choose a reason for hiding this comment

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

This advice is wrong, the CHANGELOG style says:

Entries should use present tense indicative for verbs, with "this version" as an implied subject. For example, "Adds cool new feature.", not "Add", "Added", or "Adding".

@jmagman jmagman changed the title [google_maps_flutter_ios] Fix kCGImageAlphaPremultipliedLast implicit conversion from enumeration type with kCGBitmapAlphaInfoMask [google_maps_flutter_ios] Fix kCGImageAlphaPremultipliedLast implicit conversion from enumeration type Aug 1, 2025
@jmagman jmagman marked this pull request as ready for review August 1, 2025 16:23
@jmagman jmagman requested review from stuartmorgan-g and removed request for cbracken August 1, 2025 16:23
Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

LGTM

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 1, 2025
@auto-submit auto-submit bot merged commit 56bcd0c into flutter:main Aug 4, 2025
80 checks passed
@jmagman jmagman deleted the kCGBitmapAlphaInfoMask branch August 4, 2025 20:42
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 5, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Aug 5, 2025
flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

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] 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
danilozhang pushed a commit to danilozhang/flutter that referenced this pull request Aug 6, 2025
…r#173290)

flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
flutter#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

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] 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
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
…r#173290)

flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
flutter#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

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] 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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
…r#173290)

flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
flutter#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

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] 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
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
…r#173290)

flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
flutter#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

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] 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
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
…r#173290)

flutter/packages@1a72287...83ae18a

2025-08-04 [email protected] [go_router] add initial json support
flutter#110781 (flutter/packages#9404)
2025-08-04 [email protected] Update CODEOWNERS (flutter/packages#9721)
2025-08-04 [email protected] [google_maps_flutter_ios] Fix
kCGImageAlphaPremultipliedLast implicit conversion from enumeration type
(flutter/packages#9720)
2025-08-04 [email protected] Roll Flutter from
871849e to beda687 (34 revisions) (flutter/packages#9745)
2025-08-04 [email protected]
[interactive_media_ads] Fixes setting adsresponse on Android
(flutter/packages#9744)
2025-08-04 [email protected]
[interactive_media_ads]: Adds additional methods to configure ad
requests (flutter/packages#9696)

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] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: google_maps_flutter platform-ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[google_maps_flutter_ios] implicit conversion from enumeration type

2 participants