Index: gpu/command_buffer/common/gles2_cmd_utils.cc |
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc |
index 7d97aeb6c505b25dbf8e8dabd96b828852296661..6eb9b8e0827283f571e4fe4879ce80b9f9a90feb 100644 |
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc |
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc |
@@ -1309,6 +1309,18 @@ bool GLES2Util::IsSizedColorFormat(uint32_t internal_format) { |
} |
} |
+GLint GLES2Util::GetColorEncodingFromInternalFormat(uint32_t internalformat) { |
+ switch (internalformat) { |
+ case GL_SRGB_EXT: |
+ case GL_SRGB_ALPHA_EXT: |
+ case GL_SRGB8: |
+ case GL_SRGB8_ALPHA8: |
+ return GL_SRGB; |
+ default: |
+ return GL_LINEAR; |
+ } |
+} |
+ |
void GLES2Util::GetColorFormatComponentSizes( |
uint32_t internal_format, uint32_t type, int* r, int* g, int* b, int* a) { |
DCHECK(r && g && b && a); |