Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2738163002: Enable CopyTextureCHROMIUM in Blink for Tex{Sub}Image2D with more cases (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 992ad25f100b7d5cf2fd7f3381e741acfe19b34e..2c192ed60c97b9adc311cfe6fc1e207d42c662df 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -16425,6 +16425,13 @@ CopyTextureMethod GLES2DecoderImpl::getCopyTextureCHROMIUMMethod(
Texture::ColorRenderable(GetFeatureInfo(), dest_internal_format, false);
std::string output_error_msg;
+ // Make sure source_type has value for unsized source internalformat.
+ if (!GLES2Util::IsSizedColorFormat(source_internal_format) && !source_type) {
+ source_type =
+ TextureManager::ExtractTypeFromStorageFormat(source_internal_format);
+ }
qiankun 2017/03/09 08:53:02 This code can be removed once the issue in https:/
Zhenyao Mo 2017/03/10 00:10:23 Can you add it into a TODO in the code? Otherwise
qiankun 2017/03/10 02:48:04 Done.
+ DCHECK(GLES2Util::IsSizedColorFormat(source_internal_format) || source_type);
+
// CopyTexImage* should not allow internalformat of GL_BGRA_EXT and
// GL_BGRA8_EXT. crbug.com/663086.
bool copy_tex_image_format_valid =

Powered by Google App Engine
This is Rietveld 408576698