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_HARDWARE_DISPLAY_CONTROLLER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ |
6 #define UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ | 6 #define UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <xf86drmMode.h> | 10 #include <xf86drmMode.h> |
11 #include <deque> | 11 #include <deque> |
12 #include <map> | 12 #include <map> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/containers/scoped_ptr_hash_map.h" | 17 #include "base/containers/scoped_ptr_hash_map.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/memory/scoped_vector.h" | 19 #include "base/memory/scoped_vector.h" |
20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
| 21 #include "ui/ozone/ozone_export.h" |
21 #include "ui/ozone/platform/dri/hardware_display_plane_manager.h" | 22 #include "ui/ozone/platform/dri/hardware_display_plane_manager.h" |
22 #include "ui/ozone/platform/dri/overlay_plane.h" | 23 #include "ui/ozone/platform/dri/overlay_plane.h" |
23 #include "ui/ozone/platform/dri/page_flip_observer.h" | 24 #include "ui/ozone/platform/dri/page_flip_observer.h" |
24 | 25 |
25 namespace gfx { | 26 namespace gfx { |
26 class Point; | 27 class Point; |
27 } | 28 } |
28 | 29 |
29 namespace ui { | 30 namespace ui { |
30 | 31 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 // ^ ^ | 80 // ^ ^ |
80 // | | | 81 // | | |
81 // ---------------------- | 82 // ---------------------- |
82 // | CRTC1 | | 83 // | CRTC1 | |
83 // ---------------------- | 84 // ---------------------- |
84 // | 85 // |
85 // Note that it is possible to have more connectors than CRTCs which means that | 86 // Note that it is possible to have more connectors than CRTCs which means that |
86 // only a subset of connectors can be active independently, showing different | 87 // only a subset of connectors can be active independently, showing different |
87 // framebuffers. Though, in this case, it would be possible to have all | 88 // framebuffers. Though, in this case, it would be possible to have all |
88 // connectors active if some use the same CRTC to mirror the display. | 89 // connectors active if some use the same CRTC to mirror the display. |
89 class HardwareDisplayController | 90 class OZONE_EXPORT HardwareDisplayController |
90 : public base::SupportsWeakPtr<HardwareDisplayController>, | 91 : public base::SupportsWeakPtr<HardwareDisplayController>, |
91 public PageFlipObserver { | 92 public PageFlipObserver { |
92 public: | 93 public: |
93 explicit HardwareDisplayController(scoped_ptr<CrtcController> controller); | 94 explicit HardwareDisplayController(scoped_ptr<CrtcController> controller); |
94 ~HardwareDisplayController() override; | 95 ~HardwareDisplayController() override; |
95 | 96 |
96 // Performs the initial CRTC configuration. If successful, it will display the | 97 // Performs the initial CRTC configuration. If successful, it will display the |
97 // framebuffer for |primary| with |mode|. | 98 // framebuffer for |primary| with |mode|. |
98 bool Modeset(const OverlayPlane& primary, | 99 bool Modeset(const OverlayPlane& primary, |
99 drmModeModeInfo mode); | 100 drmModeModeInfo mode); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 drmModeModeInfo mode_; | 194 drmModeModeInfo mode_; |
194 | 195 |
195 bool is_disabled_; | 196 bool is_disabled_; |
196 | 197 |
197 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController); | 198 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController); |
198 }; | 199 }; |
199 | 200 |
200 } // namespace ui | 201 } // namespace ui |
201 | 202 |
202 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ | 203 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ |
OLD | NEW |