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

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

Issue 2886503002: Convert additional ozone/drm callbacks to OnceCallback (Closed)
Patch Set: fixed nit Created 3 years, 7 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/drm_window.h ('k') | ui/ozone/platform/drm/gpu/drm_window_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f2243c4e81fd731dfd90f48cb8d31ac89396f976..55bd1a05ae36c76df895b8737f010215e28be11d 100644
--- a/ui/ozone/platform/drm/gpu/drm_window.cc
+++ b/ui/ozone/platform/drm/gpu/drm_window.cc
@@ -117,7 +117,7 @@ void DrmWindow::MoveCursor(const gfx::Point& location) {
}
void DrmWindow::SchedulePageFlip(const std::vector<OverlayPlane>& planes,
- const SwapCompletionCallback& callback) {
+ SwapCompletionOnceCallback callback) {
if (controller_) {
const DrmDevice* drm = controller_->GetAllocationDrmDevice().get();
for (const auto& plane : planes) {
@@ -132,7 +132,7 @@ void DrmWindow::SchedulePageFlip(const std::vector<OverlayPlane>& planes,
if (force_buffer_reallocation_) {
force_buffer_reallocation_ = false;
- callback.Run(gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS);
+ std::move(callback).Run(gfx::SwapResult::SWAP_NAK_RECREATE_BUFFERS);
return;
}
@@ -140,11 +140,11 @@ void DrmWindow::SchedulePageFlip(const std::vector<OverlayPlane>& planes,
overlay_validator_->PrepareBuffersForPageFlip(planes);
if (!controller_) {
- callback.Run(gfx::SwapResult::SWAP_ACK);
+ std::move(callback).Run(gfx::SwapResult::SWAP_ACK);
return;
}
- controller_->SchedulePageFlip(last_submitted_planes_, callback);
+ controller_->SchedulePageFlip(last_submitted_planes_, std::move(callback));
}
std::vector<OverlayCheck_Params> DrmWindow::TestPageFlip(
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window.h ('k') | ui/ozone/platform/drm/gpu/drm_window_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698