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

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

Issue 266913021: Hit test on the layer tree rather than the RSLL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Helps if you upload all your files. Created 6 years, 7 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') | 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 bool* clipped); 137 bool* clipped);
138 static gfx::Point3F MapPoint(const gfx::Transform&, 138 static gfx::Point3F MapPoint(const gfx::Transform&,
139 const gfx::Point3F&, 139 const gfx::Point3F&,
140 bool* clipped); 140 bool* clipped);
141 static gfx::QuadF ProjectQuad(const gfx::Transform& transform, 141 static gfx::QuadF ProjectQuad(const gfx::Transform& transform,
142 const gfx::QuadF& quad, 142 const gfx::QuadF& quad,
143 bool* clipped); 143 bool* clipped);
144 static gfx::PointF ProjectPoint(const gfx::Transform& transform, 144 static gfx::PointF ProjectPoint(const gfx::Transform& transform,
145 const gfx::PointF& point, 145 const gfx::PointF& point,
146 bool* clipped); 146 bool* clipped);
147 // Identical to the above function, but coerces the homogeneous coordinate to
148 // a 3d rather than a 2d point.
149 static gfx::Point3F ProjectPoint3D(const gfx::Transform& transform,
150 const gfx::PointF& point,
151 bool* clipped);
147 152
148 static gfx::Vector2dF ComputeTransform2dScaleComponents(const gfx::Transform&, 153 static gfx::Vector2dF ComputeTransform2dScaleComponents(const gfx::Transform&,
149 float fallbackValue); 154 float fallbackValue);
150 155
151 // Makes a rect that has the same relationship to input_outer_rect as 156 // Makes a rect that has the same relationship to input_outer_rect as
152 // scale_inner_rect has to scale_outer_rect. scale_inner_rect should be 157 // scale_inner_rect has to scale_outer_rect. scale_inner_rect should be
153 // contained within scale_outer_rect, and likewise the rectangle that is 158 // contained within scale_outer_rect, and likewise the rectangle that is
154 // returned will be within input_outer_rect at a similar relative, scaled 159 // returned will be within input_outer_rect at a similar relative, scaled
155 // position. 160 // position.
156 static gfx::RectF ScaleRectProportional(const gfx::RectF& input_outer_rect, 161 static gfx::RectF ScaleRectProportional(const gfx::RectF& input_outer_rect,
(...skipping 24 matching lines...) Expand all
181 186
182 // Returns a base::Value representation of the floating point value. 187 // Returns a base::Value representation of the floating point value.
183 // If the value is inf, returns max double/float representation. 188 // If the value is inf, returns max double/float representation.
184 static scoped_ptr<base::Value> AsValueSafely(double value); 189 static scoped_ptr<base::Value> AsValueSafely(double value);
185 static scoped_ptr<base::Value> AsValueSafely(float value); 190 static scoped_ptr<base::Value> AsValueSafely(float value);
186 }; 191 };
187 192
188 } // namespace cc 193 } // namespace cc
189 194
190 #endif // CC_BASE_MATH_UTIL_H_ 195 #endif // CC_BASE_MATH_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/base/math_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698