| 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 14 matching lines...) Expand all Loading... |
| 25 extern "C" typedef struct _ClientBuffer* ClientBuffer; | 25 extern "C" typedef struct _ClientBuffer* ClientBuffer; |
| 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 SURFACE_TEXTURE_BUFFER, | |
| 36 OZONE_NATIVE_PIXMAP, | 35 OZONE_NATIVE_PIXMAP, |
| 37 GPU_MEMORY_BUFFER_TYPE_LAST = OZONE_NATIVE_PIXMAP | 36 GPU_MEMORY_BUFFER_TYPE_LAST = OZONE_NATIVE_PIXMAP |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 using GpuMemoryBufferId = GenericSharedMemoryId; | 39 using GpuMemoryBufferId = GenericSharedMemoryId; |
| 41 | 40 |
| 42 struct GFX_EXPORT GpuMemoryBufferHandle { | 41 struct GFX_EXPORT GpuMemoryBufferHandle { |
| 43 GpuMemoryBufferHandle(); | 42 GpuMemoryBufferHandle(); |
| 44 GpuMemoryBufferHandle(const GpuMemoryBufferHandle& other); | 43 GpuMemoryBufferHandle(const GpuMemoryBufferHandle& other); |
| 45 ~GpuMemoryBufferHandle(); | 44 ~GpuMemoryBufferHandle(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // Returns a platform specific handle for this buffer. | 100 // Returns a platform specific handle for this buffer. |
| 102 virtual GpuMemoryBufferHandle GetHandle() const = 0; | 101 virtual GpuMemoryBufferHandle GetHandle() const = 0; |
| 103 | 102 |
| 104 // Type-checking downcast routine. | 103 // Type-checking downcast routine. |
| 105 virtual ClientBuffer AsClientBuffer() = 0; | 104 virtual ClientBuffer AsClientBuffer() = 0; |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 } // namespace gfx | 107 } // namespace gfx |
| 109 | 108 |
| 110 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ | 109 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ |
| OLD | NEW |