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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/gfx/geometry/size.h" | 10 #include "ui/gfx/geometry/size.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 // NativePixmap: | 45 // NativePixmap: |
46 void* GetEGLClientBuffer() override; | 46 void* GetEGLClientBuffer() override; |
47 int GetDmaBufFd() override; | 47 int GetDmaBufFd() override; |
48 int GetDmaBufPitch() override; | 48 int GetDmaBufPitch() override; |
49 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 49 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
50 int plane_z_order, | 50 int plane_z_order, |
51 gfx::OverlayTransform plane_transform, | 51 gfx::OverlayTransform plane_transform, |
52 const gfx::Rect& display_bounds, | 52 const gfx::Rect& display_bounds, |
53 const gfx::RectF& crop_rect) override; | 53 const gfx::RectF& crop_rect) override; |
| 54 BufferUsage GetBufferUsage() const override; |
| 55 void* Map() override; |
| 56 void Unmap() override; |
54 | 57 |
55 scoped_refptr<GbmBuffer> buffer() { return buffer_; } | 58 scoped_refptr<GbmBuffer> buffer() { return buffer_; } |
56 | 59 |
57 private: | 60 private: |
58 ~GbmPixmap() override; | 61 ~GbmPixmap() override; |
59 bool ShouldApplyScaling(const gfx::Rect& display_bounds, | 62 bool ShouldApplyScaling(const gfx::Rect& display_bounds, |
60 const gfx::RectF& crop_rect, | 63 const gfx::RectF& crop_rect, |
61 gfx::Size* required_size); | 64 gfx::Size* required_size); |
62 | 65 |
63 scoped_refptr<GbmBuffer> buffer_; | 66 scoped_refptr<GbmBuffer> buffer_; |
64 int dma_buf_ = -1; | 67 int dma_buf_ = -1; |
65 | 68 |
66 ScreenManager* screen_manager_; // Not owned. | 69 ScreenManager* screen_manager_; // Not owned. |
67 | 70 |
68 ScalingCallback scaling_callback_; | 71 ScalingCallback scaling_callback_; |
69 | 72 |
70 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 73 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
71 }; | 74 }; |
72 | 75 |
73 } // namespace ui | 76 } // namespace ui |
74 | 77 |
75 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 78 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
OLD | NEW |