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

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: add comments and DCHECK 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
« cc/resources/resource_provider.cc ('K') | « 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..05bb9d71697e9a0d9ff0b7340c45b4d400310258 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -3908,6 +3908,10 @@ void GLES2Implementation::GetImageParameterivCHROMIUMHelper(
return;
}
+ // In Android, the SurfaceTexture based GpuMemoryBuffer can only get the
+ // exact stride after it is mapped. Here it would be better to ensure that
+ // it maps image first and then calls GetStride().
reveman 2014/03/03 16:57:48 Same thing here. I would prefer no platform/implem
junj 2014/03/04 11:11:23 Done.
+ DCHECK(gpu_buffer->IsMapped());
*params = gpu_buffer->GetStride();
}
« cc/resources/resource_provider.cc ('K') | « cc/resources/resource_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698