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

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: 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..ea9ebb19308786e40c9de71673f98b37af272ab2 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
@@ -39,7 +39,7 @@ GpuMemoryBufferFactorySharedMemory::CreateGpuMemoryBuffer(
gfx::PluginWindowHandle surface_handle) {
base::SharedMemory shared_memory;
if (!shared_memory.CreateAnonymous(
- size.GetArea() * GpuMemoryBufferImpl::BytesPerPixel(format)))
+ GpuMemoryBufferImpl::PixelsToBytes(size.GetArea(), format)))
return gfx::GpuMemoryBufferHandle();
gfx::GpuMemoryBufferHandle handle;

Powered by Google App Engine
This is Rietveld 408576698