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

Unified Diff: views/view.cc

Issue 7044062: Use SkMatrix44 for the underlying implementation of ui::Transform (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Gardening patch Created 9 years, 5 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/ui_unittests.gypi ('k') | views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view.cc
diff --git a/views/view.cc b/views/view.cc
index 5f126a7e74827e5dedd4ccd9420871c1122e64b3..98ae12ba35dc3889be1ac13095964be16298d34e 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -17,6 +17,7 @@
#include "ui/gfx/compositor/compositor.h"
#include "ui/gfx/compositor/layer.h"
#include "ui/gfx/path.h"
+#include "ui/gfx/point3.h"
#include "ui/gfx/transform.h"
#include "views/background.h"
#include "views/context_menu_controller.h"
@@ -1715,7 +1716,9 @@ bool View::ConvertPointForAncestor(const View* ancestor,
ui::Transform trans;
// TODO(sad): Have some way of caching the transformation results.
bool result = GetTransformRelativeTo(ancestor, &trans);
- trans.TransformPoint(point);
+ gfx::Point3f p(*point);
+ trans.TransformPoint(p);
+ *point = p.AsPoint();
return result;
}
@@ -1723,7 +1726,9 @@ bool View::ConvertPointFromAncestor(const View* ancestor,
gfx::Point* point) const {
ui::Transform trans;
bool result = GetTransformRelativeTo(ancestor, &trans);
- trans.TransformPointReverse(point);
+ gfx::Point3f p(*point);
+ trans.TransformPointReverse(p);
+ *point = p.AsPoint();
return result;
}
« no previous file with comments | « ui/ui_unittests.gypi ('k') | views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698