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

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

Issue 1311043016: Switch DRM platform to using a separate thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mv-drm-calls-on-thread2
Patch Set: . Created 5 years, 3 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/drm/gpu/drm_window.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_window.cc b/ui/ozone/platform/drm/gpu/drm_window.cc
index baaeda221a6a5567b8fd1b7356f79f5a71ca1a17..8af203487e7920205394e552f40294d8fb62eb64 100644
--- a/ui/ozone/platform/drm/gpu/drm_window.cc
+++ b/ui/ozone/platform/drm/gpu/drm_window.cc
@@ -126,26 +126,26 @@ void DrmWindow::QueueOverlayPlane(const OverlayPlane& plane) {
pending_planes_.push_back(plane);
}
-bool DrmWindow::SchedulePageFlip(const SwapCompletionCallback& callback) {
+void DrmWindow::SchedulePageFlip(const SwapCompletionCallback& callback) {
if (force_buffer_reallocation_) {
// Clear pending planes otherwise the next call to queue planes will just
// add on top.
pending_planes_.clear();
force_buffer_reallocation_ = false;
callback.Run(gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS);
- return true;
+ return;
}
last_submitted_planes_.clear();
last_submitted_planes_.swap(pending_planes_);
if (controller_) {
- return controller_->SchedulePageFlip(last_submitted_planes_,
- false /* test_only */, callback);
+ if (!controller_->SchedulePageFlip(last_submitted_planes_,
+ false /* test_only */, callback))
+ callback.Run(gfx::SwapResult::SWAP_FAILED);
+ } else {
+ callback.Run(gfx::SwapResult::SWAP_ACK);
}
-
- callback.Run(gfx::SwapResult::SWAP_ACK);
- return true;
}
bool DrmWindow::TestPageFlip(const std::vector<OverlayCheck_Params>& overlays,

Powered by Google App Engine
This is Rietveld 408576698