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 bd7bed5278f045b9e79c7fbbed2eba291918d3fc..783aea65a312fb4122461cab382ab43596b22903 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -16645,24 +16645,21 @@ void GLES2DecoderImpl::TexStorageImpl(GLenum target, |
| GLsizei level_width = width; |
| GLsizei level_height = height; |
| GLsizei level_depth = depth; |
| - GLenum adjusted_format = internal_format; |
| -#if defined(OS_MACOSX) |
| - // TODO(dshwang): remove it after fixing the root cause. crbug.com/657532 |
| - adjusted_format = feature_info_->IsES3Enabled() ? internal_format : format; |
| -#endif |
|
Zhenyao Mo
2016/10/31 18:14:40
I agree with Dongseong. Now you found the root pro
|
| - |
| + GLenum adjusted_internal_format = |
| + feature_info_->context_type() == CONTEXT_TYPE_OPENGLES2 ? |
| + format : internal_format; |
| for (int ii = 0; ii < levels; ++ii) { |
| if (target == GL_TEXTURE_CUBE_MAP) { |
| for (int jj = 0; jj < 6; ++jj) { |
| GLenum face = GL_TEXTURE_CUBE_MAP_POSITIVE_X + jj; |
| texture_manager()->SetLevelInfo( |
| - texture_ref, face, ii, adjusted_format, level_width, level_height, |
| - 1, 0, format, type, gfx::Rect()); |
| + texture_ref, face, ii, adjusted_internal_format, level_width, |
| + level_height, 1, 0, format, type, gfx::Rect()); |
| } |
| } else { |
| texture_manager()->SetLevelInfo( |
| - texture_ref, target, ii, adjusted_format, level_width, level_height, |
| - level_depth, 0, format, type, gfx::Rect()); |
| + texture_ref, target, ii, adjusted_internal_format, level_width, |
| + level_height, level_depth, 0, format, type, gfx::Rect()); |
| } |
| level_width = std::max(1, level_width >> 1); |
| level_height = std::max(1, level_height >> 1); |