Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3138)

Unified Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 638143003: Enabled EXT_sRGB WebGL extension support in the command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added suggested comment Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3b5097cd43835dcd3ba5846a5be77dde4a5505b8..41db0b8143cf5d9eaf07035273f88b04222db926 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -232,6 +232,10 @@ int GLES2Util::GLGetNumValuesReturned(int id) const {
// GL_EXT_multisampled_render_to_texture
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT:
return 1;
+ // -- glGetFramebufferAttachmentParameteriv with
+ // GL_EXT_sRGB
+ case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:
+ return 1;
// -- glGetProgramiv
case GL_DELETE_STATUS:
@@ -352,11 +356,13 @@ int ElementsPerGroup(int format, int type) {
switch (format) {
case GL_RGB:
+ case GL_SRGB_EXT:
return 3;
case GL_LUMINANCE_ALPHA:
return 2;
case GL_RGBA:
case GL_BGRA_EXT:
+ case GL_SRGB_ALPHA_EXT:
return 4;
case GL_ALPHA:
case GL_LUMINANCE:
@@ -670,6 +676,7 @@ uint32 GLES2Util::GetChannelsForFormat(int format) {
case GL_RGB565:
case GL_RGB16F_EXT:
case GL_RGB32F_EXT:
+ case GL_SRGB_EXT:
return kRGB;
case GL_BGRA_EXT:
case GL_BGRA8_EXT:
@@ -679,6 +686,8 @@ uint32 GLES2Util::GetChannelsForFormat(int format) {
case GL_RGBA8_OES:
case GL_RGBA4:
case GL_RGB5_A1:
+ case GL_SRGB_ALPHA_EXT:
+ case GL_SRGB8_ALPHA8_EXT:
return kRGBA;
case GL_DEPTH_COMPONENT32_OES:
case GL_DEPTH_COMPONENT24_OES:
« no previous file with comments | « no previous file | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698