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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 int plane_z_order, | 59 int plane_z_order, |
60 gfx::OverlayTransform plane_transform, | 60 gfx::OverlayTransform plane_transform, |
61 const gfx::Rect& display_bounds, | 61 const gfx::Rect& display_bounds, |
62 const gfx::RectF& crop_rect) override; | 62 const gfx::RectF& crop_rect) override; |
63 gfx::NativePixmapHandle ExportHandle() override; | 63 gfx::NativePixmapHandle ExportHandle() override; |
64 | 64 |
65 scoped_refptr<GbmBuffer> buffer() { return buffer_; } | 65 scoped_refptr<GbmBuffer> buffer() { return buffer_; } |
66 | 66 |
67 private: | 67 private: |
68 ~GbmPixmap() override; | 68 ~GbmPixmap() override; |
69 bool ShouldApplyProcessing(const gfx::Rect& display_bounds, | |
70 const gfx::RectF& crop_rect, | |
71 gfx::Size* target_size, | |
72 gfx::BufferFormat* target_format); | |
73 | 69 |
74 scoped_refptr<GbmBuffer> buffer_; | 70 scoped_refptr<GbmBuffer> buffer_; |
75 base::ScopedFD dma_buf_; | 71 base::ScopedFD dma_buf_; |
76 int dma_buf_pitch_ = -1; | 72 int dma_buf_pitch_ = -1; |
77 | 73 |
78 GbmSurfaceFactory* surface_manager_; | 74 GbmSurfaceFactory* surface_manager_; |
79 | 75 |
80 ProcessingCallback processing_callback_; | 76 ProcessingCallback processing_callback_; |
81 | 77 |
82 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 78 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
83 }; | 79 }; |
84 | 80 |
85 } // namespace ui | 81 } // namespace ui |
86 | 82 |
87 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 83 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
OLD | NEW |