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

Unified Diff: Source/core/html/canvas/CanvasPathMethods.cpp

Issue 801053009: ASSERTION FAILED: newStartAngle >= 0 && newStartAngle < twoPiFloat. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasPathMethods.cpp
diff --git a/Source/core/html/canvas/CanvasPathMethods.cpp b/Source/core/html/canvas/CanvasPathMethods.cpp
index 37df15d162ead38e8d0aec5fe0534a62095e5b1b..85a13a49e65878d060ad0f58e72d77facd684638 100644
--- a/Source/core/html/canvas/CanvasPathMethods.cpp
+++ b/Source/core/html/canvas/CanvasPathMethods.cpp
@@ -179,15 +179,14 @@ inline FloatPoint getPointOnEllipse(float radiusX, float radiusY, float theta)
void canonicalizeAngle(float* startAngle, float* endAngle)
{
// Make 0 <= startAngle < 2*PI
- float newStartAngle = *startAngle;
+ float newStartAngle = fmodf(*startAngle, twoPiFloat);
if (newStartAngle < 0)
- newStartAngle = twoPiFloat + fmodf(newStartAngle, -twoPiFloat);
- else
- newStartAngle = fmodf(newStartAngle, twoPiFloat);
+ newStartAngle += twoPiFloat;
float delta = newStartAngle - *startAngle;
*startAngle = newStartAngle;
*endAngle = *endAngle + delta;
+
ASSERT(newStartAngle >= 0 && newStartAngle < twoPiFloat);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698