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 bb2c85e8bf60d4f0e8d93d5fecae46ea2a018827..56c1716f5b2a4658240aff28bd58b5be4a30e117 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -12199,11 +12199,11 @@ bool GLES2DecoderImpl::ClearLevel(Texture* texture, |
| DCHECK(target != GL_TEXTURE_3D && target != GL_TEXTURE_2D_ARRAY && |
| target != GL_TEXTURE_EXTERNAL_OES); |
| uint32_t channels = GLES2Util::GetChannelsForFormat(format); |
| - if ((feature_info_->feature_flags().angle_depth_texture || |
| - feature_info_->IsWebGL2OrES3Context()) |
| - && (channels & GLES2Util::kDepth) != 0) { |
| + if ((channels & GLES2Util::kDepth) != 0 && |
| + feature_info_->feature_flags().angle_depth_texture && |
| + feature_info_->gl_version_info().is_es2) { |
|
Kai Ninomiya
2016/11/17 20:41:22
I think the logic here is valid but doesn't quite
Zhenyao Mo
2016/11/17 20:46:58
You are right. I can move feature_info_->feature_
|
| // It's a depth format and ANGLE doesn't allow texImage2D or texSubImage2D |
| - // on depth formats. |
| + // on depth formats in ES2. |
| GLuint fb = 0; |
| glGenFramebuffersEXT(1, &fb); |
| glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fb); |