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

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

Issue 2903353002: Make ozone/drm/mojo more immune to startup races (Closed)
Patch Set: make CursorProxyMojo a GpuThreadObserver 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/cursor_proxy_mojo.h
diff --git a/ui/ozone/platform/drm/cursor_proxy_mojo.h b/ui/ozone/platform/drm/cursor_proxy_mojo.h
index 33577aee9ffc5322d09a9148cecc6474ef002179..ccfd6d7009483d79f7794c21e93f090c70d4a444 100644
--- a/ui/ozone/platform/drm/cursor_proxy_mojo.h
+++ b/ui/ozone/platform/drm/cursor_proxy_mojo.h
@@ -8,6 +8,7 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/ozone/platform/drm/gpu/inter_thread_messaging_proxy.h"
#include "ui/ozone/platform/drm/host/drm_cursor.h"
+#include "ui/ozone/platform/drm/host/gpu_thread_observer.h"
#include "ui/ozone/public/interfaces/device_cursor.mojom.h"
namespace service_manager {
@@ -21,7 +22,7 @@ namespace ui {
// pointer control via Mojo-style IPC. This code runs only in the mus-ws (i.e.
// it's the client) and sends mouse pointer control messages to a less
// priviledged process.
-class CursorProxyMojo : public DrmCursorProxy {
+class CursorProxyMojo : public DrmCursorProxy, public GpuThreadObserver {
public:
explicit CursorProxyMojo(service_manager::Connector* connector);
~CursorProxyMojo() override;
@@ -35,6 +36,11 @@ class CursorProxyMojo : public DrmCursorProxy {
void Move(gfx::AcceleratedWidget window, const gfx::Point& point) override;
void InitializeOnEvdev() override;
+ // GpuThreadObserver
+ void OnGpuProcessLaunched() override;
+ void OnGpuThreadReady() override;
+ void OnGpuThreadRetired() override;
+
std::unique_ptr<service_manager::Connector> connector_;
// Mojo implementation of the DrmCursorProxy.
@@ -42,6 +48,8 @@ class CursorProxyMojo : public DrmCursorProxy {
ui::ozone::mojom::DeviceCursorPtr evdev_cursor_ptr_;
base::PlatformThreadRef evdev_ref_;
+
+ bool have_gpu_thread_ = false;
};
} // namespace ui
« no previous file with comments | « no previous file | ui/ozone/platform/drm/cursor_proxy_mojo.cc » ('j') | ui/ozone/platform/drm/ozone_platform_gbm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698