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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 184233002: Fix the issue that it may get wrong stride in cc::ResourceProvider::MapImage. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove platform-specific comments and generate a GL_INVALID_OPERATION Created 6 years, 10 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 | « cc/resources/resource_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index 348516da7ddae34b11eace46c45a6251dfb2f221..16f8b7edcd98c7eef5490b3424103b7bdde86e42 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -3908,6 +3908,12 @@ void GLES2Implementation::GetImageParameterivCHROMIUMHelper(
return;
}
+ if (!gpu_buffer->IsMapped()) {
+ SetGLError(GL_INVALID_OPERATION, "glGetImageParameterivCHROMIUM",
+ "MapImageCHROMIUM should be called prior to GetImageParameterivCHROMIUM");
reveman 2014/03/04 15:17:31 nit: "not mapped" is enough. also please use "git
junj 2014/03/05 07:50:57 Done.
+ return;
+ }
+
*params = gpu_buffer->GetStride();
}
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698