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

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: more proof-reading 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
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 ebc89da636415fb4a35043f67c69ac9662679d23..2e94d9aab6983febc89c5092a9ee10a3e3c727af 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"
@@ -167,10 +168,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) {
+ uint32_t frame_delay_ms) {
screen_manager_->GetWindow(widget)
->SetCursor(bitmaps, location, frame_delay_ms);
}
@@ -253,4 +254,11 @@ 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(shell::Connection* connection,
+ ozone::mojom::CursorRequest request) {
+ bindings_.AddBinding(this, std::move(request));
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698