Index: ui/ozone/platform/drm/gpu/hardware_display_controller.cc |
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc |
index 3f31b6ef962e7507af8b2ce0ecb58115cc4afbbc..6a7e2c8e7f3a052886a91e11458d13ae2e63e13b 100644 |
--- a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc |
+++ b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc |
@@ -71,7 +71,15 @@ 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 if (!pending_planes_.empty()) |
+ primary = OverlayPlane::GetPrimaryPlane(pending_planes_); |
+ else |
+ primary = OverlayPlane::GetPrimaryPlane(current_planes_); |
spang
2015/03/27 21:26:11
I agree with Dominic.. is it really necessary to d
dnicoara
2015/03/27 21:28:21
The Browser treats display configuration and buffe
|
return Modeset(*primary, mode_); |
} |