Skip to content
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

[WebCore] Add big endian bitmap texture #25424

Merged
merged 1 commit into from Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp
Expand Up @@ -86,7 +86,11 @@ void BitmapTexture::updateContents(const void* srcData, const IntRect& targetRec
// We are updating a texture with format RGBA with content from a buffer that has BGRA format. Instead of turning BGRA
// into RGBA and then uploading it, we upload it as is. This causes the texture format to be RGBA but the content to be BGRA,
// so we mark the texture to convert the colors when painting the texture.
#if CPU(LITTLE_ENDIAN)
m_colorConvertFlags = TextureMapperFlags::ShouldConvertTextureBGRAToRGBA;
#else
m_colorConvertFlags = TextureMapperFlags::ShouldConvertTextureARGBToRGBA;
#endif

glBindTexture(GL_TEXTURE_2D, m_id);

Expand Down