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

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

Issue 1269503007: Unify graphics buffer format & usage enums for GpuMemoryBuffer & SurfaceFactoryOzone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add header to BUILD.gn Created 5 years, 4 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
« no previous file with comments | « content/common/child_process_messages.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fa65133d5fc88c9ea56b00779063b6b339797031..9e5c7dadfea470b34a481d16c65837120863ff79 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.h
@@ -27,26 +27,27 @@ class CONTENT_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
static scoped_ptr<GpuMemoryBufferImpl> CreateFromHandle(
const gfx::GpuMemoryBufferHandle& handle,
const gfx::Size& size,
- Format format,
- Usage usage,
+ gfx::BufferFormat format,
+ gfx::BufferUsage usage,
const DestructionCallback& callback);
// Type-checking upcast routine. Returns an NULL on failure.
static GpuMemoryBufferImpl* FromClientBuffer(ClientBuffer buffer);
// Returns the number of planes based on the format of the buffer.
- static size_t NumberOfPlanesForGpuMemoryBufferFormat(Format format);
+ static size_t NumberOfPlanesForGpuMemoryBufferFormat(
+ gfx::BufferFormat format);
// Returns the subsampling factor applied to the given zero-indexed |plane| of
// the |format| both horizontally and vertically.
- static size_t SubsamplingFactor(Format format, int plane);
+ static size_t SubsamplingFactor(gfx::BufferFormat format, int plane);
// Returns the number of bytes used to store a row of the given zero-indexed
// |plane| of |format|.
// Note: This is an approximation and the exact size used by an implementation
// might be different.
static bool RowSizeInBytes(size_t width,
- Format format,
+ gfx::BufferFormat format,
int plane,
size_t* size_in_bytes);
@@ -55,12 +56,12 @@ class CONTENT_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
// Note: This is an approximation and the exact size used by an implementation
// might be different.
static bool BufferSizeInBytes(const gfx::Size& size,
- Format format,
+ gfx::BufferFormat format,
size_t* size_in_bytes);
// Overridden from gfx::GpuMemoryBuffer:
bool IsMapped() const override;
- Format GetFormat() const override;
+ gfx::BufferFormat GetFormat() const override;
gfx::GpuMemoryBufferId GetId() const override;
ClientBuffer AsClientBuffer() override;
@@ -71,12 +72,12 @@ class CONTENT_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
protected:
GpuMemoryBufferImpl(gfx::GpuMemoryBufferId id,
const gfx::Size& size,
- Format format,
+ gfx::BufferFormat format,
const DestructionCallback& callback);
const gfx::GpuMemoryBufferId id_;
const gfx::Size size_;
- const Format format_;
+ const gfx::BufferFormat format_;
const DestructionCallback callback_;
bool mapped_;
uint32 destruction_sync_point_;
« no previous file with comments | « content/common/child_process_messages.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698