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

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

Issue 2042553002: Mac CoreAnimation compositor in the browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock_directly
Patch Set: Created 4 years, 6 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/accelerated_widget_mac/ca_layer_tree_coordinator.mm ('k') | no next file » | 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
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 GetGpuMemoryBufferGUIDForTracing(uint64_t tracing_process_id, 58 GetGpuMemoryBufferGUIDForTracing(uint64_t tracing_process_id,
59 GpuMemoryBufferId buffer_id); 59 GpuMemoryBufferId buffer_id);
60 60
61 // This interface typically correspond to a type of shared memory that is also 61 // This interface typically correspond to a type of shared memory that is also
62 // shared with the GPU. A GPU memory buffer can be written to directly by 62 // shared with the GPU. A GPU memory buffer can be written to directly by
63 // regular CPU code, but can also be read by the GPU. 63 // regular CPU code, but can also be read by the GPU.
64 class GFX_EXPORT GpuMemoryBuffer { 64 class GFX_EXPORT GpuMemoryBuffer {
65 public: 65 public:
66 virtual ~GpuMemoryBuffer() {} 66 virtual ~GpuMemoryBuffer() {}
67 67
68 virtual void* GetIOSurface() = 0;
69
68 // Maps each plane of the buffer into the client's address space so it can be 70 // Maps each plane of the buffer into the client's address space so it can be
69 // written to by the CPU. This call may block, for instance if the GPU needs 71 // written to by the CPU. This call may block, for instance if the GPU needs
70 // to finish accessing the buffer or if CPU caches need to be synchronized. 72 // to finish accessing the buffer or if CPU caches need to be synchronized.
71 // Returns false on failure. 73 // Returns false on failure.
72 virtual bool Map() = 0; 74 virtual bool Map() = 0;
73 75
74 // Returns a pointer to the memory address of a plane. Buffer must have been 76 // Returns a pointer to the memory address of a plane. Buffer must have been
75 // successfully mapped using a call to Map() before calling this function. 77 // successfully mapped using a call to Map() before calling this function.
76 virtual void* memory(size_t plane) = 0; 78 virtual void* memory(size_t plane) = 0;
77 79
(...skipping 24 matching lines...) Expand all
102 // Returns a platform specific handle for this buffer. 104 // Returns a platform specific handle for this buffer.
103 virtual GpuMemoryBufferHandle GetHandle() const = 0; 105 virtual GpuMemoryBufferHandle GetHandle() const = 0;
104 106
105 // Type-checking downcast routine. 107 // Type-checking downcast routine.
106 virtual ClientBuffer AsClientBuffer() = 0; 108 virtual ClientBuffer AsClientBuffer() = 0;
107 }; 109 };
108 110
109 } // namespace gfx 111 } // namespace gfx
110 112
111 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ 113 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_
OLDNEW
« no previous file with comments | « ui/accelerated_widget_mac/ca_layer_tree_coordinator.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698