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

Unified Diff: ui/ozone/platform/drm/gpu/drm_window_proxy.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: update & fix clang Created 5 years, 2 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_proxy.h ('k') | ui/ozone/platform/drm/gpu/drm_window_unittest.cc » ('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_proxy.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_window_proxy.cc b/ui/ozone/platform/drm/gpu/drm_window_proxy.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9e2e06f72a28bbacc4f590a37ea8d756dd842cc1
--- /dev/null
+++ b/ui/ozone/platform/drm/gpu/drm_window_proxy.cc
@@ -0,0 +1,36 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/ozone/platform/drm/gpu/drm_window_proxy.h"
+
+#include "ui/ozone/platform/drm/gpu/drm_thread.h"
+#include "ui/ozone/platform/drm/gpu/overlay_plane.h"
+#include "ui/ozone/platform/drm/gpu/proxy_helpers.h"
+#include "ui/ozone/platform/drm/gpu/scanout_buffer.h"
+
+namespace ui {
+
+DrmWindowProxy::DrmWindowProxy(gfx::AcceleratedWidget widget,
+ DrmThread* drm_thread)
+ : widget_(widget), drm_thread_(drm_thread) {}
+
+DrmWindowProxy::~DrmWindowProxy() {}
+
+void DrmWindowProxy::SchedulePageFlip(const std::vector<OverlayPlane>& planes,
+ const SwapCompletionCallback& callback) {
+ drm_thread_->task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&DrmThread::SchedulePageFlip, base::Unretained(drm_thread_),
+ widget_, planes, CreateSafeCallback(callback)));
+}
+
+void DrmWindowProxy::GetVSyncParameters(
+ const gfx::VSyncProvider::UpdateVSyncCallback& callback) {
+ drm_thread_->task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&DrmThread::GetVSyncParameters, base::Unretained(drm_thread_),
+ widget_, CreateSafeCallback(callback)));
+}
+
+} // namespace ui
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_window_proxy.h ('k') | ui/ozone/platform/drm/gpu/drm_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698