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

Unified Diff: components/exo/wayland/server.cc

Issue 2648583003: Handle floating point coordinates from ozone to exosphere (Closed)
Patch Set: fixed wayland unittest Created 3 years, 11 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 | « components/exo/touch_unittest.cc ('k') | ui/events/cocoa/events_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/wayland/server.cc
diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
index ae0d0126a03b1e54d78831edeb33cc3ca4e87e3f..b13c3048dde501369d1d36ea3931bf26958575eb 100644
--- a/components/exo/wayland/server.cc
+++ b/components/exo/wayland/server.cc
@@ -2391,13 +2391,13 @@ class WaylandTouchDelegate : public TouchDelegate {
void OnTouchDown(Surface* surface,
base::TimeTicks time_stamp,
int id,
- const gfx::Point& location) override {
+ const gfx::PointF& location) override {
wl_resource* surface_resource = GetSurfaceResource(surface);
DCHECK(surface_resource);
wl_touch_send_down(touch_resource_, next_serial(),
TimeTicksToMilliseconds(time_stamp), surface_resource,
- id, wl_fixed_from_int(location.x()),
- wl_fixed_from_int(location.y()));
+ id, wl_fixed_from_double(location.x()),
+ wl_fixed_from_double(location.y()));
}
void OnTouchUp(base::TimeTicks time_stamp, int id) override {
wl_touch_send_up(touch_resource_, next_serial(),
@@ -2405,10 +2405,10 @@ class WaylandTouchDelegate : public TouchDelegate {
}
void OnTouchMotion(base::TimeTicks time_stamp,
int id,
- const gfx::Point& location) override {
+ const gfx::PointF& location) override {
wl_touch_send_motion(touch_resource_, TimeTicksToMilliseconds(time_stamp),
- id, wl_fixed_from_int(location.x()),
- wl_fixed_from_int(location.y()));
+ id, wl_fixed_from_double(location.x()),
+ wl_fixed_from_double(location.y()));
}
void OnTouchShape(int id, float major, float minor) override {
if (wl_resource_get_version(touch_resource_) >=
« no previous file with comments | « components/exo/touch_unittest.cc ('k') | ui/events/cocoa/events_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698