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

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

Issue 2088533002: Refactor ozone drm cursor code for mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build Created 4 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/host/drm_cursor.cc
diff --git a/ui/ozone/platform/drm/host/drm_cursor.cc b/ui/ozone/platform/drm/host/drm_cursor.cc
index 6ee48c8cfa06983c58c90ce306658022b96d6ac9..0dc9ae53704110228670e2087b8f89db860da8bc 100644
--- a/ui/ozone/platform/drm/host/drm_cursor.cc
+++ b/ui/ozone/platform/drm/host/drm_cursor.cc
@@ -27,6 +27,7 @@ class NullProxy : public DrmCursorProxy {
const gfx::Point& point,
int frame_delay_ms) override {}
void Move(gfx::AcceleratedWidget window, const gfx::Point& point) override {}
+ void InitializeOnEvdev() override {}
private:
DISALLOW_COPY_AND_ASSIGN(NullProxy);
@@ -37,7 +38,9 @@ class NullProxy : public DrmCursorProxy {
DrmCursor::DrmCursor(DrmWindowHostManager* window_manager)
: window_(gfx::kNullAcceleratedWidget),
window_manager_(window_manager),
- proxy_(new NullProxy()) {}
+ proxy_(new NullProxy()) {
+ evdev_thread_checker_.DetachFromThread();
+}
DrmCursor::~DrmCursor() {}
@@ -177,6 +180,7 @@ void DrmCursor::MoveCursorTo(const gfx::PointF& screen_location) {
}
void DrmCursor::MoveCursor(const gfx::Vector2dF& delta) {
+ DCHECK(evdev_thread_checker_.CalledOnValidThread());
TRACE_EVENT0("drmcursor", "DrmCursor::MoveCursor");
base::AutoLock lock(lock_);
@@ -210,6 +214,11 @@ gfx::Rect DrmCursor::GetCursorConfinedBounds() {
return confined_bounds_ + display_bounds_in_screen_.OffsetFromOrigin();
}
+void DrmCursor::InitializeOnEvdev() {
+ DCHECK(evdev_thread_checker_.CalledOnValidThread());
+ proxy_->InitializeOnEvdev();
+}
+
void DrmCursor::SetCursorLocationLocked(const gfx::PointF& location) {
gfx::PointF clamped_location = location;
clamped_location.SetToMax(gfx::PointF(confined_bounds_.origin()));
« no previous file with comments | « ui/ozone/platform/drm/host/drm_cursor.h ('k') | ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698