OLD | NEW |
---|---|
(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_window_proxy.h" | |
9 #include "ui/ozone/platform/drm/gpu/message_filter_proxy.h" | |
10 #include "ui/ozone/platform/drm/gpu/proxy_helpers.h" | |
11 | |
12 namespace ui { | |
13 | |
14 DrmThreadProxy::DrmThreadProxy() {} | |
15 | |
16 DrmThreadProxy::~DrmThreadProxy() {} | |
17 | |
18 scoped_refptr<MessageFilterProxy> DrmThreadProxy::CreateMessageFilterProxy() { | |
19 return make_scoped_refptr(new MessageFilterProxy(&drm_thread_)); | |
20 } | |
21 | |
22 scoped_ptr<DrmWindowProxy> DrmThreadProxy::CreateDrmWindowProxy( | |
23 gfx::AcceleratedWidget widget) { | |
24 // Because the DrmDeviceManager can be used from any thread without posting a | |
25 // message to the DRM thread, we need to make sure that the DRM thread has | |
26 // finished processing the window creation message before returning the proxy | |
27 // otherwise we could start requesting buffer allocations for an unrealized | |
28 // window. | |
29 PostSyncTask(drm_thread_.task_runner(), base::Bind(&base::DoNothing)); | |
spang
2015/09/30 18:47:31
Can you do the sync post in CreateNativePixmap ins
dnicoara
2015/10/01 14:36:15
I was talking to alexst@ yesterday and I'll rework
| |
30 return make_scoped_ptr(new DrmWindowProxy(widget, &drm_thread_)); | |
31 } | |
32 | |
33 } // namespace ui | |
OLD | NEW |