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

Side by Side Diff: ui/ozone/platform/drm/mus_thread_proxy.h

Issue 2156093004: Use mojo for cursor control in ozone drm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more proof-reading Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef UI_OZONE_PLATFORM_DRM_MUS_THREAD_PROXY_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_MUS_THREAD_PROXY_H_
6 #define UI_OZONE_PLATFORM_DRM_MUS_THREAD_PROXY_H_ 6 #define UI_OZONE_PLATFORM_DRM_MUS_THREAD_PROXY_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 #include "ui/ozone/platform/drm/gpu/inter_thread_messaging_proxy.h" 14 #include "ui/ozone/platform/drm/gpu/inter_thread_messaging_proxy.h"
15 #include "ui/ozone/platform/drm/host/drm_cursor.h" 15 #include "ui/ozone/platform/drm/host/drm_cursor.h"
16 #include "ui/ozone/platform/drm/host/gpu_thread_adapter.h" 16 #include "ui/ozone/platform/drm/host/gpu_thread_adapter.h"
17 #include "ui/ozone/public/interfaces/cursor.mojom.h"
17 18
18 namespace base { 19 namespace base {
19 class SingleThreadTaskRunner; 20 class SingleThreadTaskRunner;
20 } 21 }
21 22
22 namespace ui { 23 namespace ui {
23 24
24 class DrmCursor; 25 class DrmCursor;
25 class DrmDisplayHostManager; 26 class DrmDisplayHostManager;
26 class DrmOverlayManager; 27 class DrmOverlayManager;
27 class DrmThread; 28 class DrmThread;
28 class GpuThreadObserver; 29 class GpuThreadObserver;
30 class MusThreadProxy;
31
32 // Forwarding proxy to handle ownership semantics.
33 class CursorProxyThread : public DrmCursorProxy {
34 public:
35 CursorProxyThread(MusThreadProxy* mus_thread_proxy);
Tom Sepez 2016/07/19 16:14:38 nit: explicit
rjkroege 2016/07/21 01:10:42 Done.
36 ~CursorProxyThread() override;
37
38 private:
39 // DrmCursorProxy.
40 void CursorSet(gfx::AcceleratedWidget window,
41 const std::vector<SkBitmap>& bitmaps,
42 const gfx::Point& point,
43 int frame_delay_ms) override;
44 void Move(gfx::AcceleratedWidget window, const gfx::Point& point) override;
45 void InitializeOnEvdev() override;
46 MusThreadProxy* mus_thread_proxy_; // Not owned.
Tom Sepez 2016/07/19 16:14:38 nit: maybe blank line between methods and members.
rjkroege 2016/07/21 01:10:42 Done.
47 };
29 48
30 // In Mus, the window server thread (analogous to Chrome's UI thread), GPU and 49 // In Mus, the window server thread (analogous to Chrome's UI thread), GPU and
31 // DRM threads coexist in a single Mus process. The |MusThreadProxy| connects 50 // DRM threads coexist in a single Mus process. The |MusThreadProxy| connects
32 // these threads together via cross-thread calls. 51 // these threads together via cross-thread calls.
33 class MusThreadProxy : public GpuThreadAdapter, 52 class MusThreadProxy : public GpuThreadAdapter,
34 public InterThreadMessagingProxy, 53 public InterThreadMessagingProxy,
35 public DrmCursorProxy { 54 public DrmCursorProxy {
36 public: 55 public:
37 MusThreadProxy(); 56 MusThreadProxy();
38 ~MusThreadProxy() override; 57 ~MusThreadProxy() override;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 base::ThreadChecker on_window_server_thread_; 152 base::ThreadChecker on_window_server_thread_;
134 153
135 base::WeakPtrFactory<MusThreadProxy> weak_ptr_factory_; 154 base::WeakPtrFactory<MusThreadProxy> weak_ptr_factory_;
136 155
137 DISALLOW_COPY_AND_ASSIGN(MusThreadProxy); 156 DISALLOW_COPY_AND_ASSIGN(MusThreadProxy);
138 }; 157 };
139 158
140 } // namespace ui 159 } // namespace ui
141 160
142 #endif // UI_OZONE_PLATFORM_DRM_MUS_THREAD_PROXY_H_ 161 #endif // UI_OZONE_PLATFORM_DRM_MUS_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698