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

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

Issue 14858022: gpu: Make sure external texture destination is initialized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO. Created 7 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a97842748a229514d3b2d0e7c20b78911200ccf0..568f603c1e53a5273445020e3158ff77301f7e14 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -9627,7 +9627,15 @@ void GLES2DecoderImpl::DoCopyTextureCHROMIUM(
// Set source texture's width and height to be the same as
// destination texture when source is GL_TEXTURE_EXTERNAL_OES.
+ // TODO(hkuang): Add support to get width/height of StreamTexture
+ // crbug.com/225781.
if (source_texture->target() == GL_TEXTURE_EXTERNAL_OES) {
+ if (!dest_level_defined) {
+ LOCAL_SET_GL_ERROR(
+ GL_INVALID_VALUE,
+ "glCopyTextureCHROMIUM", "destination level not defined");
+ return;
+ }
source_width = dest_width;
source_height = dest_height;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698