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

Unified Diff: ui/ozone/platform/drm/gpu/drm_window_proxy.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
Index: ui/ozone/platform/drm/gpu/drm_window_proxy.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_window_proxy.cc b/ui/ozone/platform/drm/gpu/drm_window_proxy.cc
index 9e2e06f72a28bbacc4f590a37ea8d756dd842cc1..723912a9e4fea2ee52bc4ce927b55027a83b6a65 100644
--- a/ui/ozone/platform/drm/gpu/drm_window_proxy.cc
+++ b/ui/ozone/platform/drm/gpu/drm_window_proxy.cc
@@ -18,11 +18,12 @@ DrmWindowProxy::DrmWindowProxy(gfx::AcceleratedWidget widget,
DrmWindowProxy::~DrmWindowProxy() {}
void DrmWindowProxy::SchedulePageFlip(const std::vector<OverlayPlane>& planes,
- const SwapCompletionCallback& callback) {
+ SwapCompletionOnceCallback callback) {
+ auto safe_callback = CreateSafeOnceCallback(std::move(callback));
drm_thread_->task_runner()->PostTask(
- FROM_HERE,
- base::Bind(&DrmThread::SchedulePageFlip, base::Unretained(drm_thread_),
- widget_, planes, CreateSafeCallback(callback)));
+ FROM_HERE, base::BindOnce(&DrmThread::SchedulePageFlip,
+ base::Unretained(drm_thread_), widget_, planes,
+ std::move(safe_callback)));
}
void DrmWindowProxy::GetVSyncParameters(
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window_proxy.h ('k') | ui/ozone/platform/drm/gpu/hardware_display_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698