| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_OZONE_PLATFORM_DRM_GPU_SCANOUT_BUFFER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_SCANOUT_BUFFER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_SCANOUT_BUFFER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_SCANOUT_BUFFER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // memory for the registered framebuffer. This can be used to check if frame | 25 // memory for the registered framebuffer. This can be used to check if frame |
| 26 // buffer is compatible with a given hardware plane. | 26 // buffer is compatible with a given hardware plane. |
| 27 virtual uint32_t GetFramebufferPixelFormat() const = 0; | 27 virtual uint32_t GetFramebufferPixelFormat() const = 0; |
| 28 | 28 |
| 29 // Handle for the buffer. This is received when allocating the buffer. | 29 // Handle for the buffer. This is received when allocating the buffer. |
| 30 virtual uint32_t GetHandle() const = 0; | 30 virtual uint32_t GetHandle() const = 0; |
| 31 | 31 |
| 32 // Size of the buffer. | 32 // Size of the buffer. |
| 33 virtual gfx::Size GetSize() const = 0; | 33 virtual gfx::Size GetSize() const = 0; |
| 34 | 34 |
| 35 // Device on which the buffer was created. |
| 36 virtual const DrmDevice* GetDrmDevice() const = 0; |
| 37 |
| 35 virtual bool RequiresGlFinish() const = 0; | 38 virtual bool RequiresGlFinish() const = 0; |
| 36 | 39 |
| 37 protected: | 40 protected: |
| 38 virtual ~ScanoutBuffer() {} | 41 virtual ~ScanoutBuffer() {} |
| 39 | 42 |
| 40 friend class base::RefCountedThreadSafe<ScanoutBuffer>; | 43 friend class base::RefCountedThreadSafe<ScanoutBuffer>; |
| 41 }; | 44 }; |
| 42 | 45 |
| 43 class ScanoutBufferGenerator { | 46 class ScanoutBufferGenerator { |
| 44 public: | 47 public: |
| 45 virtual ~ScanoutBufferGenerator() {} | 48 virtual ~ScanoutBufferGenerator() {} |
| 46 | 49 |
| 47 virtual scoped_refptr<ScanoutBuffer> Create( | 50 virtual scoped_refptr<ScanoutBuffer> Create( |
| 48 const scoped_refptr<DrmDevice>& drm, | 51 const scoped_refptr<DrmDevice>& drm, |
| 49 gfx::BufferFormat format, | 52 gfx::BufferFormat format, |
| 50 const gfx::Size& size) = 0; | 53 const gfx::Size& size) = 0; |
| 51 }; | 54 }; |
| 52 | 55 |
| 53 } // namespace ui | 56 } // namespace ui |
| 54 | 57 |
| 55 #endif // UI_OZONE_PLATFORM_DRM_GPU_SCANOUT_BUFFER_H_ | 58 #endif // UI_OZONE_PLATFORM_DRM_GPU_SCANOUT_BUFFER_H_ |
| OLD | NEW |