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

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

Issue 13543007: GLImage support for Android zero-copy pixel buffers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add expectations to the unittests for GetErrors() coming from the suppressor Created 7 years, 8 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 d72d5d241ee6ad18d6d046139476dea4fe4301fa..83269fefa9ffe3c5814d95acfaad2b5687788455 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -10149,11 +10149,15 @@ void GLES2DecoderImpl::DoBindTexImage2DCHROMIUM(
return;
}
- if (!gl_image->BindTexImage()) {
- LOCAL_SET_GL_ERROR(
- GL_INVALID_OPERATION,
- "glBindTexImage2DCHROMIUM", "fail to bind image with the given ID");
- return;
+ {
+ ScopedGLErrorSuppressor suppressor(
+ "GLES2DecoderImpl::DoBindTexImage2DCHROMIUM", this);
+ if (!gl_image->BindTexImage()) {
+ LOCAL_SET_GL_ERROR(
+ GL_INVALID_OPERATION,
+ "glBindTexImage2DCHROMIUM", "fail to bind image with the given ID");
+ return;
+ }
}
gfx::Size size = gl_image->GetSize();
@@ -10196,7 +10200,11 @@ void GLES2DecoderImpl::DoReleaseTexImage2DCHROMIUM(
if (texture->GetLevelImage(target, 0) != gl_image)
return;
- gl_image->ReleaseTexImage();
+ {
+ ScopedGLErrorSuppressor suppressor(
+ "GLES2DecoderImpl::DoReleaseTexImage2DCHROMIUM", this);
+ gl_image->ReleaseTexImage();
+ }
texture_manager()->SetLevelInfo(
texture, target, 0, GL_RGBA, 0, 0, 1, 0,

Powered by Google App Engine
This is Rietveld 408576698