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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 int plane_z_order, | 63 int plane_z_order, |
64 gfx::OverlayTransform plane_transform, | 64 gfx::OverlayTransform plane_transform, |
65 const gfx::Rect& display_bounds, | 65 const gfx::Rect& display_bounds, |
66 const gfx::RectF& crop_rect) override; | 66 const gfx::RectF& crop_rect) override; |
67 gfx::NativePixmapHandle ExportHandle() override; | 67 gfx::NativePixmapHandle ExportHandle() override; |
68 | 68 |
69 scoped_refptr<GbmBuffer> buffer() { return buffer_; } | 69 scoped_refptr<GbmBuffer> buffer() { return buffer_; } |
70 | 70 |
71 private: | 71 private: |
72 ~GbmPixmap() override; | 72 ~GbmPixmap() override; |
73 bool ShouldApplyProcessing(const gfx::Rect& display_bounds, | 73 scoped_refptr<ScanoutBuffer> ProcessBuffer(const gfx::Size& size, |
74 const gfx::RectF& crop_rect, | 74 uint32_t format); |
75 gfx::Size* target_size, | |
76 gfx::BufferFormat* target_format); | |
77 | 75 |
78 scoped_refptr<GbmBuffer> buffer_; | 76 scoped_refptr<GbmBuffer> buffer_; |
79 base::ScopedFD dma_buf_; | 77 base::ScopedFD dma_buf_; |
80 int dma_buf_pitch_ = -1; | 78 int dma_buf_pitch_ = -1; |
81 | 79 |
82 GbmSurfaceFactory* surface_manager_; | 80 GbmSurfaceFactory* surface_manager_; |
83 | 81 |
82 scoped_refptr<GbmPixmap> processed_pixmap_; | |
dnicoara
2016/01/14 19:30:02
nit: Would you mind adding a comment for this.
kalyank
2016/01/14 20:36:54
Done.
| |
84 ProcessingCallback processing_callback_; | 83 ProcessingCallback processing_callback_; |
85 | 84 |
86 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 85 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
87 }; | 86 }; |
88 | 87 |
89 } // namespace ui | 88 } // namespace ui |
90 | 89 |
91 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 90 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
OLD | NEW |