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

Unified Diff: ui/ozone/platform/drm/gpu/drm_thread.cc

Issue 2156093004: Use mojo for cursor control in ozone drm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: corrected small code oversight 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread.h ('k') | ui/ozone/platform/drm/gpu/drm_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/gpu/drm_thread.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_thread.cc b/ui/ozone/platform/drm/gpu/drm_thread.cc
index 1e73c56bc6a468aebf942433bf5638178681eba1..8aece24634cea4db76c9458d06aea3b2ab18a0d2 100644
--- a/ui/ozone/platform/drm/gpu/drm_thread.cc
+++ b/ui/ozone/platform/drm/gpu/drm_thread.cc
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "services/shell/public/cpp/connection.h"
#include "ui/ozone/platform/drm/gpu/drm_buffer.h"
#include "ui/ozone/platform/drm/gpu/drm_device_generator.h"
#include "ui/ozone/platform/drm/gpu/drm_device_manager.h"
@@ -168,10 +169,10 @@ void DrmThread::SetWindowBounds(gfx::AcceleratedWidget widget,
screen_manager_->GetWindow(widget)->SetBounds(bounds);
}
-void DrmThread::SetCursor(gfx::AcceleratedWidget widget,
+void DrmThread::SetCursor(const gfx::AcceleratedWidget& widget,
const std::vector<SkBitmap>& bitmaps,
const gfx::Point& location,
- int frame_delay_ms) {
+ int32_t frame_delay_ms) {
screen_manager_->GetWindow(widget)
->SetCursor(bitmaps, location, frame_delay_ms);
}
@@ -254,4 +255,10 @@ void DrmThread::SetColorCorrection(
correction_matrix);
}
+// DrmThread requires a BindingSet instead of a simple Binding because it will
+// be used from multiple threads in multiple processes.
+void DrmThread::AddBinding(ozone::mojom::DeviceCursorRequest request) {
+ bindings_.AddBinding(this, std::move(request));
+}
+
} // namespace ui
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread.h ('k') | ui/ozone/platform/drm/gpu/drm_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698