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

Unified Diff: mojo/converters/input_events/input_events_type_converters.cc

Issue 1029753002: Plumbs through android supplying multipe touch points (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: no pointer Created 5 years, 9 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 | « no previous file | mojo/services/input_events/public/interfaces/input_events.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/converters/input_events/input_events_type_converters.cc
diff --git a/mojo/converters/input_events/input_events_type_converters.cc b/mojo/converters/input_events/input_events_type_converters.cc
index 00370774954ec9c7fdf8144b7561ff77ac67e29c..1c7e45167300cbca2315a608f76135ddfba1cda1 100644
--- a/mojo/converters/input_events/input_events_type_converters.cc
+++ b/mojo/converters/input_events/input_events_type_converters.cc
@@ -183,11 +183,10 @@ EventPtr TypeConverter<EventPtr, ui::Event>::Convert(const ui::Event& input) {
pointer_data->kind = POINTER_KIND_TOUCH;
pointer_data->x = static_cast<float>(touch_event->location().x());
pointer_data->y = static_cast<float>(touch_event->location().y());
- pointer_data->radius_major =
- std::max(touch_event->radius_x(), touch_event->radius_y());
- pointer_data->radius_minor =
- std::max(touch_event->radius_x(), touch_event->radius_y());
+ pointer_data->radius_major = touch_event->radius_x();
+ pointer_data->radius_minor = touch_event->radius_y();
pointer_data->pressure = touch_event->force();
+ pointer_data->orientation = touch_event->rotation_angle();
event->pointer_data = pointer_data.Pass();
} else if (input.IsKeyEvent()) {
const ui::KeyEvent* key_event = static_cast<const ui::KeyEvent*>(&input);
@@ -280,8 +279,9 @@ scoped_ptr<ui::Event> TypeConverter<scoped_ptr<ui::Event>, EventPtr>::Convert(
return make_scoped_ptr(new ui::TouchEvent(
MojoTouchEventTypeToUIEvent(input), location,
ui::EventFlags(input->flags), input->pointer_data->pointer_id,
- base::TimeDelta::FromInternalValue(input->time_stamp), 0.f, 0.f, 0.f,
- 0.f));
+ base::TimeDelta::FromInternalValue(input->time_stamp),
+ input->pointer_data->radius_major, input->pointer_data->radius_minor,
+ input->pointer_data->orientation, input->pointer_data->pressure));
default:
NOTIMPLEMENTED();
}
« no previous file with comments | « no previous file | mojo/services/input_events/public/interfaces/input_events.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698