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_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 |
OLD | NEW |