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

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

Issue 2903353002: Make ozone/drm/mojo more immune to startup races (Closed)
Patch Set: simpler patch Created 3 years, 6 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..00721ec3524f192a681152e8914150cda184f0ab 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,7 @@ 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;
private:
void RunObservers();
@@ -145,6 +132,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_;
« no previous file with comments | « ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc ('k') | ui/ozone/platform/drm/mus_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698