| 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_BASE_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_ |
| 7 | 7 |
| 8 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" | 8 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h" |
| 9 | 9 |
| 10 struct gbm_bo; | 10 struct gbm_bo; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 gbm_bo* bo() const { return bo_; } | 22 gbm_bo* bo() const { return bo_; } |
| 23 | 23 |
| 24 // ScanoutBuffer: | 24 // ScanoutBuffer: |
| 25 uint32_t GetFramebufferId() const override; | 25 uint32_t GetFramebufferId() const override; |
| 26 uint32_t GetHandle() const override; | 26 uint32_t GetHandle() const override; |
| 27 gfx::Size GetSize() const override; | 27 gfx::Size GetSize() const override; |
| 28 uint32_t GetFramebufferPixelFormat() const override; | 28 uint32_t GetFramebufferPixelFormat() const override; |
| 29 bool RequiresGlFinish() const override; | 29 bool RequiresGlFinish() const override; |
| 30 | 30 |
| 31 protected: | 31 protected: |
| 32 GbmBufferBase(const scoped_refptr<DrmDevice>& drm, gbm_bo* bo, bool scanout); | 32 GbmBufferBase(const scoped_refptr<DrmDevice>& drm, |
| 33 gbm_bo* bo, |
| 34 gfx::BufferFormat format, |
| 35 gfx::BufferUsage usage); |
| 33 ~GbmBufferBase() override; | 36 ~GbmBufferBase() override; |
| 34 | 37 |
| 35 private: | 38 private: |
| 36 scoped_refptr<DrmDevice> drm_; | 39 scoped_refptr<DrmDevice> drm_; |
| 37 gbm_bo* bo_; | 40 gbm_bo* bo_; |
| 38 uint32_t framebuffer_ = 0; | 41 uint32_t framebuffer_ = 0; |
| 39 uint32_t fb_pixel_format_ = 0; | 42 uint32_t framebuffer_pixel_format_ = 0; |
| 40 | 43 |
| 41 DISALLOW_COPY_AND_ASSIGN(GbmBufferBase); | 44 DISALLOW_COPY_AND_ASSIGN(GbmBufferBase); |
| 42 }; | 45 }; |
| 43 | 46 |
| 44 } // namespace ui | 47 } // namespace ui |
| 45 | 48 |
| 46 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_ | 49 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_BASE_H_ |
| OLD | NEW |