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_DRI_SURFACE_FACTORY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
6 #define UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ | 6 #define UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/ozone/public/surface_factory_ozone.h" | 9 #include "ui/ozone/public/surface_factory_ozone.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 | 12 |
13 class DriWindowDelegateManager; | 13 class DriWindowDelegateManager; |
14 class DriWrapper; | 14 class DriWrapper; |
15 class SurfaceOzoneCanvas; | 15 class SurfaceOzoneCanvas; |
16 | 16 |
17 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers. | 17 // SurfaceFactoryOzone implementation on top of DRM/KMS using dumb buffers. |
18 // This implementation is used in conjunction with the software rendering | 18 // This implementation is used in conjunction with the software rendering |
19 // path. | 19 // path. |
20 class DriSurfaceFactory : public SurfaceFactoryOzone { | 20 class DriSurfaceFactory : public SurfaceFactoryOzone { |
21 public: | 21 public: |
22 static const gfx::AcceleratedWidget kDefaultWidgetHandle; | 22 static const gfx::AcceleratedWidget kDefaultWidgetHandle; |
23 | 23 |
24 DriSurfaceFactory(DriWrapper* drm, | 24 DriSurfaceFactory(DriWrapper* drm, DriWindowDelegateManager* window_manager); |
25 DriWindowDelegateManager* window_manager); | |
26 ~DriSurfaceFactory() override; | 25 ~DriSurfaceFactory() override; |
27 | 26 |
28 // Describes the state of the hardware after initialization. | 27 // Describes the state of the hardware after initialization. |
29 enum HardwareState { | 28 enum HardwareState { |
30 UNINITIALIZED, | 29 UNINITIALIZED, |
31 INITIALIZED, | 30 INITIALIZED, |
32 FAILED, | 31 FAILED, |
33 }; | 32 }; |
34 | 33 |
35 // Open the display device. | 34 // Open the display device. |
(...skipping 14 matching lines...) Expand all Loading... |
50 DriWrapper* drm_; // Not owned. | 49 DriWrapper* drm_; // Not owned. |
51 DriWindowDelegateManager* window_manager_; // Not owned. | 50 DriWindowDelegateManager* window_manager_; // Not owned. |
52 HardwareState state_; | 51 HardwareState state_; |
53 | 52 |
54 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); | 53 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); |
55 }; | 54 }; |
56 | 55 |
57 } // namespace ui | 56 } // namespace ui |
58 | 57 |
59 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ | 58 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
OLD | NEW |