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

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
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 1531710d622ccc6097d1adac2f32d150c8eab2c6..a19c7c5cf0fc73fcdd86bffa814c0e8100289753 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());
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698