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 03f87167a04d297bb1826612e44f9736efba132d..14ac270e7d5c41ccdac1bef9172fc6acdd75389f 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -5066,7 +5066,7 @@ bool GLES2DecoderImpl::GetHelper( |
| if (glGetError() == GL_NO_ERROR) |
| return true; |
| } |
| - *params = GLES2Util::GetPreferredGLReadPixelsFormat( |
| + *params = GLES2Util::GetGLReadPixelsImplementationFormat( |
| GetBoundReadFrameBufferInternalFormat()); |
| } |
| return true; |
| @@ -5080,7 +5080,7 @@ bool GLES2DecoderImpl::GetHelper( |
| if (glGetError() == GL_NO_ERROR) |
| return true; |
| } |
| - *params = GLES2Util::GetPreferredGLReadPixelsType( |
| + *params = GLES2Util::GetGLReadPixelsImplementationType( |
| GetBoundReadFrameBufferInternalFormat(), |
| GetBoundReadFrameBufferTextureType()); |
| } |
| @@ -8752,9 +8752,6 @@ error::Error GLES2DecoderImpl::HandleReadPixels(uint32 immediate_data_size, |
| std::vector<GLenum> accepted_formats; |
| std::vector<GLenum> accepted_types; |
| switch (src_internal_format) { |
| - case GL_RGB10_A2UI: |
| - accepted_formats.push_back(GL_RGBA); |
| - accepted_types.push_back(GL_UNSIGNED_INT_2_10_10_10_REV); |
| case GL_R8UI: |
| case GL_R16UI: |
| case GL_R32UI: |
| @@ -8763,6 +8760,7 @@ error::Error GLES2DecoderImpl::HandleReadPixels(uint32 immediate_data_size, |
| case GL_RG32UI: |
| // All the RGB_INTEGER formats are not renderable. |
| case GL_RGBA8UI: |
| + case GL_RGB10_A2UI: |
| case GL_RGBA16UI: |
| case GL_RGBA32UI: |
| accepted_formats.push_back(GL_RGBA_INTEGER); |
| @@ -8780,6 +8778,9 @@ error::Error GLES2DecoderImpl::HandleReadPixels(uint32 immediate_data_size, |
| accepted_formats.push_back(GL_RGBA_INTEGER); |
| accepted_types.push_back(GL_INT); |
| break; |
| + case GL_RGB10_A2: |
| + accepted_formats.push_back(GL_RGBA); |
| + accepted_types.push_back(GL_UNSIGNED_INT_2_10_10_10_REV); |
|
bajones
2015/08/26 23:39:48
Don't we need a break right here?
Zhenyao Mo
2015/08/26 23:43:20
No, RGB10_A2 is special. It will supports three f
Zhenyao Mo
2015/08/26 23:48:20
Good point. I will explicitly push the RGBA/UNSIG
|
| default: |
| accepted_formats.push_back(GL_RGBA); |
| { |