summaryrefslogtreecommitdiffstats
path: root/gpu/BUILD.gn
diff options
context:
space:
mode:
authorkkinnunen <kkinnunen@nvidia.com>2015-11-09 03:13:58 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-09 11:14:49 +0000
commit0c2dee787ace66b1f2d68cca0e19c2d3c82858f4 (patch)
treec978868de3dd9c932677a08604edbd164287e411 /gpu/BUILD.gn
parent7818e07434df5da87d6cdfe0d30830bf2191097e (diff)
downloadchromium_src-0c2dee787ace66b1f2d68cca0e19c2d3c82858f4.zip
chromium_src-0c2dee787ace66b1f2d68cca0e19c2d3c82858f4.tar.gz
chromium_src-0c2dee787ace66b1f2d68cca0e19c2d3c82858f4.tar.bz2
gpu: Make glTexSubImage2D work with GL_SRGB_ALPHA on OpenGL
Make glTexSubImage2D work when client passes GL_SRGB_ALPHA as the format when running on OpenGL. Considering GL_SRGB_ALPHA texture: In OpenGL ES 2.0, Tex*Image2D format must be GL_SRGB_ALPHA (same as texture internal format). In OpenGL and OpenGL ES 3.0, format must not be GL_SRGB_ALPHA. The format was handled correctly for glTexImage2D, but not for glTexSubImage2D. The actual fix is to apply TextureManager::AdjustTexFormat to glTexSubImage2D format. Moves the glTexSubImage2D code from decoder to texture manager, and tries to follow the structure of glTexImage2D. This is due to hoping to reduce the amount of similar inconsistency bugs. The glTexSubImage3D, CopySubTexture* and compressed call variants are still potential sources of inconsistencies. The code duplication between glTexImage2D and glTexSubImage2D is not addressed, either. Changes the texture size of Service/GLES2DecoderTest.TexSubImage2DBadArgs. The check for behavior "!pixels -> kOutOfBounds" was moved before argument validation. In the test, there is a subtest that uses invalid type, GL_UNSIGNED_INT. This causes the texture data to be bigger than SHM buffer, the unexpected kOutOfBounds would be returned instead of normal GL error for invalid type. BUG=skia:2992 Committed: https://crrev.com/60da545176aed90d91874a456da2bac8b822c67d Cr-Commit-Position: refs/heads/master@{#356787} Review URL: https://codereview.chromium.org/1426903002 Cr-Commit-Position: refs/heads/master@{#358578}
Diffstat (limited to 'gpu/BUILD.gn')
-rw-r--r--gpu/BUILD.gn1
1 files changed, 1 insertions, 0 deletions
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn
index a1c4afb..141b2b2 100644
--- a/gpu/BUILD.gn
+++ b/gpu/BUILD.gn
@@ -127,6 +127,7 @@ test("gl_tests") {
"command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc",
"command_buffer/tests/gl_cube_map_texture_unittest.cc",
"command_buffer/tests/gl_depth_texture_unittest.cc",
+ "command_buffer/tests/gl_ext_srgb_unittest.cc",
"command_buffer/tests/gl_fence_sync_unittest.cc",
"command_buffer/tests/gl_gpu_memory_buffer_unittest.cc",
"command_buffer/tests/gl_lose_context_chromium_unittest.cc",