diff options
author | ccameron <ccameron@chromium.org> | 2015-11-05 17:49:47 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-06 01:50:31 +0000 |
commit | ce99ede5349c82537e78d1b0cd9c70559550964c (patch) | |
tree | 1d8b45289f08cc2f10fc0f8835172591e28e60a9 /gpu | |
parent | fb20d9affeca51ff005a0dfd6dce194acd0ef342 (diff) | |
download | chromium_src-ce99ede5349c82537e78d1b0cd9c70559550964c.zip chromium_src-ce99ede5349c82537e78d1b0cd9c70559550964c.tar.gz chromium_src-ce99ede5349c82537e78d1b0cd9c70559550964c.tar.bz2 |
cc: Fix GL_R8 GpuMemoryBuffers
Make GLImages use GL_RED instead of GL_R8 as the internal format,
because GL_R8 isn't supported as an internal format for most GL
functions and almost all GLES functions.
BUG=533677
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1434453008
Cr-Commit-Position: refs/heads/master@{#358225}
Diffstat (limited to 'gpu')
4 files changed, 6 insertions, 5 deletions
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_image.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_image.txt index 7118391..2ba1e39 100644 --- a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_image.txt +++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_image.txt @@ -46,7 +46,7 @@ New Procedures and Functions INVALID_VALUE is generated if <width> or <height> is nonpositive. INVALID_VALUE is generated if <internalformat> is not one of - R8, RGB, RGBA, BGRA_EXT, ATC_RGB_AMD, ATC_RGBA_INTERPOLATED_ALPHA_AMD, + RED, RGB, RGBA, BGRA_EXT, ATC_RGB_AMD, ATC_RGBA_INTERPOLATED_ALPHA_AMD, COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT5_EXT or ETC1_RGB8_OES. @@ -64,7 +64,7 @@ Dependencies on EXT_texture_format_BGRA8888 Dependencies on ARB_texture_rg If ARB_texture_rg is not supported: - * delete any reference to the R8 format. + * delete any reference to the RED format. Dependencies on AMD_compressed_ATC_texture @@ -99,3 +99,4 @@ Revision History 4/6/2015 Add BGRA_EXT format. 2/7/2015 Add R8 format. 5/13/2015 Add compressed formats. + 11/5/2015 Change R8 format to RED. diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index f541d91..f37b82a 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -5486,7 +5486,7 @@ bool ValidImageFormat(GLenum internalformat, return capabilities.texture_format_dxt5; case GL_ETC1_RGB8_OES: return capabilities.texture_format_etc1; - case GL_R8: + case GL_RED: case GL_RGB: case GL_RGBA: case GL_RGB_YCBCR_422_CHROMIUM: diff --git a/gpu/command_buffer/service/image_factory.cc b/gpu/command_buffer/service/image_factory.cc index bcfd121..13b016a 100644 --- a/gpu/command_buffer/service/image_factory.cc +++ b/gpu/command_buffer/service/image_factory.cc @@ -19,7 +19,7 @@ ImageFactory::~ImageFactory() { gfx::BufferFormat ImageFactory::DefaultBufferFormatForImageFormat( unsigned internalformat) { switch (internalformat) { - case GL_R8: + case GL_RED: return gfx::BufferFormat::R_8; case GL_RGB: return gfx::BufferFormat::BGRX_8888; diff --git a/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc b/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc index 0852d01..18b1e8d 100644 --- a/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc +++ b/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc @@ -127,7 +127,7 @@ void SetRow(gfx::BufferFormat format, GLenum InternalFormat(gfx::BufferFormat format) { switch (format) { case gfx::BufferFormat::R_8: - return GL_R8; + return GL_RED; case gfx::BufferFormat::RGBA_4444: case gfx::BufferFormat::RGBA_8888: return GL_RGBA; |