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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h"
6
7 #include "ui/ozone/platform/drm/gpu/drm_thread.h"
8 #include "ui/ozone/platform/drm/gpu/overlay_plane.h"
9 #include "ui/ozone/platform/drm/gpu/proxy_helpers.h"
10 #include "ui/ozone/platform/drm/gpu/scanout_buffer.h"
11
12 namespace ui {
13
14 DrmWindowProxy::DrmWindowProxy(gfx::AcceleratedWidget widget,
15 DrmThread* drm_thread)
16 : widget_(widget), drm_thread_(drm_thread) {}
17
18 DrmWindowProxy::~DrmWindowProxy() {}
19
20 void DrmWindowProxy::SchedulePageFlip(const std::vector<OverlayPlane>& planes,
21 const SwapCompletionCallback& callback) {
22 drm_thread_->task_runner()->PostTask(
23 FROM_HERE,
24 base::Bind(&DrmThread::SchedulePageFlip, base::Unretained(drm_thread_),
25 widget_, planes, CreateSafeCallback(callback)));
26 }
27
28 void DrmWindowProxy::GetVSyncParameters(
29 const gfx::VSyncProvider::UpdateVSyncCallback& callback) {
30 drm_thread_->task_runner()->PostTask(
31 FROM_HERE,
32 base::Bind(&DrmThread::GetVSyncParameters, base::Unretained(drm_thread_),
33 widget_, CreateSafeCallback(callback)));
34 }
35
36 } // namespace ui
OLDNEW
« 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