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_CRTC_CONTROLLER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_CRTC_CONTROLLER_H_ |
6 #define UI_OZONE_PLATFORM_DRM_GPU_CRTC_CONTROLLER_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_CRTC_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> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 bool SetCursor(const scoped_refptr<ScanoutBuffer>& buffer); | 70 bool SetCursor(const scoped_refptr<ScanoutBuffer>& buffer); |
71 bool MoveCursor(const gfx::Point& location); | 71 bool MoveCursor(const gfx::Point& location); |
72 | 72 |
73 private: | 73 private: |
74 bool ResetCursor(); | 74 bool ResetCursor(); |
75 | 75 |
76 void SignalPageFlipRequest(); | 76 void SignalPageFlipRequest(); |
77 | 77 |
78 scoped_refptr<DrmDevice> drm_; | 78 scoped_refptr<DrmDevice> drm_; |
79 | 79 |
| 80 HardwareDisplayPlane* cursor_plane_; // Not owned. |
| 81 |
80 // Buffers need to be declared first so that they are destroyed last. Needed | 82 // Buffers need to be declared first so that they are destroyed last. Needed |
81 // since the controllers may reference the buffers. | 83 // since the controllers may reference the buffers. |
82 OverlayPlaneList current_planes_; | 84 OverlayPlaneList current_planes_; |
83 OverlayPlaneList pending_planes_; | 85 OverlayPlaneList pending_planes_; |
84 scoped_refptr<ScanoutBuffer> cursor_buffer_; | 86 scoped_refptr<ScanoutBuffer> cursor_buffer_; |
85 scoped_refptr<PageFlipRequest> page_flip_request_; | 87 scoped_refptr<PageFlipRequest> page_flip_request_; |
86 | 88 |
87 uint32_t crtc_; | 89 uint32_t crtc_; |
88 | 90 |
89 // TODO(dnicoara) Add support for hardware mirroring (multiple connectors). | 91 // TODO(dnicoara) Add support for hardware mirroring (multiple connectors). |
90 uint32_t connector_; | 92 uint32_t connector_; |
91 | 93 |
92 drmModeModeInfo mode_; | 94 drmModeModeInfo mode_; |
93 | 95 |
94 // Keeps track of the CRTC state. If a surface has been bound, then the value | 96 // Keeps track of the CRTC state. If a surface has been bound, then the value |
95 // is set to false. Otherwise it is true. | 97 // is set to false. Otherwise it is true. |
96 bool is_disabled_ = true; | 98 bool is_disabled_ = true; |
97 | 99 |
98 // The time of the last page flip event as reported by the kernel callback. | 100 // The time of the last page flip event as reported by the kernel callback. |
99 uint64_t time_of_last_flip_ = 0; | 101 uint64_t time_of_last_flip_ = 0; |
100 | 102 |
101 DISALLOW_COPY_AND_ASSIGN(CrtcController); | 103 DISALLOW_COPY_AND_ASSIGN(CrtcController); |
102 }; | 104 }; |
103 | 105 |
104 } // namespace ui | 106 } // namespace ui |
105 | 107 |
106 #endif // UI_OZONE_PLATFORM_DRM_GPU_CRTC_CONTROLLER_H_ | 108 #endif // UI_OZONE_PLATFORM_DRM_GPU_CRTC_CONTROLLER_H_ |
OLD | NEW |