diff options
Diffstat (limited to 'ui/ozone/platform/drm/gpu/hardware_display_controller.cc')
-rw-r--r-- | ui/ozone/platform/drm/gpu/hardware_display_controller.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc index 3f31b6e..4371963 100644 --- a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc +++ b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc @@ -56,7 +56,6 @@ bool HardwareDisplayController::Modeset(const OverlayPlane& primary, mode_ = mode; current_planes_ = std::vector<OverlayPlane>(1, primary); - pending_planes_.clear(); ClearPendingRequests(); // Because a page flip is pending we need to leave some state for the @@ -71,7 +70,13 @@ bool HardwareDisplayController::Modeset(const OverlayPlane& primary, bool HardwareDisplayController::Enable() { TRACE_EVENT0("drm", "HDC::Enable"); DCHECK(!current_planes_.empty()); - const OverlayPlane* primary = OverlayPlane::GetPrimaryPlane(current_planes_); + + const OverlayPlane* primary = nullptr; + // Use the last scheduled buffer to modeset to preserve request order. + if (!requests_.empty()) + primary = OverlayPlane::GetPrimaryPlane(requests_.back().planes); + else + primary = OverlayPlane::GetPrimaryPlane(current_planes_); return Modeset(*primary, mode_); } |