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

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

Issue 1417913004: gpu: don't use Texture::ValidForTexture() for GL Image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 3b45922c697f3ca0a0dc16125a005582064c124a..d924fad27082ad97adc488397a8e7dbd400adc90 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -13203,6 +13203,13 @@ void GLES2DecoderImpl::DoCopySubTextureCHROMIUM(
return;
}
+ if (!source_texture->ValidForTexture(source_texture->target(), 0, x, y, 0,
+ width, height, 1)) {
+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopySubTextureCHROMIUM",
+ "source texture bad dimensions.");
+ return;
+ }
+
// Check that this type of texture is allowed.
if (!texture_manager()->ValidForTarget(source_texture->target(), 0,
source_width, source_height, 1)) {
@@ -13216,12 +13223,6 @@ void GLES2DecoderImpl::DoCopySubTextureCHROMIUM(
GLenum source_internal_format = 0;
source_texture->GetLevelType(source_texture->target(), 0, &source_type,
&source_internal_format);
- if (!source_texture->ValidForTexture(source_texture->target(), 0, x, y, 0,
- width, height, 1)) {
- LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopySubTextureCHROMIUM",
- "source texture bad dimensions.");
- return;
- }
GLenum dest_type = 0;
GLenum dest_internal_format = 0;
@@ -13525,6 +13526,13 @@ void GLES2DecoderImpl::DoCompressedCopySubTextureCHROMIUM(GLenum target,
return;
}
+ if (!source_texture->ValidForTexture(source_texture->target(), 0, x, y, 0,
+ width, height, 1)) {
+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedCopySubTextureCHROMIUM",
+ "source texture bad dimensions.");
+ return;
+ }
+
// Check that this type of texture is allowed.
if (!texture_manager()->ValidForTarget(source_texture->target(), 0,
source_width, source_height, 1)) {
@@ -13538,12 +13546,6 @@ void GLES2DecoderImpl::DoCompressedCopySubTextureCHROMIUM(GLenum target,
GLenum source_internal_format = 0;
source_texture->GetLevelType(source_texture->target(), 0, &source_type,
&source_internal_format);
- if (!source_texture->ValidForTexture(source_texture->target(), 0, x, y, 0,
- width, height, 1)) {
- LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCompressedCopySubTextureCHROMIUM",
- "source texture bad dimensions.");
- return;
- }
GLenum dest_type = 0;
GLenum dest_internal_format = 0;
« 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