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

Unified Diff: ui/ozone/platform/drm/gpu/hardware_display_controller.cc

Issue 1041823002: [Ozone-Drm] Pick pending buffer over current buffer when modesetting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 9 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 | « ui/ozone/platform/drm/gpu/hardware_display_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..43719632e6a4cac62e275de5cad7b1f6cb58d25b 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_);
}
« no previous file with comments | « ui/ozone/platform/drm/gpu/hardware_display_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698