Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit dbae488

Browse files
authored
[Win32] Eliminate use of OpenGL ES 3.1 symbols (#32780)
In ANGLE commit 232e523656fccfacabeb8e5ce0cbc2e6dcc1ec4e, an Open GL extension API was removed from ANGLE which included several symbols that are not available until OpenGL ES 3.2. This was removed since it had no known users, and cut the number of entrypoints ANGLE exports in half, saving 130kB on Android. Of the removed symbols, the Windows embedder used two: * GL_RGBA8, which is not OpenGL ES, but rather OpenGL, and can be replaced with GL_RGBA which is lenient since it doesn't ask for a specific size. * GL_CLAMP_TO_EDGE, which can be replaced with GL_CLAMP_TO_BORDER. https://open.gl/textures for details. Issue: flutter/flutter#102117
1 parent d5e952c commit dbae488

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

shell/platform/windows/external_texture_gl.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ bool ExternalTextureGL::PopulateTexture(size_t width,
3636
// Populate the texture object used by the engine.
3737
opengl_texture->target = GL_TEXTURE_2D;
3838
opengl_texture->name = state_->gl_texture;
39-
opengl_texture->format = GL_RGBA8;
39+
opengl_texture->format = GL_RGBA;
4040
opengl_texture->destruction_callback = nullptr;
4141
opengl_texture->user_data = nullptr;
4242
opengl_texture->width = width;
@@ -58,10 +58,8 @@ bool ExternalTextureGL::CopyPixelBuffer(size_t& width, size_t& height) {
5858
gl_.glGenTextures(1, &state_->gl_texture);
5959

6060
gl_.glBindTexture(GL_TEXTURE_2D, state_->gl_texture);
61-
62-
gl_.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
63-
gl_.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
64-
61+
gl_.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
62+
gl_.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
6563
gl_.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
6664
gl_.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
6765

0 commit comments

Comments
 (0)