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

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

Issue 960273003: ozone: dri: add synchronous SwapBuffers support on surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 years, 10 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
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 0bd49477e857fcabbd05c7c4a4ec1a41bf88c5dc..faee6e616e2d164ed3962763d8fb18ae2a8902c7 100644
--- a/ui/ozone/platform/dri/hardware_display_controller.cc
+++ b/ui/ozone/platform/dri/hardware_display_controller.cc
@@ -24,8 +24,9 @@ namespace ui {
HardwareDisplayController::PageFlipRequest::PageFlipRequest(
const OverlayPlaneList& planes,
+ bool is_sync,
const base::Closure& callback)
- : planes(planes), callback(callback) {
+ : planes(planes), is_sync(is_sync), callback(callback) {
}
HardwareDisplayController::PageFlipRequest::~PageFlipRequest() {
@@ -63,7 +64,7 @@ bool HardwareDisplayController::Modeset(const OverlayPlane& primary,
// callback. We use the modeset state since it is the only valid state.
if (HasPendingPageFlips())
requests_.push_back(
- PageFlipRequest(current_planes_, base::Bind(&base::DoNothing)));
+ PageFlipRequest(current_planes_, false, base::Bind(&base::DoNothing)));
return status;
}
@@ -89,6 +90,7 @@ void HardwareDisplayController::QueueOverlayPlane(const OverlayPlane& plane) {
}
bool HardwareDisplayController::SchedulePageFlip(
+ bool is_sync,
const base::Closure& callback) {
TRACE_EVENT0("dri", "HDC::SchedulePageFlip");
@@ -98,7 +100,7 @@ bool HardwareDisplayController::SchedulePageFlip(
return true;
}
- requests_.push_back(PageFlipRequest(pending_planes_, callback));
+ requests_.push_back(PageFlipRequest(pending_planes_, is_sync, callback));
pending_planes_.clear();
// A request is being serviced right now.
@@ -296,8 +298,9 @@ bool HardwareDisplayController::ActualSchedulePageFlip() {
pending_planes);
}
+ bool is_sync = requests_.front().is_sync;
for (const auto& planes : owned_hardware_planes_) {
- if (!planes.first->plane_manager()->Commit(planes.second)) {
+ if (!planes.first->plane_manager()->Commit(planes.second, is_sync)) {
status = false;
}
}
« no previous file with comments | « ui/ozone/platform/dri/hardware_display_controller.h ('k') | ui/ozone/platform/dri/hardware_display_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698