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

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

Issue 2094343003: CompressedCopyTextureCHROMIUM: validate texture targets before looking up levels (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc » ('j') | 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 74abce022062a0e6a5d22c7e71e7e0d028c44717..dfa07e738ff1897e34351b6d020a16ddbdeaf5fa 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -14640,6 +14640,11 @@ void GLES2DecoderImpl::DoCompressedCopyTextureCHROMIUM(GLuint source_id,
return;
}
+ if (!ValidateCompressedCopyTextureCHROMIUM(kFunctionName, source_texture_ref,
+ dest_texture_ref)) {
+ return;
+ }
+
Texture* source_texture = source_texture_ref->texture();
Texture* dest_texture = dest_texture_ref->texture();
int source_width = 0;
@@ -14681,11 +14686,6 @@ void GLES2DecoderImpl::DoCompressedCopyTextureCHROMIUM(GLuint source_id,
return;
}
- if (!ValidateCompressedCopyTextureCHROMIUM(kFunctionName, source_texture_ref,
- dest_texture_ref)) {
- return;
- }
-
if (!InitializeCopyTextureCHROMIUM(kFunctionName))
return;
« no previous file with comments | « no previous file | gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698