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/buffer_types.h" | 10 #include "ui/gfx/buffer_types.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 bool ExportHandle(gfx::NativePixmapHandle* handle) override; |
54 | 55 |
55 scoped_refptr<GbmBuffer> buffer() { return buffer_; } | 56 scoped_refptr<GbmBuffer> buffer() { return buffer_; } |
56 | 57 |
57 private: | 58 private: |
58 ~GbmPixmap() override; | 59 ~GbmPixmap() override; |
59 bool ShouldApplyScaling(const gfx::Rect& display_bounds, | 60 bool ShouldApplyScaling(const gfx::Rect& display_bounds, |
60 const gfx::RectF& crop_rect, | 61 const gfx::RectF& crop_rect, |
61 gfx::Size* required_size); | 62 gfx::Size* required_size); |
62 | 63 |
63 scoped_refptr<GbmBuffer> buffer_; | 64 scoped_refptr<GbmBuffer> buffer_; |
64 int dma_buf_ = -1; | 65 int dma_buf_ = -1; |
65 | 66 |
66 ScreenManager* screen_manager_; // Not owned. | 67 ScreenManager* screen_manager_; // Not owned. |
67 | 68 |
68 ScalingCallback scaling_callback_; | 69 ScalingCallback scaling_callback_; |
69 | 70 |
70 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 71 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
71 }; | 72 }; |
72 | 73 |
73 } // namespace ui | 74 } // namespace ui |
74 | 75 |
75 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 76 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
OLD | NEW |