This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[CP][Windows] Improve texture format logic#54517
Merged
auto-submit[bot] merged 1 commit intoAug 13, 2024
Merged
Conversation
This improves Flutter Window's texture format logic: 1. **If the device has extension `GL_EXT_texture_format_BGRA8888`**: backing stores' texture will be created with format `GL_BGRA_EXT` instead of `GL_RGBA8`. This is what fixes flutter/flutter#150546. 2. **Otherwise**: backing stores' texture will be created with format `GL_RGBA` and the engine will use the color type `kRGBA_8888_SkColorType` when creating the `SkSurface`. Previously the engine always used color type `kN32_SkColorType`, which could be either RGBA or BGRA depending on the machine that compiled the engine. This caused Skia validation errors as the texture's format did not match the Skia surface's color type. I tested this by editing Flutter Windows to force it down this code path. Huge kudos to @chinmaygarde for the OpenGL expertise! Fixes: flutter/flutter#150546 > [!WARNING] > Unfortunately, we are unable to test this. > This bug appears to only affect older devices; none of our devices reproduce this issue. > We also do not have the infrastructure to do a native screenshot test on Windows. > I will get a test exemption for this change. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
itsjustkevin
approved these changes
Aug 13, 2024
e72f0c3
into
flutter-team-archive:flutter-3.24-candidate.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: flutter/flutter#150546
Cherry pick issue: flutter/flutter#153321