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

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

Issue 2819803002: Reorganize GUIDs for GPU memory buffers (Closed)
Patch Set: Address on reviews Created 3 years, 8 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 | « ui/gfx/generic_shared_memory_id.cc ('k') | ui/gfx/gpu_memory_buffer.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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include "base/memory/shared_memory.h" 11 #include "base/memory/shared_memory.h"
12 #include "base/trace_event/memory_allocator_dump_guid.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "ui/gfx/buffer_types.h" 14 #include "ui/gfx/buffer_types.h"
14 #include "ui/gfx/generic_shared_memory_id.h" 15 #include "ui/gfx/generic_shared_memory_id.h"
15 #include "ui/gfx/geometry/rect.h" 16 #include "ui/gfx/geometry/rect.h"
16 #include "ui/gfx/gfx_export.h" 17 #include "ui/gfx/gfx_export.h"
17 18
18 #if defined(OS_LINUX) 19 #if defined(OS_LINUX)
19 #include "ui/gfx/native_pixmap_handle.h" 20 #include "ui/gfx/native_pixmap_handle.h"
20 #elif defined(OS_MACOSX) && !defined(OS_IOS) 21 #elif defined(OS_MACOSX) && !defined(OS_IOS)
21 #include "ui/gfx/mac/io_surface.h" 22 #include "ui/gfx/mac/io_surface.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual void SetColorSpaceForScanout(const gfx::ColorSpace& color_space); 91 virtual void SetColorSpaceForScanout(const gfx::ColorSpace& color_space);
91 92
92 // Returns a unique identifier associated with buffer. 93 // Returns a unique identifier associated with buffer.
93 virtual GpuMemoryBufferId GetId() const = 0; 94 virtual GpuMemoryBufferId GetId() const = 0;
94 95
95 // Returns a platform specific handle for this buffer. 96 // Returns a platform specific handle for this buffer.
96 virtual GpuMemoryBufferHandle GetHandle() const = 0; 97 virtual GpuMemoryBufferHandle GetHandle() const = 0;
97 98
98 // Type-checking downcast routine. 99 // Type-checking downcast routine.
99 virtual ClientBuffer AsClientBuffer() = 0; 100 virtual ClientBuffer AsClientBuffer() = 0;
101
102 // Returns the GUID for tracing.
103 virtual base::trace_event::MemoryAllocatorDumpGuid GetGUIDForTracing(
104 uint64_t tracing_process_id) const;
100 }; 105 };
101 106
102 // Returns an instance of |handle| which can be sent over IPC. This duplicates 107 // Returns an instance of |handle| which can be sent over IPC. This duplicates
103 // the file-handles as appropriate, so that the IPC code take ownership of them, 108 // the file-handles as appropriate, so that the IPC code take ownership of them,
104 // without invalidating |handle| itself. 109 // without invalidating |handle| itself.
105 GFX_EXPORT GpuMemoryBufferHandle 110 GFX_EXPORT GpuMemoryBufferHandle
106 CloneHandleForIPC(const GpuMemoryBufferHandle& handle); 111 CloneHandleForIPC(const GpuMemoryBufferHandle& handle);
107 112
108 } // namespace gfx 113 } // namespace gfx
109 114
110 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ 115 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_
OLDNEW
« no previous file with comments | « ui/gfx/generic_shared_memory_id.cc ('k') | ui/gfx/gpu_memory_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698