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

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

Issue 2630483002: Remove 2d MapClippedQuad. (Closed)
Patch Set: rebased Created 3 years, 11 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
« 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 #include <memory> 10 #include <memory>
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // alignment and the resulting rect will not be clipped. 180 // alignment and the resulting rect will not be clipped.
181 static gfx::Rect MapEnclosedRectWith2dAxisAlignedTransform( 181 static gfx::Rect MapEnclosedRectWith2dAxisAlignedTransform(
182 const gfx::Transform& transform, 182 const gfx::Transform& transform,
183 const gfx::Rect& rect); 183 const gfx::Rect& rect);
184 184
185 // Returns an array of vertices that represent the clipped polygon. After 185 // Returns an array of vertices that represent the clipped polygon. After
186 // returning, indexes from 0 to num_vertices_in_clipped_quad are valid in the 186 // returning, indexes from 0 to num_vertices_in_clipped_quad are valid in the
187 // clipped_quad array. Note that num_vertices_in_clipped_quad may be zero, 187 // clipped_quad array. Note that num_vertices_in_clipped_quad may be zero,
188 // which means the entire quad was clipped, and none of the vertices in the 188 // which means the entire quad was clipped, and none of the vertices in the
189 // array are valid. 189 // array are valid.
190 static void MapClippedQuad(const gfx::Transform& transform,
191 const gfx::QuadF& src_quad,
192 gfx::PointF clipped_quad[8],
193 int* num_vertices_in_clipped_quad);
194 static bool MapClippedQuad3d(const gfx::Transform& transform, 190 static bool MapClippedQuad3d(const gfx::Transform& transform,
195 const gfx::QuadF& src_quad, 191 const gfx::QuadF& src_quad,
196 gfx::Point3F clipped_quad[8], 192 gfx::Point3F clipped_quad[8],
197 int* num_vertices_in_clipped_quad); 193 int* num_vertices_in_clipped_quad);
198 194
199 static gfx::RectF ComputeEnclosingRectOfVertices(const gfx::PointF vertices[], 195 static gfx::RectF ComputeEnclosingRectOfVertices(const gfx::PointF vertices[],
200 int num_vertices); 196 int num_vertices);
201 static gfx::RectF ComputeEnclosingClippedRect( 197 static gfx::RectF ComputeEnclosingClippedRect(
202 const HomogeneousCoordinate& h1, 198 const HomogeneousCoordinate& h1,
203 const HomogeneousCoordinate& h2, 199 const HomogeneousCoordinate& h2,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 private: 333 private:
338 #ifdef __SSE__ 334 #ifdef __SSE__
339 unsigned int orig_state_; 335 unsigned int orig_state_;
340 #endif 336 #endif
341 DISALLOW_COPY_AND_ASSIGN(ScopedSubnormalFloatDisabler); 337 DISALLOW_COPY_AND_ASSIGN(ScopedSubnormalFloatDisabler);
342 }; 338 };
343 339
344 } // namespace cc 340 } // namespace cc
345 341
346 #endif // CC_BASE_MATH_UTIL_H_ 342 #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