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

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: No more templates Created 9 years, 6 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
« ui/ui_unittests.gypi ('K') | « ui/ui_unittests.gypi ('k') | no next file » | 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 10132d3e67f5973083a50f99694f07036289d159..615f475a60c4476ec3401566f556c14d2833c8d9 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -16,6 +16,7 @@
#include "ui/gfx/canvas_skia.h"
#include "ui/gfx/compositor/compositor.h"
#include "ui/gfx/path.h"
+#include "ui/gfx/point3.h"
#include "ui/gfx/transform.h"
#include "views/background.h"
#include "views/layout/layout_manager.h"
@@ -1570,7 +1571,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;
}
@@ -1578,7 +1581,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;
}
« ui/ui_unittests.gypi ('K') | « ui/ui_unittests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698