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> |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 const drmModeModeInfo& get_mode() const { return mode_; }; | 135 const drmModeModeInfo& get_mode() const { return mode_; }; |
136 uint32_t connector_id() const { return connector_id_; } | 136 uint32_t connector_id() const { return connector_id_; } |
137 uint32_t crtc_id() const { return crtc_id_; } | 137 uint32_t crtc_id() const { return crtc_id_; } |
138 DriSurface* get_surface() const { return surface_.get(); }; | 138 DriSurface* get_surface() const { return surface_.get(); }; |
139 | 139 |
140 uint64_t get_time_of_last_flip() const { | 140 uint64_t get_time_of_last_flip() const { |
141 return time_of_last_flip_; | 141 return time_of_last_flip_; |
142 }; | 142 }; |
143 | 143 |
144 private: | 144 private: |
145 bool RegisterFramebuffers(DriSurface* surface, drmModeModeInfo mode); | |
146 void UnregisterFramebuffers(DriSurface* surface); | |
147 | |
148 // Object containing the connection to the graphics device and wraps the API | 145 // Object containing the connection to the graphics device and wraps the API |
149 // calls to control it. | 146 // calls to control it. |
150 DriWrapper* drm_; | 147 DriWrapper* drm_; |
151 | 148 |
152 // TODO(dnicoara) Need to allow a CRTC to have multiple connectors. | 149 // TODO(dnicoara) Need to allow a CRTC to have multiple connectors. |
153 uint32_t connector_id_; | 150 uint32_t connector_id_; |
154 | 151 |
155 uint32_t crtc_id_; | 152 uint32_t crtc_id_; |
156 | 153 |
157 // TODO(dnicoara) Need to store all the modes. | 154 // TODO(dnicoara) Need to store all the modes. |
158 drmModeModeInfo mode_; | 155 drmModeModeInfo mode_; |
159 | 156 |
160 scoped_ptr<DriSurface> surface_; | 157 scoped_ptr<DriSurface> surface_; |
161 | 158 |
162 uint64_t time_of_last_flip_; | 159 uint64_t time_of_last_flip_; |
163 | 160 |
164 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController); | 161 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController); |
165 }; | 162 }; |
166 | 163 |
167 } // namespace ui | 164 } // namespace ui |
168 | 165 |
169 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ | 166 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ |
OLD | NEW |