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

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: Layer animator updates 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
Index: views/view.cc
diff --git a/views/view.cc b/views/view.cc
index 84bb6eadcb7617e77c357feab1cb6edf95a41f42..89e0a6dc5c687166070cdc4906c85fb02e984c34 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"
@@ -1623,7 +1624,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;
}
@@ -1631,7 +1634,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;
}

Powered by Google App Engine
This is Rietveld 408576698