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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // kernel when a VBlank event finished. This allows the controller to | 61 // kernel when a VBlank event finished. This allows the controller to |
62 // update internal state and propagate the update to the surface. | 62 // update internal state and propagate the update to the surface. |
63 // The tuple (seconds, useconds) represents the event timestamp. |seconds| | 63 // The tuple (seconds, useconds) represents the event timestamp. |seconds| |
64 // represents the number of seconds while |useconds| represents the | 64 // represents the number of seconds while |useconds| represents the |
65 // microseconds (< 1 second) in the timestamp. | 65 // microseconds (< 1 second) in the timestamp. |
66 void OnPageFlipEvent(unsigned int frame, | 66 void OnPageFlipEvent(unsigned int frame, |
67 unsigned int seconds, | 67 unsigned int seconds, |
68 unsigned int useconds); | 68 unsigned int useconds); |
69 | 69 |
70 bool SetCursor(const scoped_refptr<ScanoutBuffer>& buffer); | 70 bool SetCursor(const scoped_refptr<ScanoutBuffer>& buffer); |
71 bool UnsetCursor(); | |
72 bool MoveCursor(const gfx::Point& location); | 71 bool MoveCursor(const gfx::Point& location); |
73 | 72 |
74 void AddObserver(PageFlipObserver* observer); | 73 void AddObserver(PageFlipObserver* observer); |
75 void RemoveObserver(PageFlipObserver* observer); | 74 void RemoveObserver(PageFlipObserver* observer); |
76 | 75 |
77 private: | 76 private: |
| 77 bool ResetCursor(); |
| 78 |
78 scoped_refptr<DrmDevice> drm_; | 79 scoped_refptr<DrmDevice> drm_; |
79 | 80 |
80 HardwareDisplayPlaneManager* overlay_plane_manager_; // Not owned. | 81 HardwareDisplayPlaneManager* overlay_plane_manager_; // Not owned. |
81 | 82 |
82 // Buffers need to be declared first so that they are destroyed last. Needed | 83 // Buffers need to be declared first so that they are destroyed last. Needed |
83 // since the controllers may reference the buffers. | 84 // since the controllers may reference the buffers. |
84 OverlayPlaneList current_planes_; | 85 OverlayPlaneList current_planes_; |
85 OverlayPlaneList pending_planes_; | 86 OverlayPlaneList pending_planes_; |
86 scoped_refptr<ScanoutBuffer> cursor_buffer_; | 87 scoped_refptr<ScanoutBuffer> cursor_buffer_; |
87 | 88 |
(...skipping 20 matching lines...) Expand all Loading... |
108 uint64_t time_of_last_flip_; | 109 uint64_t time_of_last_flip_; |
109 | 110 |
110 ObserverList<PageFlipObserver> observers_; | 111 ObserverList<PageFlipObserver> observers_; |
111 | 112 |
112 DISALLOW_COPY_AND_ASSIGN(CrtcController); | 113 DISALLOW_COPY_AND_ASSIGN(CrtcController); |
113 }; | 114 }; |
114 | 115 |
115 } // namespace ui | 116 } // namespace ui |
116 | 117 |
117 #endif // UI_OZONE_PLATFORM_DRM_GPU_CRTC_CONTROLLER_H_ | 118 #endif // UI_OZONE_PLATFORM_DRM_GPU_CRTC_CONTROLLER_H_ |
OLD | NEW |