Skip to content

[CP][Impeller] ensure that OpenGL "flipped" textures do not leak via texture readback. (#163501) - #163667

Merged
auto-submit[bot] merged 6 commits into
flutter:flutter-3.29-candidate.0from
jonahwilliams:flip_texture_cp
Feb 26, 2025
Merged

[CP][Impeller] ensure that OpenGL "flipped" textures do not leak via texture readback. (#163501)#163667
auto-submit[bot] merged 6 commits into
flutter:flutter-3.29-candidate.0from
jonahwilliams:flip_texture_cp

Conversation

@jonahwilliams

Copy link
Copy Markdown
Contributor

Fixes#163315Fixes#163521Fixes#142641

OpenGL has an inverted coordinate system (bottom left is zero) compared to Metal/Vulkan (top left is zero). We handle this by rendering things upside down on OpenGL. Unfortunately this can leak out of the renderer via readback (toImage), so we need to make sure to undo the inversion.

This is not performed for the "TextureCoordinateSystem::kUploadFromHost" state as that indicates the texture is already "right side up".

…ure readback. (flutter#163501)
Fixesflutter#163315Fixesflutter#163521Fixesflutter#142641
OpenGL has an inverted coordinate system (bottom left is zero) compared
to Metal/Vulkan (top left is zero). We handle this by rendering things
upside down on OpenGL. Unfortunately this can leak out of the renderer
via readback (toImage), so we need to make sure to undo the inversion.
This is not performed for the "TextureCoordinateSystem::kUploadFromHost"
state as that indicates the texture is already "right side up".
@github-actionsgithub-actionsBot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Feb 19, 2025
@jonahwilliamsjonahwilliams added cp: review Cherry-picks in the review queue cp: stable cherry pick this pull request to stable release candidate branch and removed engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Feb 19, 2025
@github-actionsgithub-actionsBot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Feb 19, 2025
@jonahwilliams

Copy link
Copy Markdown
ContributorAuthor

Ah I used an API that is not in the release branch. Fixing.

@justinmc

Copy link
Copy Markdown
Contributor

The presubmits were fixed in #164050. Pushing a merge commit to see if this PR will pass now.

@justinmcjustinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 26, 2025
@auto-submit
auto-submitBot merged commit a8a9ded into flutter:flutter-3.29-candidate.0Feb 26, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
@reidbakerreidbaker mentioned this pull request Apr 4, 2025
9 tasks
Fintasys pushed a commit to Fintasys/flutter that referenced this pull request May 14, 2025
…texture readback. (flutter#163501) (flutter#163667)
Fixesflutter#163315Fixesflutter#163521Fixesflutter#142641
OpenGL has an inverted coordinate system (bottom left is zero) compared to Metal/Vulkan (top left is zero). We handle this by rendering things upside down on OpenGL. Unfortunately this can leak out of the renderer via readback (toImage), so we need to make sure to undo the inversion.
This is not performed for the "TextureCoordinateSystem::kUploadFromHost" state as that indicates the texture is already "right side up".
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit Appcp: reviewCherry-picks in the review queuecp: stablecherry pick this pull request to stable release candidate branche: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@jonahwilliams@justinmc@jtmcdole@eyebrowsoffire