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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h

Issue 1062853002: Add gfx::GpuMemoryBuffer::YUV_420 and GpuMemoryBufferImplSharedMemory support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h
index c7eb80ca1038b5f568241f662f06edfa9f589951..e93ab3201708fc3431dacd1759dfbce911733fa1 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h
@@ -24,6 +24,12 @@ class GpuMemoryBufferImplSharedMemory : public GpuMemoryBufferImpl {
Format format,
base::ProcessHandle child_process);
+ // Calculates the number of bytes used to store all the planes of a given
+ // |format|.
+ static bool BufferSizeInBytes(const gfx::Size& size,
+ Format format,
+ size_t* size_in_bytes);
+
static scoped_ptr<GpuMemoryBufferImpl> CreateFromHandle(
const gfx::GpuMemoryBufferHandle& handle,
const gfx::Size& size,

Powered by Google App Engine
This is Rietveld 408576698