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

Unified Diff: Source/platform/graphics/PathTraversalState.cpp

Issue 27123003: Move PathTraversalState.cpp/.h to platform/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 2 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
« no previous file with comments | « Source/platform/graphics/PathTraversalState.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/PathTraversalState.cpp
diff --git a/Source/core/platform/graphics/PathTraversalState.cpp b/Source/platform/graphics/PathTraversalState.cpp
similarity index 96%
rename from Source/core/platform/graphics/PathTraversalState.cpp
rename to Source/platform/graphics/PathTraversalState.cpp
index 532fbae555e38f251796d7475b70085feef7d528..406c5b180cd6a38866b28e5882f423e23e7270ef 100644
--- a/Source/core/platform/graphics/PathTraversalState.cpp
+++ b/Source/platform/graphics/PathTraversalState.cpp
@@ -18,7 +18,7 @@
*/
#include "config.h"
-#include "core/platform/graphics/PathTraversalState.h"
+#include "platform/graphics/PathTraversalState.h"
#include "wtf/MathExtras.h"
#include "wtf/Vector.h"
@@ -110,7 +110,7 @@ struct CubicBezier {
// FIXME: This function is possibly very slow due to the ifs required for proper path measuring
// A simple speed-up would be to use an additional boolean template parameter to control whether
// to use the "fast" version of this function with no PathTraversalState updating, vs. the slow
-// version which does update the PathTraversalState. We'll have to shark it to see if that's necessary.
+// version which does update the PathTraversalState. We'll have to shark it to see if that's necessary.
// Another check which is possible up-front (to send us down the fast path) would be to check if
// approximateDistance() + current total distance > desired distance
template<class CurveType>
@@ -132,8 +132,7 @@ static float curveLength(PathTraversalState& traversalState, CurveType curve)
curveStack.append(rightCurve);
} else {
totalLength += length;
- if (traversalState.m_action == PathTraversalState::TraversalPointAtLength
- || traversalState.m_action == PathTraversalState::TraversalNormalAngleAtLength) {
+ if (traversalState.m_action == PathTraversalState::TraversalPointAtLength || traversalState.m_action == PathTraversalState::TraversalNormalAngleAtLength) {
traversalState.m_previous = curve.start;
traversalState.m_current = curve.end;
if (traversalState.m_totalLength + totalLength > traversalState.m_desiredLength)
@@ -213,8 +212,9 @@ void PathTraversalState::processSegment()
if (m_action == TraversalPointAtLength) {
float offset = m_desiredLength - m_totalLength;
m_current.move(offset * cosf(slope), offset * sinf(slope));
- } else
+ } else {
m_normalAngle = rad2deg(slope);
+ }
m_success = true;
}
m_previous = m_current;
« no previous file with comments | « Source/platform/graphics/PathTraversalState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698