aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathTest.cpp
Commit message (Collapse)AuthorAge
...
* Revert "add asserts to point<-->verb helpers"Gravatar reed@google.com2013-05-30
| | | | | | This reverts commit b4775ac7b55802e87231768f002e4b42f233b0aa. git-svn-id: http://skia.googlecode.com/svn/trunk@9347 2bbb7eff-a529-9590-31e7-b0007b416f81
* add asserts to point<-->verb helpersGravatar reed@google.com2013-05-30
| | | | | | | | | | patch from issue 16153005 BUG= Review URL: https://codereview.chromium.org/16195004 git-svn-id: http://skia.googlecode.com/svn/trunk@9344 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-05-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9189 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add special handling of rectori case for gpuGravatar robertphillips@google.com2013-05-17
| | | | | | | | https://codereview.chromium.org/15080010/ git-svn-id: http://skia.googlecode.com/svn/trunk@9175 2bbb7eff-a529-9590-31e7-b0007b416f81
* need to clamp all of the cubic points after a chop, in case our finite precisionGravatar reed@google.com2013-05-08
| | | | | | | | | | | | meant we didn't compute values below the chop-point. crbug:234190 R=caryclark@google.com Review URL: https://codereview.chromium.org/14607012 git-svn-id: http://skia.googlecode.com/svn/trunk@9071 2bbb7eff-a529-9590-31e7-b0007b416f81
* turn on pathops unit testGravatar caryclark@google.com2013-04-12
| | | | | | | | | | | | | | | | | | | This temporarily disables SK_ENABLE_INST_COUNT ( skbug.com/1219 ) This fixes a linktime error on VS2012 in PathTest.cpp; -SK_ScalarInfinity should be SK_ScalarNegativeInfinity instead. This adds pathops and pathops unit tests to the main unit tests. Should this change destabilize anything, it should be sufficient to comment out the pathops gypi includes. at test.gyp:18,21. Review URL: https://codereview.chromium.org/14137010 git-svn-id: http://skia.googlecode.com/svn/trunk@8644 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8608 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix bug introduced with SK_IGNORE_CUBIC_STROKE_FIX where we no longer respectedGravatar reed@google.com2013-04-10
| | | | | | | | | | | | | subDivide limit. This caused problems with degenate paths (too much recursion). The fix was two parts: 1. decrement the subDivide limit as we recurse 2. up the limit for cubics to 7, to match our current quality added unittest that replicated the too-much-recursion bug. Review URL: https://codereview.chromium.org/14086002 git-svn-id: http://skia.googlecode.com/svn/trunk@8599 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change random number generator for 'tests' to SkMWCRandom. Also removes some Gravatar jvanverth@google.com2013-03-04
| | | | | | | | | | | | | | | | | | | | unused headers and fixes a couple of bugs exposed by changing the random number generator: First, the function SkMatrix::getMaxStretch() had an error where it was testing the square of a number against near-zero. This led to it occasionally taking a cheaper but imprecise path for computing the eigenvalues of the matrix. It's been replaced with a check against the square of SK_ScalarNearlyZero. The second case was a failure in ClipStackTest, where it hit the rare case of a practically empty clip stack (it has a single Union) and we set a tight bounds. The bounds rect doesn't get set by GrReducedClip::ReduceClipStack() in this case, so when it clips the reduced stack it's clipping against garbage, and the resulting regions don't match. The solution is to initialize the tightBounds rect. git-svn-id: http://skia.googlecode.com/svn/trunk@7952 2bbb7eff-a529-9590-31e7-b0007b416f81
* Tests : Unused parameters cleanupGravatar sugoi@google.com2013-02-27
| | | | | | | I removed unused parameters in the tests wherever it was trivial to do so. I'm trying to get the easy ones out of the way before we get into more involved discussions around this. Review URL: https://codereview.appspot.com/7394055 git-svn-id: http://skia.googlecode.com/svn/trunk@7891 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove obsolete build flag SK_IGNORE_CONVEX_QUAD_OPTGravatar reed@google.com2013-02-22
| | | | | | Review URL: https://codereview.appspot.com/7363046 git-svn-id: http://skia.googlecode.com/svn/trunk@7820 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverse sense of convex-quad-fix compiler flagGravatar robertphillips@google.com2013-01-23
| | | | | | | | https://codereview.appspot.com/7206045/ git-svn-id: http://skia.googlecode.com/svn/trunk@7349 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7293 2bbb7eff-a529-9590-31e7-b0007b416f81
* increase iteration count from 16 to 24, when computing cubic-line intersection.Gravatar reed@google.com2013-01-18
| | | | | | | | | | | This fixes crbug 170666. Before the fix, were were finishing the "clip" step with a curve that was still partly negative, and so as assert would fire. added unittest to confirm that the assert doesn't fire. git-svn-id: http://skia.googlecode.com/svn/trunk@7278 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7215 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix bug in cubic-clipper (SkEdgeClipper). When we chop the cubic on Top/BottomGravatar reed@google.com2013-01-15
| | | | | | | | | | | | | | | | | of the cliprect, we (correctly) clamp the Y coordinate of the control-point right next to the on-curve point that was chopped (this ensures we don't go slightly outside of the clip-rect due to imperfect T value calculation). However, the code was also clamping the other control-point as well, resulting in warping the cubic, which could sometimes force it outside of the clip. The fix is to just remove the line of code that clampped the 2nd control-point. unittest added to reproduce a test cubic that triggered an assert, due to the cubic being outside of the cliprect. The test (w/o the fix) will assert in a SK_DEBUG build. Review URL: https://codereview.appspot.com/7100056 git-svn-id: http://skia.googlecode.com/svn/trunk@7184 2bbb7eff-a529-9590-31e7-b0007b416f81
* Enable warnings-as-errors on Windows.Gravatar bsalomon@google.com2013-01-08
| | | | | | Review URL: https://codereview.appspot.com/7066054 git-svn-id: http://skia.googlecode.com/svn/trunk@7094 2bbb7eff-a529-9590-31e7-b0007b416f81
* check for bad enum use when adding contoursGravatar reed@google.com2012-11-26
| | | | | | Review URL: https://codereview.appspot.com/6849103 git-svn-id: http://skia.googlecode.com/svn/trunk@6547 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-11-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6540 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add isRect variant that returns path closure and direction.Gravatar caryclark@google.com2012-11-21
| | | | | | | | Add path test to verify that when isRect() returns false, output parameters are unchanged. Review URL: https://codereview.appspot.com/6855074 git-svn-id: http://skia.googlecode.com/svn/trunk@6524 2bbb7eff-a529-9590-31e7-b0007b416f81
* detect wrapped rect in pathGravatar caryclark@google.com2012-11-21
| | | | | | | | | | | | | Allow a rect to start in the middle of a span, and wrap all the way around. Initialize variable to suppress warning. Add tests to detect rects constructed from a stroked path. Review URL: https://codereview.appspot.com/6847082 git-svn-id: http://skia.googlecode.com/svn/trunk@6522 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-11-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6500 2bbb7eff-a529-9590-31e7-b0007b416f81
* add two nested rect detector to pathGravatar caryclark@google.com2012-11-19
| | | | | | | | | | | | | Tease apart existing one rect path detector so that a new variant can detect two nested rects as well. Add tests to verify that both one and two rect detectors both work and return the correct results. Suppress other warnings in PathTest. Review URL: https://codereview.appspot.com/6850059 git-svn-id: http://skia.googlecode.com/svn/trunk@6475 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove unused (and undefined) SkColorSpace parameter.Gravatar mike@reedtribe.org2012-11-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6427 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-11-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6413 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a conservativelyContainsRect function to SkPath.Gravatar bsalomon@google.com2012-11-13
| | | | | | Review URL: https://codereview.appspot.com/6852044 git-svn-id: http://skia.googlecode.com/svn/trunk@6411 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-11-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6409 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkPath cache the result of cheapComputeDirection.Gravatar bsalomon@google.com2012-11-13
| | | | | | Review URL: https://codereview.appspot.com/6810111 git-svn-id: http://skia.googlecode.com/svn/trunk@6394 2bbb7eff-a529-9590-31e7-b0007b416f81
* add tests for degenerate serifs to computeDirectionGravatar reed@google.com2012-11-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6391 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-10-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6088 2bbb7eff-a529-9590-31e7-b0007b416f81
* If a path is known to be nonfinite, don't forget that in our autoboundsGravatar reed@google.com2012-10-24
| | | | | | | | | helper. "Once a non-finite, always a non-finite". Inspired by crbug/157157 Review URL: https://codereview.appspot.com/6764047 git-svn-id: http://skia.googlecode.com/svn/trunk@6087 2bbb7eff-a529-9590-31e7-b0007b416f81
* Removed degenerate quads from zero radius Chrome-style round rectsGravatar robertphillips@google.com2012-10-23
| | | | | | | | https://codereview.appspot.com/6737059/ git-svn-id: http://skia.googlecode.com/svn/trunk@6053 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-10-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6013 2bbb7eff-a529-9590-31e7-b0007b416f81
* Place r5997 (make arcto's convex) behind a compiler flag to delay day of ↵Gravatar robertphillips@google.com2012-10-19
| | | | | | reckoning with Webkit baselines git-svn-id: http://skia.googlecode.com/svn/trunk@6012 2bbb7eff-a529-9590-31e7-b0007b416f81
* Altered arcTo's canonical points to (usually) be convexGravatar robertphillips@google.com2012-10-18
| | | | | | | | | | https://codereview.appspot.com/6709051/ This will require rebaselining of: degeneratesegments, shadertext & shadertext2 git-svn-id: http://skia.googlecode.com/svn/trunk@5997 2bbb7eff-a529-9590-31e7-b0007b416f81
* fixed compiler complaintsGravatar robertphillips@google.com2012-09-17
| | | | | | | | http://codereview.appspot.com/6499124/ git-svn-id: http://skia.googlecode.com/svn/trunk@5565 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-09-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5561 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix fragile cubic stepper, where we want to assert that each tesselated segmentGravatar reed@google.com2012-09-14
| | | | | | | | | | | is monotonically going down, but the finite math we use cannot ensure that... so we explicitly pin the y-value after it is calculated. add unittest that exercises the bug/assert that was found on an SVG site git-svn-id: http://skia.googlecode.com/svn/trunk@5544 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix handling of infinite bounds during "fast transforms".Gravatar tomhudson@google.com2012-08-10
| | | | | | | | http://codereview.appspot.com/6449125/ git-svn-id: http://skia.googlecode.com/svn/trunk@5042 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding storage of SkPath::fIsOvalGravatar robertphillips@google.com2012-08-07
| | | | | | | | http://codereview.appspot.com/6453085/ git-svn-id: http://skia.googlecode.com/svn/trunk@4991 2bbb7eff-a529-9590-31e7-b0007b416f81
* check that copied paths have the same segment-masks as their srcGravatar reed@google.com2012-08-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4898 2bbb7eff-a529-9590-31e7-b0007b416f81
* explicitly track if a path is finite or notGravatar reed@google.com2012-07-26
| | | | | | | | we need this (it appears) so we can definitively reject non-finite paths in canvas, before passing them down into the guts. Review URL: https://codereview.appspot.com/6453047 git-svn-id: http://skia.googlecode.com/svn/trunk@4784 2bbb7eff-a529-9590-31e7-b0007b416f81
* Handle convex paths with degeneracies in cheap direction computationGravatar bsalomon@google.com2012-07-10
| | | | | | | | Review URL: http://codereview.appspot.com/6349085/ git-svn-id: http://skia.googlecode.com/svn/trunk@4515 2bbb7eff-a529-9590-31e7-b0007b416f81
* Really fix the build.Gravatar schenney@chromium.org2012-06-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4253 2bbb7eff-a529-9590-31e7-b0007b416f81
* Speculative build fix. Tests do not fail locally.Gravatar schenney@chromium.org2012-06-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4248 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix the problem of rendering closePath not properly after a moveTo call inGravatar schenney@chromium.org2012-06-13
| | | | | | | | | | | | | | | | | | | | canvas 2D interface. If there is a polyline, followed by a moveTo and a closePath, both the moveTo and the closePath should be ignored for the purposes of drawing, and the polyline should not be closed (unless force closed is true (for filling, for instance). Tested for path with both valid and degenerate content, when asked to consume degenerates and not, force closed and not. This patch also includes a uni test refactoring to reduce the amount of code to test path iteration and zero length paths. BUG=6297049 TEST=tests/PathTest.cpp, testIter method. Review URL: https://codereview.appspot.com/6300086 git-svn-id: http://skia.googlecode.com/svn/trunk@4247 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename the existing flatten(void*) methods.Gravatar djsollen@google.com2012-06-08
| | | | | | | | This change avoids naminc confusion with the SkFlattenable flatten methods and also changes SkPath to use the void* model instead of taking a SkReader32. Review URL: https://codereview.appspot.com/6299062 git-svn-id: http://skia.googlecode.com/svn/trunk@4215 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkPath::getVerbs/countVerbsGravatar bsalomon@google.com2012-06-07
| | | | | | | Review URL: http://codereview.appspot.com/6306053/ git-svn-id: http://skia.googlecode.com/svn/trunk@4209 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warnings on Mac in testsGravatar caryclark@google.com2012-06-06
| | | | | | | | | | | | | | | | | | Fix these class of warnings: - unused functions - unused locals - sign mismatch - missing function prototypes - missing newline at end of file - 64 to 32 bit truncation The changes prefer to link in dead code in the debug build with 'if (false)' than to comment it out, but trivial cases are commented out or sometimes deleted if it appears to be a copy/paste error. Review URL: https://codereview.appspot.com/6301045 git-svn-id: http://skia.googlecode.com/svn/trunk@4175 2bbb7eff-a529-9590-31e7-b0007b416f81