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

Unified Diff: ui/gfx/gpu_memory_buffer.h

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header 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/BUILD.gn ('k') | ui/gfx/gpu_memory_buffer.cc » ('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 51731d909581e37eaab8489dea56f0d69b1cf30f..829865e283c39dcdd4c0fc1726d79e7a04a37b0a 100644
--- a/ui/gfx/gpu_memory_buffer.h
+++ b/ui/gfx/gpu_memory_buffer.h
@@ -9,10 +9,6 @@
#include "build/build_config.h"
#include "ui/gfx/gfx_export.h"
-#if defined(USE_X11)
-#include "ui/gfx/x/x11_types.h"
-#endif
-
extern "C" typedef struct _ClientBuffer* ClientBuffer;
namespace gfx {
@@ -22,27 +18,20 @@ enum GpuMemoryBufferType {
SHARED_MEMORY_BUFFER,
IO_SURFACE_BUFFER,
SURFACE_TEXTURE_BUFFER,
- X11_PIXMAP_BUFFER,
OZONE_NATIVE_BUFFER,
GPU_MEMORY_BUFFER_TYPE_LAST = OZONE_NATIVE_BUFFER
};
-struct GpuMemoryBufferId {
- GpuMemoryBufferId() : primary_id(0), secondary_id(0) {}
- GpuMemoryBufferId(int32 primary_id, int32 secondary_id)
- : primary_id(primary_id), secondary_id(secondary_id) {}
- int32 primary_id;
- int32 secondary_id;
-};
+using GpuMemoryBufferId = int32;
struct GFX_EXPORT GpuMemoryBufferHandle {
GpuMemoryBufferHandle();
bool is_null() const { return type == EMPTY_BUFFER; }
GpuMemoryBufferType type;
+ GpuMemoryBufferId id;
base::SharedMemoryHandle handle;
- GpuMemoryBufferId global_id;
-#if defined(USE_X11)
- XID pixmap;
+#if defined(OS_MACOSX)
+ uint32 io_surface_id;
#endif
};
@@ -67,7 +56,10 @@ class GFX_EXPORT GpuMemoryBuffer {
// 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.
- enum Usage { MAP, SCANOUT, USAGE_LAST = SCANOUT };
+ // 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() {}
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/gpu_memory_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698