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

Unified Diff: ui/ozone/platform/drm/mus_thread_proxy.h

Issue 2903353002: Make ozone/drm/mojo more immune to startup races (Closed)
Patch Set: cursor setup independent of evdev / drm startup and timing of PlatformWindow creation. Created 3 years, 7 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/mus_thread_proxy.h
diff --git a/ui/ozone/platform/drm/mus_thread_proxy.h b/ui/ozone/platform/drm/mus_thread_proxy.h
index 2926d268131a587c2e02cbb13d8b823edd411f7d..016e23c79f94de6013f177404aa456a1f5555bea 100644
--- a/ui/ozone/platform/drm/mus_thread_proxy.h
+++ b/ui/ozone/platform/drm/mus_thread_proxy.h
@@ -20,6 +20,10 @@ namespace base {
class SingleThreadTaskRunner;
}
+namespace service_manager {
+class Connector;
+}
+
namespace ui {
class DrmDisplayHostManager;
@@ -28,23 +32,6 @@ class DrmThread;
class GpuThreadObserver;
class MusThreadProxy;
-// Forwarding proxy to handle ownership semantics.
-class CursorProxyThread : public DrmCursorProxy {
- public:
- explicit CursorProxyThread(MusThreadProxy* mus_thread_proxy);
- ~CursorProxyThread() override;
-
- private:
- // DrmCursorProxy.
- void CursorSet(gfx::AcceleratedWidget window,
- const std::vector<SkBitmap>& bitmaps,
- const gfx::Point& point,
- int frame_delay_ms) override;
- void Move(gfx::AcceleratedWidget window, const gfx::Point& point) override;
- void InitializeOnEvdev() override;
- MusThreadProxy* const mus_thread_proxy_; // Not owned.
-};
-
// In Mus, the window server thread (analogous to Chrome's UI thread), GPU and
// DRM threads coexist in a single Mus process. The |MusThreadProxy| connects
// these threads together via cross-thread calls.
@@ -52,7 +39,7 @@ class MusThreadProxy : public GpuThreadAdapter,
public InterThreadMessagingProxy,
public DrmCursorProxy {
public:
- MusThreadProxy();
+ MusThreadProxy(DrmCursor* cursor, service_manager::Connector* connector);
~MusThreadProxy() override;
void StartDrmThread();
@@ -113,7 +100,8 @@ class MusThreadProxy : public GpuThreadAdapter,
const gfx::Point& point,
int frame_delay_ms) override;
void Move(gfx::AcceleratedWidget window, const gfx::Point& point) override;
- void InitializeOnEvdev() override;
+ void InitializeOnEvdevIfNecessary() override;
+ void SendToDelegate(DrmCursorProxy* delegate) override;
private:
void RunObservers();
@@ -145,6 +133,9 @@ class MusThreadProxy : public GpuThreadAdapter,
DrmDisplayHostManager* display_manager_; // Not owned.
DrmOverlayManager* overlay_manager_; // Not owned.
+ DrmCursor* cursor_; // Not owned.
+
+ service_manager::Connector* connector_;
base::ObserverList<GpuThreadObserver> gpu_thread_observers_;

Powered by Google App Engine
This is Rietveld 408576698