diff options
Diffstat (limited to 'gpu/command_buffer/service')
-rw-r--r-- | gpu/command_buffer/service/feature_info.cc | 1 | ||||
-rw-r--r-- | gpu/command_buffer/service/feature_info_unittest.cc | 1 | ||||
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 32 |
3 files changed, 19 insertions, 15 deletions
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index f6bf440..b4e71b9 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc @@ -102,7 +102,6 @@ void FeatureInfo::AddFeatures(const char* desired_features) { bool npot_ok = false; - AddExtensionString("GL_CHROMIUM_map_sub"); AddExtensionString("GL_CHROMIUM_copy_texture_to_parent_texture"); AddExtensionString("GL_CHROMIUM_resource_safe"); AddExtensionString("GL_CHROMIUM_resize"); diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc index b2863dc..f3c4797 100644 --- a/gpu/command_buffer/service/feature_info_unittest.cc +++ b/gpu/command_buffer/service/feature_info_unittest.cc @@ -66,7 +66,6 @@ TEST_F(FeatureInfoTest, InitializeNoExtensions) { SetupInitExpectations(""); info_.Initialize(NULL); // Check default extensions are there - EXPECT_THAT(info_.extensions(), HasSubstr("GL_CHROMIUM_map_sub")); EXPECT_THAT(info_.extensions(), HasSubstr("GL_CHROMIUM_copy_texture_to_parent_texture")); EXPECT_THAT(info_.extensions(), HasSubstr("GL_CHROMIUM_resource_safe")); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index d5bd745..4d32625 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -5657,6 +5657,21 @@ error::Error GLES2DecoderImpl::DoTexImage2D( "glTexImage2D: unknown texture for target"); return error::kNoError; } + + GLsizei tex_width = 0; + GLsizei tex_height = 0; + GLenum tex_type = 0; + GLenum tex_format = 0; + bool level_is_same = + info->GetLevelSize(target, level, &tex_width, &tex_height) && + info->GetLevelType(target, level, &tex_type, &tex_format) && + width == tex_width && height == tex_height && + type == tex_type && format == tex_format; + + if (level_is_same && !pixels) { + return error::kNoError; + } + scoped_array<int8> zero; if (!pixels) { zero.reset(new int8[pixels_size]); @@ -5668,19 +5683,10 @@ error::Error GLES2DecoderImpl::DoTexImage2D( state_dirty_ = true; } - if (!teximage2d_faster_than_texsubimage2d_) { - GLsizei tex_width = 0; - GLsizei tex_height = 0; - GLenum tex_type = 0; - GLenum tex_format = 0; - if (info->GetLevelSize(target, level, &tex_width, &tex_height) && - info->GetLevelType(target, level, &tex_type, &tex_format) && - width == tex_width && height == tex_height && - type == tex_type && format == tex_format) { - glTexSubImage2D(target, level, 0, 0, width, height, format, type, pixels); - tex_image_2d_failed_ = false; - return error::kNoError; - } + if (!teximage2d_faster_than_texsubimage2d_ && level_is_same) { + glTexSubImage2D(target, level, 0, 0, width, height, format, type, pixels); + tex_image_2d_failed_ = false; + return error::kNoError; } CopyRealGLErrorsToWrapper(); |