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

Unified Diff: cc/base/math_util.cc

Issue 394193003: Implement HiDPI and pinch-zoom scaling of filter params (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unittests Created 6 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
Index: cc/base/math_util.cc
diff --git a/cc/base/math_util.cc b/cc/base/math_util.cc
index 07ad77bd7703d8fc2ed7768858044a7a9b348688..5e34824f445c8c016311033c1babc931b1c4f19d 100644
--- a/cc/base/math_util.cc
+++ b/cc/base/math_util.cc
@@ -606,6 +606,13 @@ scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Vector2d& v) {
return res.PassAs<base::Value>();
}
+scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Vector2dF& v) {
+ scoped_ptr<base::ListValue> res(new base::ListValue());
+ res->AppendDouble(v.x());
+ res->AppendDouble(v.y());
+ return res.PassAs<base::Value>();
+}
+
scoped_ptr<base::Value> MathUtil::AsValue(const gfx::QuadF& q) {
scoped_ptr<base::ListValue> res(new base::ListValue());
res->AppendDouble(q.p1().x());

Powered by Google App Engine
This is Rietveld 408576698