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/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "ui/gfx/buffer_types.h" | 10 #include "ui/gfx/buffer_types.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 // NativePixmap: | 53 // NativePixmap: |
54 void* GetEGLClientBuffer() const override; | 54 void* GetEGLClientBuffer() const override; |
55 int GetDmaBufFd() const override; | 55 int GetDmaBufFd() const override; |
56 int GetDmaBufPitch() const override; | 56 int GetDmaBufPitch() const override; |
57 gfx::BufferFormat GetBufferFormat() const override; | 57 gfx::BufferFormat GetBufferFormat() const override; |
58 gfx::Size GetBufferSize() const override; | 58 gfx::Size GetBufferSize() const override; |
59 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 59 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
60 int plane_z_order, | 60 int plane_z_order, |
61 gfx::OverlayTransform plane_transform, | 61 gfx::OverlayTransform plane_transform, |
| 62 gfx::BufferFormat storage_format, |
62 const gfx::Rect& display_bounds, | 63 const gfx::Rect& display_bounds, |
63 const gfx::RectF& crop_rect) override; | 64 const gfx::RectF& crop_rect, |
| 65 bool handle_scaling) override; |
64 gfx::NativePixmapHandle ExportHandle() override; | 66 gfx::NativePixmapHandle ExportHandle() override; |
65 | 67 |
66 scoped_refptr<GbmBuffer> buffer() { return buffer_; } | 68 scoped_refptr<GbmBuffer> buffer() { return buffer_; } |
67 | 69 |
68 private: | 70 private: |
69 ~GbmPixmap() override; | 71 ~GbmPixmap() override; |
70 bool ShouldApplyProcessing(const gfx::Rect& display_bounds, | 72 bool ShouldScaleContent(const gfx::Rect& display_bounds, |
71 const gfx::RectF& crop_rect, | 73 const gfx::RectF& crop_rect, |
72 gfx::Size* target_size, | 74 gfx::Size* target_size); |
73 gfx::BufferFormat* target_format); | |
74 | 75 |
75 scoped_refptr<GbmBuffer> buffer_; | 76 scoped_refptr<GbmBuffer> buffer_; |
76 base::ScopedFD dma_buf_; | 77 base::ScopedFD dma_buf_; |
77 int dma_buf_pitch_ = -1; | 78 int dma_buf_pitch_ = -1; |
78 | 79 |
79 GbmSurfaceFactory* surface_manager_; | 80 GbmSurfaceFactory* surface_manager_; |
80 | 81 |
81 ProcessingCallback processing_callback_; | 82 ProcessingCallback processing_callback_; |
82 | 83 |
83 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 84 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
84 }; | 85 }; |
85 | 86 |
86 } // namespace ui | 87 } // namespace ui |
87 | 88 |
88 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 89 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
OLD | NEW |