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

Unified Diff: ui/gfx/gpu_memory_buffer.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 | « ui/gfx/buffer_types.h ('k') | ui/gfx/ipc/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gpu_memory_buffer.h
diff --git a/ui/gfx/gpu_memory_buffer.h b/ui/gfx/gpu_memory_buffer.h
index 23bee9dbd42a7c0bb79d884c6feeb4060d3ab64d..263a0ef41da40ddd140556c2ccc0d73d51a30afe 100644
--- a/ui/gfx/gpu_memory_buffer.h
+++ b/ui/gfx/gpu_memory_buffer.h
@@ -8,6 +8,7 @@
#include "base/memory/shared_memory.h"
#include "base/trace_event/memory_dump_manager.h"
#include "build/build_config.h"
+#include "ui/gfx/buffer_types.h"
#include "ui/gfx/gfx_export.h"
extern "C" typedef struct _ClientBuffer* ClientBuffer;
@@ -42,31 +43,6 @@ GetGpuMemoryBufferGUIDForTracing(uint64 tracing_process_id,
// regular CPU code, but can also be read by the GPU.
class GFX_EXPORT GpuMemoryBuffer {
public:
- // The format needs to be taken into account when mapping a buffer into the
- // client's address space.
- enum Format {
- ATC,
- ATCIA,
- DXT1,
- DXT5,
- ETC1,
- R_8,
- RGBA_4444,
- RGBA_8888,
- RGBX_8888,
- BGRA_8888,
- YUV_420,
-
- FORMAT_LAST = YUV_420
- };
-
- // The usage mode affects how a buffer can be used. Only buffers created with
- // MAP can be mapped into the client's address space and accessed by the CPU.
- // PERSISTENT_MAP adds the additional condition that successive Map() calls
- // (with Unmap() calls between) will return a pointer to the same memory
- // contents.
- enum Usage { MAP, PERSISTENT_MAP, SCANOUT, USAGE_LAST = SCANOUT };
-
virtual ~GpuMemoryBuffer() {}
// Maps each plane of the buffer into the client's address space so it can be
@@ -84,7 +60,7 @@ class GFX_EXPORT GpuMemoryBuffer {
virtual bool IsMapped() const = 0;
// Returns the format for the buffer.
- virtual Format GetFormat() const = 0;
+ virtual BufferFormat GetFormat() const = 0;
// Fills the stride in bytes for each plane of the buffer. The stride of
// plane K is stored at index K-1 of the |stride| array.
« no previous file with comments | « ui/gfx/buffer_types.h ('k') | ui/gfx/ipc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698