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

Unified Diff: ui/base/events/event.cc

Issue 12983010: Manually compute inverted matrix for screen rotation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « ui/base/events/event.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/events/event.cc
diff --git a/ui/base/events/event.cc b/ui/base/events/event.cc
index 288eab9de0b75236a9db82cc4846596d7343d183..552699e04ff8d287640c652ff3efef4a51ee4106 100644
--- a/ui/base/events/event.cc
+++ b/ui/base/events/event.cc
@@ -268,13 +268,10 @@ LocatedEvent::LocatedEvent(EventType type,
}
void LocatedEvent::UpdateForRootTransform(
- const gfx::Transform& root_transform) {
+ const gfx::Transform& reversed_root_transform) {
// Transform has to be done at root level.
gfx::Point3F p(location_);
- root_transform.TransformPointReverse(p);
- // TODO(oshima): Translating a point using reversed matrix can
- // results in small error like 0 -> -0.01, whose floored value
- // is -1 instead of 0. crbug.com/222483.
+ reversed_root_transform.TransformPoint(p);
root_location_ = location_ = gfx::ToFlooredPoint(p.AsPointF());
}
« no previous file with comments | « ui/base/events/event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698