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

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

Issue 295193002: Get rid of graphics layer anchor points, and replace with transform origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « android_webview/browser/hardware_renderer.cc ('k') | cc/base/math_util.cc » ('j') | no next file with comments »
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // to be normalized. 171 // to be normalized.
172 static gfx::Vector2dF ProjectVector(const gfx::Vector2dF& source, 172 static gfx::Vector2dF ProjectVector(const gfx::Vector2dF& source,
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::Vector2d& v); 182 static scoped_ptr<base::Value> AsValue(const gfx::Vector2d& v);
182 static scoped_ptr<base::Value> AsValue(const gfx::QuadF& q); 183 static scoped_ptr<base::Value> AsValue(const gfx::QuadF& q);
183 static scoped_ptr<base::Value> AsValue(const gfx::RectF& rect); 184 static scoped_ptr<base::Value> AsValue(const gfx::RectF& rect);
184 static scoped_ptr<base::Value> AsValue(const gfx::Transform& transform); 185 static scoped_ptr<base::Value> AsValue(const gfx::Transform& transform);
185 static scoped_ptr<base::Value> AsValue(const gfx::BoxF& box); 186 static scoped_ptr<base::Value> AsValue(const gfx::BoxF& box);
186 187
187 // Returns a base::Value representation of the floating point value. 188 // Returns a base::Value representation of the floating point value.
188 // If the value is inf, returns max double/float representation. 189 // If the value is inf, returns max double/float representation.
189 static scoped_ptr<base::Value> AsValueSafely(double value); 190 static scoped_ptr<base::Value> AsValueSafely(double value);
190 static scoped_ptr<base::Value> AsValueSafely(float value); 191 static scoped_ptr<base::Value> AsValueSafely(float value);
191 }; 192 };
192 193
193 } // namespace cc 194 } // namespace cc
194 195
195 #endif // CC_BASE_MATH_UTIL_H_ 196 #endif // CC_BASE_MATH_UTIL_H_
OLDNEW
« no previous file with comments | « android_webview/browser/hardware_renderer.cc ('k') | cc/base/math_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698