OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/ozone/platform/drm/host/drm_cursor.h" | 5 #include "ui/ozone/platform/drm/host/drm_cursor.h" |
6 | 6 |
7 #include "base/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
8 #include "ui/gfx/geometry/point_conversions.h" | 8 #include "ui/gfx/geometry/point_conversions.h" |
9 #include "ui/ozone/platform/drm/host/drm_window_host.h" | 9 #include "ui/ozone/platform/drm/host/drm_window_host.h" |
10 #include "ui/ozone/platform/drm/host/drm_window_host_manager.h" | 10 #include "ui/ozone/platform/drm/host/drm_window_host_manager.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 window_, &transformed_delta); | 190 window_, &transformed_delta); |
191 SetCursorLocationLocked(location_ + transformed_delta); | 191 SetCursorLocationLocked(location_ + transformed_delta); |
192 #else | 192 #else |
193 SetCursorLocationLocked(location_ + delta); | 193 SetCursorLocationLocked(location_ + delta); |
194 #endif | 194 #endif |
195 SendCursorMoveLocked(); | 195 SendCursorMoveLocked(); |
196 } | 196 } |
197 | 197 |
198 bool DrmCursor::IsCursorVisible() { | 198 bool DrmCursor::IsCursorVisible() { |
199 base::AutoLock lock(lock_); | 199 base::AutoLock lock(lock_); |
200 return bitmap_; | 200 return static_cast<bool>(bitmap_); |
201 } | 201 } |
202 | 202 |
203 gfx::PointF DrmCursor::GetLocation() { | 203 gfx::PointF DrmCursor::GetLocation() { |
204 base::AutoLock lock(lock_); | 204 base::AutoLock lock(lock_); |
205 return location_ + display_bounds_in_screen_.OffsetFromOrigin(); | 205 return location_ + display_bounds_in_screen_.OffsetFromOrigin(); |
206 } | 206 } |
207 | 207 |
208 gfx::Rect DrmCursor::GetCursorConfinedBounds() { | 208 gfx::Rect DrmCursor::GetCursorConfinedBounds() { |
209 base::AutoLock lock(lock_); | 209 base::AutoLock lock(lock_); |
210 return confined_bounds_ + display_bounds_in_screen_.OffsetFromOrigin(); | 210 return confined_bounds_ + display_bounds_in_screen_.OffsetFromOrigin(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 } | 249 } |
250 | 250 |
251 void DrmCursor::MoveLockTested(gfx::AcceleratedWidget window, | 251 void DrmCursor::MoveLockTested(gfx::AcceleratedWidget window, |
252 const gfx::Point& point) { | 252 const gfx::Point& point) { |
253 lock_.AssertAcquired(); | 253 lock_.AssertAcquired(); |
254 proxy_->Move(window, point); | 254 proxy_->Move(window, point); |
255 } | 255 } |
256 | 256 |
257 | 257 |
258 } // namespace ui | 258 } // namespace ui |
OLD | NEW |