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

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

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-event: mandol_line Created 5 years, 1 month 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/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/host/drm_window_host.cc
diff --git a/ui/ozone/platform/drm/host/drm_window_host.cc b/ui/ozone/platform/drm/host/drm_window_host.cc
index 183322d744c7344841ef238386dd9462ba37b1f3..4255904d35ade178e2267d5e8a070c407cb7b4f2 100644
--- a/ui/ozone/platform/drm/host/drm_window_host.cc
+++ b/ui/ozone/platform/drm/host/drm_window_host.cc
@@ -113,7 +113,7 @@ void DrmWindowHost::SetCursor(PlatformCursor cursor) {
}
void DrmWindowHost::MoveCursorTo(const gfx::Point& location) {
- event_factory_->WarpCursorTo(widget_, location);
+ event_factory_->WarpCursorTo(widget_, gfx::PointF(location));
}
void DrmWindowHost::ConfineCursorToBounds(const gfx::Rect& bounds) {
@@ -162,7 +162,7 @@ bool DrmWindowHost::CanDispatchEvent(const PlatformEvent& ne) {
return display_bounds == bounds_;
} else if (event->IsLocatedEvent()) {
LocatedEvent* located_event = static_cast<LocatedEvent*>(event);
- return bounds_.Contains(gfx::ToFlooredPoint(located_event->location()));
+ return bounds_.Contains(located_event->location());
}
// TODO(spang): For non-ash builds we would need smarter keyboard focus.
@@ -176,10 +176,10 @@ uint32_t DrmWindowHost::DispatchEvent(const PlatformEvent& native_event) {
if (event->IsLocatedEvent()) {
// Make the event location relative to this window's origin.
LocatedEvent* located_event = static_cast<LocatedEvent*>(event);
- gfx::PointF location = located_event->location();
- location -= bounds_.OffsetFromOrigin();
- located_event->set_location(location);
- located_event->set_root_location(location);
+ gfx::PointF location = located_event->location_f();
+ location -= gfx::Vector2dF(bounds_.OffsetFromOrigin());
+ located_event->set_location_f(location);
+ located_event->set_root_location_f(location);
}
DispatchEventFromNativeUiEvent(
native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent,
« no previous file with comments | « ui/ozone/platform/drm/host/drm_cursor.cc ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698