bungeman@google.com
b8d9d5bd29
Refactor PathTest.cpp test_isNestedRects and test_isRect.
...
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
2013-09-25 18:21:39 +00:00
reed@google.com
d28ba8010c
promote SkImage::AlphaType to SkAlphaType
...
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
2013-09-20 19:33:52 +00:00
commit-bot@chromium.org
e0e7cfe44b
Change old PRG to be SkLCGRandom; change new one to SkRandom
...
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
2013-09-09 20:09:12 +00:00
mtklein@google.com
330313a8a8
My clang now doesn't complain about !"foo".
...
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
2013-08-22 15:37:26 +00:00
mtklein@google.com
cb8b0eeacf
Update how SkPath handles fGenerationID and fSourcePath, and add tests to cover.
...
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
2013-08-15 21:14:51 +00:00
commit-bot@chromium.org
9d54aeb8a1
All rSomethingTo() immediately following a close() are relative to the point 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
2013-08-09 19:48:26 +00:00
mtklein@google.com
9c9d4a7002
Restore SkPath(const SkPath&) to copy the generation ID on Android.
...
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
2013-08-07 19:17:53 +00:00
commit-bot@chromium.org
62df526042
Make SkPath::conservativelyContainsRect not assert on paths that begin with 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
2013-08-01 15:35:06 +00:00
robertphillips@google.com
8fd160350c
Revert r9724 (add rect-output parameter to isRect) to allow the DEPS roll
...
git-svn-id: http://skia.googlecode.com/svn/trunk@9750 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-25 15:39:58 +00:00
skia.committer@gmail.com
020b25becb
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@9738 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-22 07:00:58 +00:00
reed@google.com
da2b21fa9b
add rect-output parameter to isRect, allowing us to return the correct 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
2013-06-21 17:32:32 +00:00
bungeman@google.com
a5809a3e4c
SkPath::rewind needs to have same reset as SkPath::reset.
...
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
2013-06-21 15:13:34 +00:00
reed@google.com
277c3f8765
bump picture version since SkPath has changed (conics)
...
enable conics in SkPath
git-svn-id: http://skia.googlecode.com/svn/trunk@9370 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 15:17:50 +00:00
reed@google.com
fa2f2a48f6
Revert "add asserts to point<-->verb helpers"
...
This reverts commit b4775ac7b55802e87231768f002e4b42f233b0aa.
git-svn-id: http://skia.googlecode.com/svn/trunk@9347 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-30 15:29:48 +00:00
reed@google.com
7950a9eba7
add asserts to point<-->verb helpers
...
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
2013-05-30 14:57:55 +00:00
skia.committer@gmail.com
845220b817
Sanitizing source files in Housekeeper-Nightly
...
git-svn-id: http://skia.googlecode.com/svn/trunk@9189 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-20 11:51:35 +00:00
robertphillips@google.com
83d1a68141
Add special handling of rectori case for gpu
...
https://codereview.chromium.org/15080010/
git-svn-id: http://skia.googlecode.com/svn/trunk@9175 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-17 12:50:27 +00:00
reed@google.com
3eff3592ac
need to clamp all of the cubic points after a chop, in case our finite precision
...
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
2013-05-08 21:08:21 +00:00
caryclark@google.com
7abfa49390
turn on pathops unit test
...
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
2013-04-12 11:59:41 +00:00
skia.committer@gmail.com
391ca66276
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@8608 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-11 07:01:45 +00:00
reed@google.com
7a90daf258
fix bug introduced with SK_IGNORE_CUBIC_STROKE_FIX where we no longer respected
...
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
2013-04-10 18:44:00 +00:00
jvanverth@google.com
c490f801b0
Change random number generator for 'tests' to SkMWCRandom. Also removes some
...
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
2013-03-04 13:56:38 +00:00
sugoi@google.com
54f0d1b711
Tests : Unused parameters cleanup
...
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
2013-02-27 19:17:41 +00:00
reed@google.com
dff53c26e7
remove obsolete build flag SK_IGNORE_CONVEX_QUAD_OPT
...
Review URL: https://codereview.appspot.com/7363046
git-svn-id: http://skia.googlecode.com/svn/trunk@7820 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-22 14:19:58 +00:00
robertphillips@google.com
194bf824f0
Reverse sense of convex-quad-fix compiler flag
...
https://codereview.appspot.com/7206045/
git-svn-id: http://skia.googlecode.com/svn/trunk@7349 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 20:45:26 +00:00
skia.committer@gmail.com
36df7ed46b
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7293 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-19 07:05:38 +00:00
reed@google.com
64d6295b0f
increase iteration count from 16 to 24, when computing cubic-line intersection.
...
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
2013-01-18 17:49:28 +00:00
skia.committer@gmail.com
ff21c2e0ae
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@7215 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-16 07:05:56 +00:00
reed@google.com
848148ec10
Fix bug in cubic-clipper (SkEdgeClipper). When we chop the cubic on Top/Bottom
...
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
2013-01-15 15:51:59 +00:00
bsalomon@google.com
50c79d886b
Enable warnings-as-errors on Windows.
...
Review URL: https://codereview.appspot.com/7066054
git-svn-id: http://skia.googlecode.com/svn/trunk@7094 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-08 20:31:53 +00:00
reed@google.com
a8a3b3d9a0
check for bad enum use when adding contours
...
Review URL: https://codereview.appspot.com/6849103
git-svn-id: http://skia.googlecode.com/svn/trunk@6547 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-26 18:16:27 +00:00
skia.committer@gmail.com
1c9c0d3711
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6540 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-22 02:02:41 +00:00
caryclark@google.com
f68154a3cf
Add isRect variant that returns path closure and direction.
...
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
2012-11-21 15:18:06 +00:00
caryclark@google.com
bfe90370ea
detect wrapped rect in path
...
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
2012-11-21 13:56:20 +00:00
skia.committer@gmail.com
3458716b52
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6500 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-20 02:01:23 +00:00
caryclark@google.com
56f233ab54
add two nested rect detector to path
...
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
2012-11-19 13:06:06 +00:00
mike@reedtribe.org
b947625800
remove unused (and undefined) SkColorSpace parameter.
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6427 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-15 02:37:45 +00:00
skia.committer@gmail.com
cec8de6821
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6413 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-14 02:01:22 +00:00
bsalomon@google.com
9bee33afbe
Add a conservativelyContainsRect function to SkPath.
...
Review URL: https://codereview.appspot.com/6852044
git-svn-id: http://skia.googlecode.com/svn/trunk@6411 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 21:51:38 +00:00
skia.committer@gmail.com
fbb0ed959d
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6409 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 21:46:06 +00:00
bsalomon@google.com
30c174b9ce
Make SkPath cache the result of cheapComputeDirection.
...
Review URL: https://codereview.appspot.com/6810111
git-svn-id: http://skia.googlecode.com/svn/trunk@6394 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 14:36:42 +00:00
reed@google.com
20fb0c7f22
add tests for degenerate serifs to computeDirection
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6391 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 13:47:39 +00:00
skia.committer@gmail.com
8b0e2340e1
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6088 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-25 02:01:20 +00:00
reed@google.com
a8790debaa
If a path is known to be nonfinite, don't forget that in our autobounds
...
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
2012-10-24 21:04:04 +00:00
robertphillips@google.com
158618ec62
Removed degenerate quads from zero radius Chrome-style round rects
...
https://codereview.appspot.com/6737059/
git-svn-id: http://skia.googlecode.com/svn/trunk@6053 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-23 16:56:56 +00:00
skia.committer@gmail.com
6a748ad8d8
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6013 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-19 02:01:19 +00:00
robertphillips@google.com
c7a37c7bb2
Place r5997 (make arcto's convex) behind a compiler flag to delay day of reckoning with Webkit baselines
...
git-svn-id: http://skia.googlecode.com/svn/trunk@6012 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-10-19 01:26:18 +00:00
robertphillips@google.com
b95eaa8d08
Altered arcTo's canonical points to (usually) be convex
...
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
2012-10-18 15:26:12 +00:00
robertphillips@google.com
968c17ddda
fixed compiler complaints
...
http://codereview.appspot.com/6499124/
git-svn-id: http://skia.googlecode.com/svn/trunk@5565 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-17 12:05:40 +00:00
skia.committer@gmail.com
055c7c299c
Sanitizing source files in Skia_Periodic_House_Keeping
...
git-svn-id: http://skia.googlecode.com/svn/trunk@5561 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-15 02:01:41 +00:00