OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/ozone/platform/drm/gpu/drm_thread_proxy.h" | 5 #include "ui/ozone/platform/drm/gpu/drm_thread_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h" | 8 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h" |
9 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" | 9 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" |
10 #include "ui/ozone/platform/drm/gpu/gbm_buffer.h" | 10 #include "ui/ozone/platform/drm/gpu/gbm_buffer.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 gfx::BufferFormat format, | 32 gfx::BufferFormat format, |
33 gfx::BufferUsage usage) { | 33 gfx::BufferUsage usage) { |
34 scoped_refptr<GbmBuffer> buffer; | 34 scoped_refptr<GbmBuffer> buffer; |
35 PostSyncTask( | 35 PostSyncTask( |
36 drm_thread_.task_runner(), | 36 drm_thread_.task_runner(), |
37 base::Bind(&DrmThread::CreateBuffer, base::Unretained(&drm_thread_), | 37 base::Bind(&DrmThread::CreateBuffer, base::Unretained(&drm_thread_), |
38 widget, size, format, usage, &buffer)); | 38 widget, size, format, usage, &buffer)); |
39 return buffer; | 39 return buffer; |
40 } | 40 } |
41 | 41 |
| 42 void DrmThreadProxy::GetScanoutFormats( |
| 43 gfx::AcceleratedWidget widget, |
| 44 std::vector<gfx::BufferFormat>* scanout_formats) { |
| 45 PostSyncTask( |
| 46 drm_thread_.task_runner(), |
| 47 base::Bind(&DrmThread::GetScanoutFormats, base::Unretained(&drm_thread_), |
| 48 widget, scanout_formats)); |
| 49 } |
| 50 |
42 } // namespace ui | 51 } // namespace ui |
OLD | NEW |