| 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);
|
| }
|
|
|