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 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/ozone/platform/drm/gpu/drm_thread.h" |
| 11 |
| 12 namespace ui { |
| 13 |
| 14 class DrmThreadMessageProxy; |
| 15 class DrmWindowProxy; |
| 16 |
| 17 // Mediates the communication between GPU main/IO threads and the DRM thread. It |
| 18 // serves proxy objects that are safe to call on the GPU threads. The proxy |
| 19 // objects then deal with safely posting the messages to the DRM thread. |
| 20 class DrmThreadProxy { |
| 21 public: |
| 22 explicit DrmThreadProxy(); |
| 23 ~DrmThreadProxy(); |
| 24 |
| 25 scoped_refptr<DrmThreadMessageProxy> CreateDrmThreadMessageProxy(); |
| 26 |
| 27 scoped_ptr<DrmWindowProxy> CreateDrmWindowProxy( |
| 28 gfx::AcceleratedWidget widget); |
| 29 |
| 30 scoped_refptr<GbmBuffer> CreateBuffer(gfx::AcceleratedWidget widget, |
| 31 const gfx::Size& size, |
| 32 gfx::BufferFormat format, |
| 33 gfx::BufferUsage usage); |
| 34 |
| 35 private: |
| 36 DrmThread drm_thread_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(DrmThreadProxy); |
| 39 }; |
| 40 |
| 41 } // namespace ui |
| 42 |
| 43 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ |
OLD | NEW |