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

Side by Side Diff: ui/gfx/gpu_memory_buffer.h

Issue 1240353002: ozone: rename to GpuMemoryBuffer(Factory|Impl)OzoneNativePixmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits in comments 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 unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | ui/ozone/demo/ozone_demo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_GPU_MEMORY_BUFFER_H_ 5 #ifndef UI_GFX_GPU_MEMORY_BUFFER_H_
6 #define UI_GFX_GPU_MEMORY_BUFFER_H_ 6 #define UI_GFX_GPU_MEMORY_BUFFER_H_
7 7
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/trace_event/memory_dump_manager.h" 9 #include "base/trace_event/memory_dump_manager.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "ui/gfx/gfx_export.h" 11 #include "ui/gfx/gfx_export.h"
12 12
13 extern "C" typedef struct _ClientBuffer* ClientBuffer; 13 extern "C" typedef struct _ClientBuffer* ClientBuffer;
14 14
15 namespace gfx { 15 namespace gfx {
16 16
17 enum GpuMemoryBufferType { 17 enum GpuMemoryBufferType {
18 EMPTY_BUFFER, 18 EMPTY_BUFFER,
19 SHARED_MEMORY_BUFFER, 19 SHARED_MEMORY_BUFFER,
20 IO_SURFACE_BUFFER, 20 IO_SURFACE_BUFFER,
21 SURFACE_TEXTURE_BUFFER, 21 SURFACE_TEXTURE_BUFFER,
22 OZONE_NATIVE_BUFFER, 22 OZONE_NATIVE_PIXMAP,
23 GPU_MEMORY_BUFFER_TYPE_LAST = OZONE_NATIVE_BUFFER 23 GPU_MEMORY_BUFFER_TYPE_LAST = OZONE_NATIVE_PIXMAP
24 }; 24 };
25 25
26 using GpuMemoryBufferId = int32; 26 using GpuMemoryBufferId = int32;
27 27
28 struct GFX_EXPORT GpuMemoryBufferHandle { 28 struct GFX_EXPORT GpuMemoryBufferHandle {
29 GpuMemoryBufferHandle(); 29 GpuMemoryBufferHandle();
30 bool is_null() const { return type == EMPTY_BUFFER; } 30 bool is_null() const { return type == EMPTY_BUFFER; }
31 GpuMemoryBufferType type; 31 GpuMemoryBufferType type;
32 GpuMemoryBufferId id; 32 GpuMemoryBufferId id;
33 base::SharedMemoryHandle handle; 33 base::SharedMemoryHandle handle;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Returns a platform specific handle for this buffer. 96 // Returns a platform specific handle for this buffer.
97 virtual GpuMemoryBufferHandle GetHandle() const = 0; 97 virtual GpuMemoryBufferHandle GetHandle() const = 0;
98 98
99 // Type-checking downcast routine. 99 // Type-checking downcast routine.
100 virtual ClientBuffer AsClientBuffer() = 0; 100 virtual ClientBuffer AsClientBuffer() = 0;
101 }; 101 };
102 102
103 } // namespace gfx 103 } // namespace gfx
104 104
105 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ 105 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | ui/ozone/demo/ozone_demo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698