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

Side by Side Diff: cc/base/math_util.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/base/math_util.cc » ('j') | cc/layers/render_surface_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_BASE_MATH_UTIL_H_ 5 #ifndef CC_BASE_MATH_UTIL_H_
6 #define CC_BASE_MATH_UTIL_H_ 6 #define CC_BASE_MATH_UTIL_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 const gfx::Vector2dF& destination); 173 const gfx::Vector2dF& destination);
174 174
175 // Conversion to value. 175 // Conversion to value.
176 static scoped_ptr<base::Value> AsValue(const gfx::Size& s); 176 static scoped_ptr<base::Value> AsValue(const gfx::Size& s);
177 static scoped_ptr<base::Value> AsValue(const gfx::SizeF& s); 177 static scoped_ptr<base::Value> AsValue(const gfx::SizeF& s);
178 static scoped_ptr<base::Value> AsValue(const gfx::Rect& r); 178 static scoped_ptr<base::Value> AsValue(const gfx::Rect& r);
179 static bool FromValue(const base::Value*, gfx::Rect* out_rect); 179 static bool FromValue(const base::Value*, gfx::Rect* out_rect);
180 static scoped_ptr<base::Value> AsValue(const gfx::PointF& q); 180 static scoped_ptr<base::Value> AsValue(const gfx::PointF& q);
181 static scoped_ptr<base::Value> AsValue(const gfx::Point3F&); 181 static scoped_ptr<base::Value> AsValue(const gfx::Point3F&);
182 static scoped_ptr<base::Value> AsValue(const gfx::Vector2d& v); 182 static scoped_ptr<base::Value> AsValue(const gfx::Vector2d& v);
183 static scoped_ptr<base::Value> AsValue(const gfx::Vector2dF& v);
183 static scoped_ptr<base::Value> AsValue(const gfx::QuadF& q); 184 static scoped_ptr<base::Value> AsValue(const gfx::QuadF& q);
184 static scoped_ptr<base::Value> AsValue(const gfx::RectF& rect); 185 static scoped_ptr<base::Value> AsValue(const gfx::RectF& rect);
185 static scoped_ptr<base::Value> AsValue(const gfx::Transform& transform); 186 static scoped_ptr<base::Value> AsValue(const gfx::Transform& transform);
186 static scoped_ptr<base::Value> AsValue(const gfx::BoxF& box); 187 static scoped_ptr<base::Value> AsValue(const gfx::BoxF& box);
187 188
188 // Returns a base::Value representation of the floating point value. 189 // Returns a base::Value representation of the floating point value.
189 // If the value is inf, returns max double/float representation. 190 // If the value is inf, returns max double/float representation.
190 static scoped_ptr<base::Value> AsValueSafely(double value); 191 static scoped_ptr<base::Value> AsValueSafely(double value);
191 static scoped_ptr<base::Value> AsValueSafely(float value); 192 static scoped_ptr<base::Value> AsValueSafely(float value);
192 }; 193 };
193 194
194 } // namespace cc 195 } // namespace cc
195 196
196 #endif // CC_BASE_MATH_UTIL_H_ 197 #endif // CC_BASE_MATH_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/base/math_util.cc » ('j') | cc/layers/render_surface_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698