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_DRI_GBM_SURFACE_FACTORY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ |
6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ | 6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ |
7 | 7 |
8 #include "ui/ozone/platform/dri/dri_surface_factory.h" | 8 #include "ui/ozone/platform/dri/dri_surface_factory.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
11 | 11 |
12 class DriWindowDelegate; | 12 class DriWindowDelegate; |
13 class DriWindowDelegateManager; | 13 class DriWindowDelegateManager; |
14 class DrmDeviceManager; | 14 class DrmDeviceManager; |
15 class GbmWrapper; | 15 class GbmDevice; |
16 | 16 |
17 class GbmSurfaceFactory : public DriSurfaceFactory { | 17 class GbmSurfaceFactory : public DriSurfaceFactory { |
18 public: | 18 public: |
19 GbmSurfaceFactory(bool allow_surfaceless); | 19 GbmSurfaceFactory(bool allow_surfaceless); |
20 ~GbmSurfaceFactory() override; | 20 ~GbmSurfaceFactory() override; |
21 | 21 |
22 void InitializeGpu(DrmDeviceManager* drm_device_manager, | 22 void InitializeGpu(DrmDeviceManager* drm_device_manager, |
23 DriWindowDelegateManager* window_manager); | 23 DriWindowDelegateManager* window_manager); |
24 | 24 |
25 // DriSurfaceFactory: | 25 // DriSurfaceFactory: |
(...skipping 19 matching lines...) Expand all Loading... |
45 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 45 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
46 int plane_z_order, | 46 int plane_z_order, |
47 gfx::OverlayTransform plane_transform, | 47 gfx::OverlayTransform plane_transform, |
48 scoped_refptr<NativePixmap> buffer, | 48 scoped_refptr<NativePixmap> buffer, |
49 const gfx::Rect& display_bounds, | 49 const gfx::Rect& display_bounds, |
50 const gfx::RectF& crop_rect) override; | 50 const gfx::RectF& crop_rect) override; |
51 bool CanShowPrimaryPlaneAsOverlay() override; | 51 bool CanShowPrimaryPlaneAsOverlay() override; |
52 bool CanCreateNativePixmap(BufferUsage usage) override; | 52 bool CanCreateNativePixmap(BufferUsage usage) override; |
53 | 53 |
54 private: | 54 private: |
55 scoped_refptr<GbmWrapper> GetGbmDevice(gfx::AcceleratedWidget widget); | 55 scoped_refptr<GbmDevice> GetGbmDevice(gfx::AcceleratedWidget widget); |
56 | 56 |
57 bool allow_surfaceless_; | 57 bool allow_surfaceless_; |
58 | 58 |
59 DrmDeviceManager* drm_device_manager_; // Not owned. | 59 DrmDeviceManager* drm_device_manager_; // Not owned. |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); | 61 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace ui | 64 } // namespace ui |
65 | 65 |
66 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ | 66 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ |
OLD | NEW |