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 #include "ui/ozone/platform/dri/hardware_display_controller.h" | 5 #include "ui/ozone/platform/dri/hardware_display_controller.h" |
6 | 6 |
7 #include <drm.h> | 7 #include <drm.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <xf86drm.h> | 10 #include <xf86drm.h> |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // If a display configuration happens mid page flip we want to make sure | 178 // If a display configuration happens mid page flip we want to make sure |
179 // the HDC won't wait for an event from a CRTC that is no longer | 179 // the HDC won't wait for an event from a CRTC that is no longer |
180 // associated with it. | 180 // associated with it. |
181 if (controller->page_flip_pending()) | 181 if (controller->page_flip_pending()) |
182 OnPageFlipEvent(); | 182 OnPageFlipEvent(); |
183 | 183 |
184 return controller.Pass(); | 184 return controller.Pass(); |
185 } | 185 } |
186 } | 186 } |
187 | 187 |
188 return scoped_ptr<CrtcController>(); | 188 return nullptr; |
189 } | 189 } |
190 | 190 |
191 bool HardwareDisplayController::HasCrtc(uint32_t crtc) const { | 191 bool HardwareDisplayController::HasCrtc(uint32_t crtc) const { |
192 for (size_t i = 0; i < crtc_controllers_.size(); ++i) | 192 for (size_t i = 0; i < crtc_controllers_.size(); ++i) |
193 if (crtc_controllers_[i]->crtc() == crtc) | 193 if (crtc_controllers_[i]->crtc() == crtc) |
194 return true; | 194 return true; |
195 | 195 |
196 return false; | 196 return false; |
197 } | 197 } |
198 | 198 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 305 |
306 void HardwareDisplayController::ClearPendingRequests() { | 306 void HardwareDisplayController::ClearPendingRequests() { |
307 while (!requests_.empty()) { | 307 while (!requests_.empty()) { |
308 PageFlipRequest request = requests_.front(); | 308 PageFlipRequest request = requests_.front(); |
309 requests_.pop_front(); | 309 requests_.pop_front(); |
310 request.callback.Run(); | 310 request.callback.Run(); |
311 } | 311 } |
312 } | 312 } |
313 | 313 |
314 } // namespace ui | 314 } // namespace ui |
OLD | NEW |