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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc

Issue 806653006: Update GPU memory buffers to use StrideInBytes internally. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use StrideInBytes Created 6 years 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: content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
index 9a4bdcf538cab2132266fe8de6202c1f1e7be133..026423516c42876d86ce19c55f3e96138115fe9b 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
@@ -38,8 +38,8 @@ GpuMemoryBufferFactorySharedMemory::CreateGpuMemoryBuffer(
int client_id,
gfx::PluginWindowHandle surface_handle) {
base::SharedMemory shared_memory;
- if (!shared_memory.CreateAnonymous(
- size.GetArea() * GpuMemoryBufferImpl::BytesPerPixel(format)))
+ if (!shared_memory.CreateAnonymous(GpuMemoryBufferImpl::StrideInBytes(
+ size.width(), format) * size.height()))
return gfx::GpuMemoryBufferHandle();
gfx::GpuMemoryBufferHandle handle;

Powered by Google App Engine
This is Rietveld 408576698