Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Unified Diff: ui/ozone/platform/dri/hardware_display_controller.cc

Issue 641173003: [Ozone-DRI] Fix waiting for page flips in mirror mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/ozone/platform/dri/hardware_display_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/hardware_display_controller.cc
diff --git a/ui/ozone/platform/dri/hardware_display_controller.cc b/ui/ozone/platform/dri/hardware_display_controller.cc
index 716ec383a5231d39f99c1fccba951486cf83d0cd..ee4e4a94626adf892b35a605a2b22e1ee7a540d2 100644
--- a/ui/ozone/platform/dri/hardware_display_controller.cc
+++ b/ui/ozone/platform/dri/hardware_display_controller.cc
@@ -119,7 +119,10 @@ void HardwareDisplayController::WaitForPageFlipEvent() {
bool has_pending_page_flips = false;
// Wait for the page-flips to complete.
for (size_t i = 0; i < crtc_controllers_.size(); ++i) {
- if (crtc_controllers_[i]->page_flip_pending()) {
+ // In mirror mode the page flip callbacks can happen in different order than
+ // scheduled, so we need to make sure that the event for the current CRTC is
+ // processed before moving to the next CRTC.
+ while (crtc_controllers_[i]->page_flip_pending()) {
has_pending_page_flips = true;
crtc_controllers_[i]->drm()->HandleEvent(drm_event);
}
« no previous file with comments | « no previous file | ui/ozone/platform/dri/hardware_display_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698