Chromium Code Reviews| 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 DrmDeviceManager; | |
| 15 class DrmWindowProxy; | |
| 16 class MessageFilterProxy; | |
| 17 | |
| 18 // Mediates the communication between GPU main/IO threads and the DRM thread. It | |
| 19 // serves proxy objects that are safe to call on the GPU threads. The proxy | |
| 20 // objects then deal with safely posting the messages to the DRM thread. | |
| 21 class DrmThreadProxy { | |
| 22 public: | |
| 23 explicit DrmThreadProxy(); | |
| 24 ~DrmThreadProxy(); | |
| 25 | |
| 26 DrmDeviceManager* device_manager() const { | |
| 27 return drm_thread_.device_manager(); | |
| 28 } | |
| 29 | |
| 30 scoped_refptr<MessageFilterProxy> CreateMessageFilterProxy(); | |
|
spang
2015/09/30 18:17:35
Do we need to refcount?
dnicoara
2015/10/01 14:36:15
Unfortunately yes, because the base class, IPC::Me
| |
| 31 | |
| 32 scoped_ptr<DrmWindowProxy> CreateDrmWindowProxy( | |
| 33 gfx::AcceleratedWidget widget); | |
| 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 |