| 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_GBM_BUFFER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/scoped_file.h" | 10 #include "base/files/scoped_file.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 // NativePixmap: | 115 // NativePixmap: |
| 116 void* GetEGLClientBuffer() const override; | 116 void* GetEGLClientBuffer() const override; |
| 117 bool AreDmaBufFdsValid() const override; | 117 bool AreDmaBufFdsValid() const override; |
| 118 size_t GetDmaBufFdCount() const override; | 118 size_t GetDmaBufFdCount() const override; |
| 119 int GetDmaBufFd(size_t plane) const override; | 119 int GetDmaBufFd(size_t plane) const override; |
| 120 int GetDmaBufPitch(size_t plane) const override; | 120 int GetDmaBufPitch(size_t plane) const override; |
| 121 int GetDmaBufOffset(size_t plane) const override; | 121 int GetDmaBufOffset(size_t plane) const override; |
| 122 uint64_t GetDmaBufModifier(size_t plane) const override; | 122 uint64_t GetDmaBufModifier(size_t plane) const override; |
| 123 gfx::BufferFormat GetBufferFormat() const override; | 123 gfx::BufferFormat GetBufferFormat() const override; |
| 124 gfx::BufferUsage GetBufferUsage() const override; |
| 124 gfx::Size GetBufferSize() const override; | 125 gfx::Size GetBufferSize() const override; |
| 125 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 126 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 126 int plane_z_order, | 127 int plane_z_order, |
| 127 gfx::OverlayTransform plane_transform, | 128 gfx::OverlayTransform plane_transform, |
| 128 const gfx::Rect& display_bounds, | 129 const gfx::Rect& display_bounds, |
| 129 const gfx::RectF& crop_rect) override; | 130 const gfx::RectF& crop_rect) override; |
| 130 gfx::NativePixmapHandle ExportHandle() override; | 131 gfx::NativePixmapHandle ExportHandle() override; |
| 131 | 132 |
| 132 scoped_refptr<GbmBuffer> buffer() { return buffer_; } | 133 scoped_refptr<GbmBuffer> buffer() { return buffer_; } |
| 133 | 134 |
| 134 private: | 135 private: |
| 135 ~GbmPixmap() override; | 136 ~GbmPixmap() override; |
| 136 scoped_refptr<ScanoutBuffer> ProcessBuffer(const gfx::Size& size, | 137 scoped_refptr<ScanoutBuffer> ProcessBuffer(const gfx::Size& size, |
| 137 uint32_t format); | 138 uint32_t format); |
| 138 | 139 |
| 139 GbmSurfaceFactory* surface_manager_; | 140 GbmSurfaceFactory* surface_manager_; |
| 140 scoped_refptr<GbmBuffer> buffer_; | 141 scoped_refptr<GbmBuffer> buffer_; |
| 141 | 142 |
| 142 // OverlayValidator can request scaling or format conversions as needed for | 143 // OverlayValidator can request scaling or format conversions as needed for |
| 143 // this Pixmap. This holds the processed buffer. | 144 // this Pixmap. This holds the processed buffer. |
| 144 scoped_refptr<GbmPixmap> processed_pixmap_; | 145 scoped_refptr<GbmPixmap> processed_pixmap_; |
| 145 ProcessingCallback processing_callback_; | 146 ProcessingCallback processing_callback_; |
| 146 | 147 |
| 147 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 148 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
| 148 }; | 149 }; |
| 149 | 150 |
| 150 } // namespace ui | 151 } // namespace ui |
| 151 | 152 |
| 152 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 153 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
| OLD | NEW |