Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| index 0886768193444d6e61c7467c5ef30e28aeaf85a6..7e51c4dc10053e0ec1dc03c31ca6bb319a8ff2be 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -2613,8 +2613,8 @@ bool GLES2DecoderImpl::Initialize( |
| GL_RGBA8 : GL_RGB8; |
| } else { |
| offscreen_target_samples_ = 1; |
| - offscreen_target_color_format_ = attrib_parser.alpha_size > 0 ? |
| - GL_RGBA : GL_RGB; |
| + offscreen_target_color_format_ = attrib_parser.alpha_size > 0 || |
| + workarounds().disable_gl_rgb_format ? GL_RGBA : GL_RGB; |
|
piman
2015/03/31 04:06:30
nit: can you fix indenting? e.g. by running git cl
|
| } |
| // ANGLE only supports packed depth/stencil formats, so use it if it is |
| @@ -2636,8 +2636,8 @@ bool GLES2DecoderImpl::Initialize( |
| GL_STENCIL_INDEX8 : 0; |
| } |
| } else { |
| - offscreen_target_color_format_ = attrib_parser.alpha_size > 0 ? |
| - GL_RGBA : GL_RGB; |
| + offscreen_target_color_format_ = attrib_parser.alpha_size > 0 || |
| + workarounds().disable_gl_rgb_format ? GL_RGBA : GL_RGB; |
| // If depth is requested at all, use the packed depth stencil format if |
| // it's available, as some desktop GL drivers don't support any non-packed |
| @@ -2659,8 +2659,8 @@ bool GLES2DecoderImpl::Initialize( |
| } |
| } |
| - offscreen_saved_color_format_ = attrib_parser.alpha_size > 0 ? |
| - GL_RGBA : GL_RGB; |
| + offscreen_saved_color_format_ = attrib_parser.alpha_size > 0 || |
| + workarounds().disable_gl_rgb_format ? GL_RGBA : GL_RGB; |
| // Create the target frame buffer. This is the one that the client renders |
| // directly to. |