Index: ui/ozone/platform/drm/gpu/drm_thread_proxy.h |
diff --git a/ui/ozone/platform/drm/gpu/drm_thread_proxy.h b/ui/ozone/platform/drm/gpu/drm_thread_proxy.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bb9d0a19ebc9d081313ff91778b1db9fe4f72cdf |
--- /dev/null |
+++ b/ui/ozone/platform/drm/gpu/drm_thread_proxy.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ |
+#define UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ |
+ |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "ui/ozone/platform/drm/gpu/drm_thread.h" |
+ |
+namespace ui { |
+ |
+class DrmDeviceManager; |
+class DrmWindowProxy; |
+class MessageFilterProxy; |
+ |
+// Mediates the communication between GPU main/IO threads and the DRM thread. It |
+// serves proxy objects that are safe to call on the GPU threads. The proxy |
+// objects then deal with safely posting the messages to the DRM thread. |
+class DrmThreadProxy { |
+ public: |
+ explicit DrmThreadProxy(); |
+ ~DrmThreadProxy(); |
+ |
+ DrmDeviceManager* device_manager() const { |
+ return drm_thread_.device_manager(); |
+ } |
+ |
+ 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
|
+ |
+ scoped_ptr<DrmWindowProxy> CreateDrmWindowProxy( |
+ gfx::AcceleratedWidget widget); |
+ |
+ private: |
+ DrmThread drm_thread_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DrmThreadProxy); |
+}; |
+ |
+} // namespace ui |
+ |
+#endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_ |