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

Unified Diff: ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc

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
« no previous file with comments | « ui/ozone/platform/drm/host/drm_cursor.cc ('k') | ui/ozone/platform/drm/mus_thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc
diff --git a/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc b/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc
index 01920a85e24de42676fd27f8a98e82cb1a362415..4d34f369bacb57dbb9e032821de35dc4f2d63b60 100644
--- a/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc
+++ b/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc
@@ -33,7 +33,7 @@ class CursorIPC : public DrmCursorProxy {
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:
bool IsConnected();
@@ -66,7 +66,7 @@ void CursorIPC::Move(gfx::AcceleratedWidget window, const gfx::Point& point) {
Send(new OzoneGpuMsg_CursorMove(window, point));
}
-void CursorIPC::InitializeOnEvdev() {}
+void CursorIPC::InitializeOnEvdevIfNecessary() {}
void CursorIPC::Send(IPC::Message* message) {
if (IsConnected() &&
@@ -180,7 +180,8 @@ void DrmGpuPlatformSupportHost::OnChannelEstablished() {
// and notify it after all other observers/handlers are notified such that the
// (windowing) state on the GPU can be initialized before the cursor is
// allowed to IPC messages (which are targeted to a specific window).
- cursor_->SetDrmCursorProxy(new CursorIPC(send_runner_, send_callback_));
+ cursor_->SetDrmCursorProxy(
+ base::MakeUnique<CursorIPC>(send_runner_, send_callback_));
}
bool DrmGpuPlatformSupportHost::OnMessageReceivedForDrmDisplayHostManager(
« no previous file with comments | « ui/ozone/platform/drm/host/drm_cursor.cc ('k') | ui/ozone/platform/drm/mus_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698