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

Unified Diff: ui/aura/root_window.cc

Issue 11418040: gfx::Transform API clean-up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index d734807d7a3c487490e0817ec554b49317ffc55f..607c60992c797300a0b95cea9f9a4d71cf8e30be 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -588,8 +588,9 @@ gfx::Point RootWindow::QueryMouseLocationForTest() const {
void RootWindow::TransformEventForDeviceScaleFactor(ui::LocatedEvent* event) {
float scale = ui::GetDeviceScaleFactor(layer());
- gfx::Transform transform = layer()->transform();
- transform.ConcatScale(scale, scale);
+ gfx::Transform transform;
+ transform.Scale(scale, scale);
+ transform *= layer()->transform();
event->UpdateForRootTransform(transform);
}
@@ -1032,9 +1033,10 @@ void RootWindow::SynthesizeMouseMoveEvent() {
#if !defined(OS_WIN)
// Temporarily disabled for windows. See crbug.com/112222.
gfx::Point3F point(GetLastMouseLocationInRoot());
- gfx::Transform transform = layer()->transform();
float scale = ui::GetDeviceScaleFactor(layer());
- transform.ConcatScale(scale, scale);
+ gfx::Transform transform;
+ transform.Scale(scale, scale);
+ transform *= layer()->transform();
transform.TransformPoint(point);
gfx::Point orig_mouse_location = gfx::ToFlooredPoint(point.AsPointF());

Powered by Google App Engine
This is Rietveld 408576698