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 GbmPixmap(const scoped_refptr<GbmBuffer>& buffer, | 44 GbmPixmap(const scoped_refptr<GbmBuffer>& buffer, |
45 GbmSurfaceFactory* surface_manager); | 45 GbmSurfaceFactory* surface_manager); |
46 bool Initialize(); | 46 bool Initialize(); |
47 void SetScalingCallback(const ScalingCallback& scaling_callback) override; | 47 void SetScalingCallback(const ScalingCallback& scaling_callback) override; |
48 scoped_refptr<NativePixmap> GetScaledPixmap(gfx::Size new_size) override; | 48 scoped_refptr<NativePixmap> GetScaledPixmap(gfx::Size new_size) override; |
49 | 49 |
50 // NativePixmap: | 50 // NativePixmap: |
51 void* GetEGLClientBuffer() override; | 51 void* GetEGLClientBuffer() override; |
52 int GetDmaBufFd() override; | 52 int GetDmaBufFd() override; |
53 int GetDmaBufPitch() override; | 53 int GetDmaBufPitch() override; |
54 gfx::BufferFormat GetPixelFormat() override; | |
spang
2015/10/23 17:00:50
It's gfx::BufferFormat so GetBufferFormat().
william.xie1
2015/10/23 22:52:19
Done.
| |
54 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 55 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
55 int plane_z_order, | 56 int plane_z_order, |
56 gfx::OverlayTransform plane_transform, | 57 gfx::OverlayTransform plane_transform, |
57 const gfx::Rect& display_bounds, | 58 const gfx::Rect& display_bounds, |
58 const gfx::RectF& crop_rect) override; | 59 const gfx::RectF& crop_rect) override; |
59 gfx::NativePixmapHandle ExportHandle() override; | 60 gfx::NativePixmapHandle ExportHandle() override; |
60 | 61 |
61 scoped_refptr<GbmBuffer> buffer() { return buffer_; } | 62 scoped_refptr<GbmBuffer> buffer() { return buffer_; } |
62 | 63 |
63 private: | 64 private: |
64 ~GbmPixmap() override; | 65 ~GbmPixmap() override; |
65 bool ShouldApplyScaling(const gfx::Rect& display_bounds, | 66 bool ShouldApplyScaling(const gfx::Rect& display_bounds, |
66 const gfx::RectF& crop_rect, | 67 const gfx::RectF& crop_rect, |
67 gfx::Size* required_size); | 68 gfx::Size* required_size); |
68 | 69 |
69 scoped_refptr<GbmBuffer> buffer_; | 70 scoped_refptr<GbmBuffer> buffer_; |
70 int dma_buf_ = -1; | 71 int dma_buf_ = -1; |
71 | 72 |
72 GbmSurfaceFactory* surface_manager_; | 73 GbmSurfaceFactory* surface_manager_; |
73 | 74 |
74 ScalingCallback scaling_callback_; | 75 ScalingCallback scaling_callback_; |
75 | 76 |
76 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); | 77 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); |
77 }; | 78 }; |
78 | 79 |
79 } // namespace ui | 80 } // namespace ui |
80 | 81 |
81 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ | 82 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ |
OLD | NEW |