Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: ui/ozone/platform/drm/gpu/drm_thread_proxy.h

Issue 1311043016: Switch DRM platform to using a separate thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mv-drm-calls-on-thread2
Patch Set: update & fix clang Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..fdad1b07fa630e63107d7ce503a1541382604397
--- /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 DrmThreadMessageProxy;
+class DrmWindowProxy;
+
+// 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();
+
+ scoped_refptr<DrmThreadMessageProxy> CreateDrmThreadMessageProxy();
+
+ scoped_ptr<DrmWindowProxy> CreateDrmWindowProxy(
+ gfx::AcceleratedWidget widget);
+
+ scoped_refptr<GbmBuffer> CreateBuffer(gfx::AcceleratedWidget widget,
+ const gfx::Size& size,
+ gfx::BufferFormat format,
+ gfx::BufferUsage usage);
+
+ private:
+ DrmThread drm_thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(DrmThreadProxy);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_PROXY_H_
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc ('k') | ui/ozone/platform/drm/gpu/drm_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698