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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_thread_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_thread_proxy.h"
6
7 #include "base/bind.h"
8 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h"
9 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h"
10 #include "ui/ozone/platform/drm/gpu/gbm_buffer.h"
11 #include "ui/ozone/platform/drm/gpu/proxy_helpers.h"
12
13 namespace ui {
14
15 DrmThreadProxy::DrmThreadProxy() {}
16
17 DrmThreadProxy::~DrmThreadProxy() {}
18
19 scoped_refptr<DrmThreadMessageProxy>
20 DrmThreadProxy::CreateDrmThreadMessageProxy() {
21 return make_scoped_refptr(new DrmThreadMessageProxy(&drm_thread_));
22 }
23
24 scoped_ptr<DrmWindowProxy> DrmThreadProxy::CreateDrmWindowProxy(
25 gfx::AcceleratedWidget widget) {
26 return make_scoped_ptr(new DrmWindowProxy(widget, &drm_thread_));
27 }
28
29 scoped_refptr<GbmBuffer> DrmThreadProxy::CreateBuffer(
30 gfx::AcceleratedWidget widget,
31 const gfx::Size& size,
32 gfx::BufferFormat format,
33 gfx::BufferUsage usage) {
34 scoped_refptr<GbmBuffer> buffer;
35 PostSyncTask(
36 drm_thread_.task_runner(),
37 base::Bind(&DrmThread::CreateBuffer, base::Unretained(&drm_thread_),
38 widget, size, format, usage, &buffer));
39 return buffer;
40 }
41
42 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread_proxy.h ('k') | ui/ozone/platform/drm/gpu/drm_vsync_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698