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

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

Issue 1024113003: Add multi-planar functions to GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment and typo fix. Created 5 years, 9 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.h
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.h b/content/common/gpu/client/gpu_memory_buffer_impl.h
index 61800c80f482d69ba4e2a6f0f5f01c0963232908..0283da7ffc6e2db6b2ac6edea407aaac1b70c4c2 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.h
@@ -39,8 +39,13 @@ class CONTENT_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
Format format,
size_t* stride_in_bytes);
+ // Returns the number of planes based on the format of the buffer.
+ static size_t NumberOfPlanesForGpuMemoryBufferFormat(
+ gfx::GpuMemoryBuffer::Format format);
+
// Overridden from gfx::GpuMemoryBuffer:
bool IsMapped() const override;
+ size_t GetNumberOfPlanes() const override;
Format GetFormat() const override;
ClientBuffer AsClientBuffer() override;
@@ -57,11 +62,13 @@ class CONTENT_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
const gfx::GpuMemoryBufferId id_;
const gfx::Size size_;
const Format format_;
+ const size_t num_planes_;
const DestructionCallback callback_;
bool mapped_;
uint32 destruction_sync_point_;
private:
+
DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImpl);
};

Powered by Google App Engine
This is Rietveld 408576698