aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathTest.cpp
Commit message (Collapse)AuthorAge
* Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, ↵Gravatar reed@google.com2013-10-31
| | | | | | | | | | | | since it triggers a warning"" This reverts commit 1e787c38fa71f2a21fd728f1b1d620b9b09b0d3d. BUG= Review URL: https://codereview.chromium.org/54603004 git-svn-id: http://skia.googlecode.com/svn/trunk@12057 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it ↵Gravatar reed@google.com2013-10-31
| | | | | | | | triggers a warning" This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497. git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers ↵Gravatar reed@google.com2013-10-31
| | | | | | | | | | | a warning BUG= R=robertphillips@google.com, senorblanco@chromium.org, vandebo@chromium.org Review URL: https://codereview.chromium.org/51033004 git-svn-id: http://skia.googlecode.com/svn/trunk@12055 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use SkPathRef gen id for SkPath::getGenerationIDGravatar commit-bot@chromium.org2013-10-30
| | | | | | | | | | R=mtklein@google.com, robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/49693002 git-svn-id: http://skia.googlecode.com/svn/trunk@12029 2bbb7eff-a529-9590-31e7-b0007b416f81
* add disabled tests, in pref for experimental isRect behaviorGravatar reed@google.com2013-10-16
| | | | | | | | | BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/27513003 git-svn-id: http://skia.googlecode.com/svn/trunk@11810 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-10-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11800 2bbb7eff-a529-9590-31e7-b0007b416f81
* account for inverse-paths when we prealloc storage in the rgn-builderGravatar reed@google.com2013-10-15
| | | | | | | | | | | test inversepath->rgn BUG= R=caryclark@google.com Review URL: https://codereview.chromium.org/27222005 git-svn-id: http://skia.googlecode.com/svn/trunk@11776 2bbb7eff-a529-9590-31e7-b0007b416f81
* meant to DISABLE this testGravatar reed@google.com2013-10-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11775 2bbb7eff-a529-9590-31e7-b0007b416f81
* add test for https://code.google.com/p/skia/issues/detail?id=1706Gravatar reed@google.com2013-10-15
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/27344002 git-svn-id: http://skia.googlecode.com/svn/trunk@11774 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor PathTest.cpp test_isNestedRects and test_isRect.Gravatar bungeman@google.com2013-09-25
| | | | | | | | | | | The existing implementations make it difficult to add new tests and rely on non-local side effects. R=bsalomon@google.com Review URL: https://codereview.chromium.org/24502004 git-svn-id: http://skia.googlecode.com/svn/trunk@11455 2bbb7eff-a529-9590-31e7-b0007b416f81
* promote SkImage::AlphaType to SkAlphaTypeGravatar reed@google.com2013-09-20
| | | | | | | | | BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/24130009 git-svn-id: http://skia.googlecode.com/svn/trunk@11421 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change old PRG to be SkLCGRandom; change new one to SkRandomGravatar commit-bot@chromium.org2013-09-09
| | | | | | | | | | | | | | The goal here is to get people to start using the new random number generator, while leaving the old one in place so we don't have to rebaseline GMs. R=reed@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23576015 git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
* My clang now doesn't complain about !"foo".Gravatar mtklein@google.com2013-08-22
| | | | | | | | | BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/22875037 git-svn-id: http://skia.googlecode.com/svn/trunk@10874 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update how SkPath handles fGenerationID and fSourcePath, and add tests to cover.Gravatar mtklein@google.com2013-08-15
| | | | | | | | | BUG= R=bungeman@google.com, reed@google.com Review URL: https://codereview.chromium.org/22911002 git-svn-id: http://skia.googlecode.com/svn/trunk@10756 2bbb7eff-a529-9590-31e7-b0007b416f81
* All rSomethingTo() immediately following a close() are relative to the point ↵Gravatar commit-bot@chromium.org2013-08-09
| | | | | | | | | | | | | | | we closed from, not the point we close to. Fix that. Seems like this has been broken since the stone ages. BUG=skia:1474, code.google.com/p/android/issues/detail?id=41216 R=bsalomon@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/22681006 git-svn-id: http://skia.googlecode.com/svn/trunk@10666 2bbb7eff-a529-9590-31e7-b0007b416f81
* Restore SkPath(const SkPath&) to copy the generation ID on Android.Gravatar mtklein@google.com2013-08-07
| | | | | | | | | BUG= R=bsalomon@google.com, bungeman@google.com, reed@google.com Review URL: https://codereview.chromium.org/22471002 git-svn-id: http://skia.googlecode.com/svn/trunk@10622 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkPath::conservativelyContainsRect not assert on paths that begin with ↵Gravatar commit-bot@chromium.org2013-08-01
| | | | | | | | | | | | repeated moveTos R=reed@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/21565002 git-svn-id: http://skia.googlecode.com/svn/trunk@10484 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r9724 (add rect-output parameter to isRect) to allow the DEPS rollGravatar robertphillips@google.com2013-06-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9750 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-06-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9738 2bbb7eff-a529-9590-31e7-b0007b416f81
* add rect-output parameter to isRect, allowing us to return the correct ↵Gravatar reed@google.com2013-06-21
| | | | | | | | | | | | bounds even if a rectagular path has a trailing moveTo https://code.google.com/p/chromium/issues/detail?id=247770 R=caryclark@google.com Review URL: https://codereview.chromium.org/16950021 git-svn-id: http://skia.googlecode.com/svn/trunk@9724 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkPath::rewind needs to have same reset as SkPath::reset.Gravatar bungeman@google.com2013-06-21
| | | | | | | | R=caryclark@google.com, reed@google.com Review URL: https://codereview.chromium.org/17432003 git-svn-id: http://skia.googlecode.com/svn/trunk@9718 2bbb7eff-a529-9590-31e7-b0007b416f81
* bump picture version since SkPath has changed (conics)Gravatar reed@google.com2013-05-31
| | | | | | enable conics in SkPath git-svn-id: http://skia.googlecode.com/svn/trunk@9370 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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