| OLD | NEW | 
|---|
| 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 15 matching lines...) Expand all  Loading... | 
| 26 | 26 | 
| 27 namespace gfx { | 27 namespace gfx { | 
| 28 | 28 | 
| 29 class ColorSpace; | 29 class ColorSpace; | 
| 30 | 30 | 
| 31 enum GpuMemoryBufferType { | 31 enum GpuMemoryBufferType { | 
| 32   EMPTY_BUFFER, | 32   EMPTY_BUFFER, | 
| 33   SHARED_MEMORY_BUFFER, | 33   SHARED_MEMORY_BUFFER, | 
| 34   IO_SURFACE_BUFFER, | 34   IO_SURFACE_BUFFER, | 
| 35   NATIVE_PIXMAP, | 35   NATIVE_PIXMAP, | 
| 36   GPU_MEMORY_BUFFER_TYPE_LAST = NATIVE_PIXMAP | 36   DIRECT_COMPOSITION, | 
|  | 37   GPU_MEMORY_BUFFER_TYPE_LAST = DIRECT_COMPOSITION | 
| 37 }; | 38 }; | 
| 38 | 39 | 
| 39 using GpuMemoryBufferId = GenericSharedMemoryId; | 40 using GpuMemoryBufferId = GenericSharedMemoryId; | 
| 40 | 41 | 
| 41 struct GFX_EXPORT GpuMemoryBufferHandle { | 42 struct GFX_EXPORT GpuMemoryBufferHandle { | 
| 42   GpuMemoryBufferHandle(); | 43   GpuMemoryBufferHandle(); | 
| 43   GpuMemoryBufferHandle(const GpuMemoryBufferHandle& other); | 44   GpuMemoryBufferHandle(const GpuMemoryBufferHandle& other); | 
| 44   ~GpuMemoryBufferHandle(); | 45   ~GpuMemoryBufferHandle(); | 
| 45   bool is_null() const { return type == EMPTY_BUFFER; } | 46   bool is_null() const { return type == EMPTY_BUFFER; } | 
| 46   GpuMemoryBufferType type; | 47   GpuMemoryBufferType type; | 
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 106 | 107 | 
| 107 // Returns an instance of |handle| which can be sent over IPC. This duplicates | 108 // Returns an instance of |handle| which can be sent over IPC. This duplicates | 
| 108 // the file-handles as appropriate, so that the IPC code take ownership of them, | 109 // the file-handles as appropriate, so that the IPC code take ownership of them, | 
| 109 // without invalidating |handle| itself. | 110 // without invalidating |handle| itself. | 
| 110 GFX_EXPORT GpuMemoryBufferHandle | 111 GFX_EXPORT GpuMemoryBufferHandle | 
| 111 CloneHandleForIPC(const GpuMemoryBufferHandle& handle); | 112 CloneHandleForIPC(const GpuMemoryBufferHandle& handle); | 
| 112 | 113 | 
| 113 }  // namespace gfx | 114 }  // namespace gfx | 
| 114 | 115 | 
| 115 #endif  // UI_GFX_GPU_MEMORY_BUFFER_H_ | 116 #endif  // UI_GFX_GPU_MEMORY_BUFFER_H_ | 
| OLD | NEW | 
|---|