| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 virtual BufferFormat GetFormat() const = 0; | 82 virtual BufferFormat GetFormat() const = 0; |
| 83 | 83 |
| 84 // Fills the stride in bytes for each plane of the buffer. The stride of | 84 // Fills the stride in bytes for each plane of the buffer. The stride of |
| 85 // plane K is stored at index K-1 of the |stride| array. | 85 // plane K is stored at index K-1 of the |stride| array. |
| 86 virtual int stride(size_t plane) const = 0; | 86 virtual int stride(size_t plane) const = 0; |
| 87 | 87 |
| 88 // Set the color space in which this buffer should be interpreted when used | 88 // Set the color space in which this buffer should be interpreted when used |
| 89 // for scanout. Note that this will not impact texturing from the buffer. | 89 // for scanout. Note that this will not impact texturing from the buffer. |
| 90 virtual void SetColorSpaceForScanout(const gfx::ColorSpace& color_space); | 90 virtual void SetColorSpaceForScanout(const gfx::ColorSpace& color_space); |
| 91 | 91 |
| 92 // Returns true if the GpuMemoryBuffer is currently being read by the |
| 93 // WindowServer and should not be written to. |
| 94 virtual bool IsInUseByMacOSWindowServer() const; |
| 95 |
| 92 // Returns a unique identifier associated with buffer. | 96 // Returns a unique identifier associated with buffer. |
| 93 virtual GpuMemoryBufferId GetId() const = 0; | 97 virtual GpuMemoryBufferId GetId() const = 0; |
| 94 | 98 |
| 95 // Returns a platform specific handle for this buffer. | 99 // Returns a platform specific handle for this buffer. |
| 96 virtual GpuMemoryBufferHandle GetHandle() const = 0; | 100 virtual GpuMemoryBufferHandle GetHandle() const = 0; |
| 97 | 101 |
| 98 // Type-checking downcast routine. | 102 // Type-checking downcast routine. |
| 99 virtual ClientBuffer AsClientBuffer() = 0; | 103 virtual ClientBuffer AsClientBuffer() = 0; |
| 100 }; | 104 }; |
| 101 | 105 |
| 102 } // namespace gfx | 106 } // namespace gfx |
| 103 | 107 |
| 104 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ | 108 #endif // UI_GFX_GPU_MEMORY_BUFFER_H_ |
| OLD | NEW |