Skip to content

Conversation

jonahwilliams
Copy link
Contributor

Fixes #163315 Fixes #163521 Fixes #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)

Fixes flutter#163315
Fixes flutter#163521
Fixes flutter#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-actions github-actions bot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Feb 19, 2025
@jonahwilliams jonahwilliams 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-actions github-actions bot 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
Contributor Author

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

@justinmc
Copy link
Contributor

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

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 26, 2025
@auto-submit auto-submit bot merged commit a8a9ded into flutter:flutter-3.29-candidate.0 Feb 26, 2025
156 checks passed
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
@reidbaker reidbaker 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)

Fixes flutter#163315 Fixes flutter#163521 Fixes flutter#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 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 cp: review Cherry-picks in the review queue cp: stable cherry pick this pull request to stable release candidate branch e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants