Commit Graph

58 Commits

Author SHA1 Message Date
Cary Clark
a0e30b1e40 switch to double in conic split on infinities
If the input conic doesn't contain infinities, it should be possible
to compute the split conic without infinities as well. Fix the case
fuzzer exposes.

R=reed@google.com,fmalita@chromium.org
Bug: skia:7435
Change-Id: Ic128fa14ea0622188e5c43efc16b684efa342e9e
Reviewed-on: https://skia-review.googlesource.com/102425
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-02-02 16:50:29 +00:00
Greg Daniel
9838b49b2e Revert "Revert "long rect dash fix with guards""
This reverts commit fa6b6c2d1b.

Reason for revert: Looks like this was actually caused by another change but happen to fail a test that looked very related to this

Original change's description:
> Revert "long rect dash fix with guards"
> 
> This reverts commit 93ceab1b59.
> 
> Reason for revert: breaking layout test
> 
> Original change's description:
> > long rect dash fix with guards
> > 
> > long rect dash with guards
> > 
> > check dash fix back in with
> > guards against changing
> > chrome layout test results
> > 
> > original change clipped against wrong rectangle
> > some of the time, causing tiled drawing to fail.
> > Always clip against outset rectangle.
> > 
> > original CL: skia-review.googlesource.com/c/skia/+/84862
> > 
> > efficiently dash very large rectangles and very long lines
> > Speed up dashing when lines and rects are absurdly large.
> > 
> > Prior to this CL, only horizontal lines were detected.
> > 
> > Also folded in a change to handle dashing of zero length lines.
> > 
> > TBR=egdaniel@google.com
> > Bug: skia:7311
> > Change-Id: Ic3c68ec8ea35d0597c892c3b26ba7bb077045990
> > Reviewed-on: https://skia-review.googlesource.com/87768
> > Reviewed-by: Cary Clark <caryclark@skia.org>
> > Commit-Queue: Cary Clark <caryclark@skia.org>
> 
> TBR=egdaniel@google.com,caryclark@skia.org
> 
> Change-Id: I56ef771ccb281887d7381c2bd8a2553acbd30621
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:7311
> Reviewed-on: https://skia-review.googlesource.com/88421
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,caryclark@skia.org

Change-Id: Iecdd072544e6623bc4de8d5aab1402378112512d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/88424
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-21 14:55:11 +00:00
Greg Daniel
fa6b6c2d1b Revert "long rect dash fix with guards"
This reverts commit 93ceab1b59.

Reason for revert: breaking layout test

Original change's description:
> long rect dash fix with guards
> 
> long rect dash with guards
> 
> check dash fix back in with
> guards against changing
> chrome layout test results
> 
> original change clipped against wrong rectangle
> some of the time, causing tiled drawing to fail.
> Always clip against outset rectangle.
> 
> original CL: skia-review.googlesource.com/c/skia/+/84862
> 
> efficiently dash very large rectangles and very long lines
> Speed up dashing when lines and rects are absurdly large.
> 
> Prior to this CL, only horizontal lines were detected.
> 
> Also folded in a change to handle dashing of zero length lines.
> 
> TBR=egdaniel@google.com
> Bug: skia:7311
> Change-Id: Ic3c68ec8ea35d0597c892c3b26ba7bb077045990
> Reviewed-on: https://skia-review.googlesource.com/87768
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>

TBR=egdaniel@google.com,caryclark@skia.org

Change-Id: I56ef771ccb281887d7381c2bd8a2553acbd30621
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/88421
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-12-21 14:33:31 +00:00
Cary Clark
93ceab1b59 long rect dash fix with guards
long rect dash with guards

check dash fix back in with
guards against changing
chrome layout test results

original change clipped against wrong rectangle
some of the time, causing tiled drawing to fail.
Always clip against outset rectangle.

original CL: skia-review.googlesource.com/c/skia/+/84862

efficiently dash very large rectangles and very long lines
Speed up dashing when lines and rects are absurdly large.

Prior to this CL, only horizontal lines were detected.

Also folded in a change to handle dashing of zero length lines.

TBR=egdaniel@google.com
Bug: skia:7311
Change-Id: Ic3c68ec8ea35d0597c892c3b26ba7bb077045990
Reviewed-on: https://skia-review.googlesource.com/87768
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-12-20 19:18:36 +00:00
Cary Clark
16a127fa60 Revert "long rect dash with guards"
This reverts commit 4ad0c592ce.

Reason for revert: test fails in tiled case
Original change's description:
> long rect dash with guards
> 
> check dash fix back in with
> guards against changing
> chrome layout test results
> 
> original CL: skia-review.googlesource.com/c/skia/+/84862
> 
> efficiently dash very large rectangles and very long lines
> Speed up dashing when lines and rects are absurdly large.
> 
> Prior to this CL, only horizontal lines were detected.
> 
> Also folded in a change to handle dashing of zero length lines.
> 
> TBR=egdaniel@google.com
> Bug: skia:7311
> Change-Id: I139b10f676e7ae06ad83aaf2a35d49cf06280a67
> Reviewed-on: https://skia-review.googlesource.com/87760
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Cary Clark <caryclark@skia.org>

TBR=egdaniel@google.com,caryclark@skia.org

Change-Id: Ifd35ddf395826a55c72e650470527d01740b6438
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/87841
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-20 16:53:05 +00:00
Cary Clark
d5f447367c Revert "forgot to turn off dash test"
This reverts commit 2b974e4be9.

Reason for revert: test fails in tiled case
Original change's description:
> forgot to turn off dash test
> 
> TBR=egdaniel@google.com
> NOTRY=true
> Bug: skia:
> Change-Id: Id1cf3e25d04e5dab8148114c4378abaa49fd67bc
> Reviewed-on: https://skia-review.googlesource.com/87761
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Cary Clark <caryclark@skia.org>

TBR=egdaniel@google.com,caryclark@skia.org

Change-Id: I40aa957c210dec9367bae6cc1be8ca0a044a31af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/87840
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-20 16:51:46 +00:00
Cary Clark
2b974e4be9 forgot to turn off dash test
TBR=egdaniel@google.com
NOTRY=true
Bug: skia:
Change-Id: Id1cf3e25d04e5dab8148114c4378abaa49fd67bc
Reviewed-on: https://skia-review.googlesource.com/87761
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-12-20 14:51:44 +00:00
Cary Clark
4ad0c592ce long rect dash with guards
check dash fix back in with
guards against changing
chrome layout test results

original CL: skia-review.googlesource.com/c/skia/+/84862

efficiently dash very large rectangles and very long lines
Speed up dashing when lines and rects are absurdly large.

Prior to this CL, only horizontal lines were detected.

Also folded in a change to handle dashing of zero length lines.

TBR=egdaniel@google.com
Bug: skia:7311
Change-Id: I139b10f676e7ae06ad83aaf2a35d49cf06280a67
Reviewed-on: https://skia-review.googlesource.com/87760
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2017-12-20 14:38:04 +00:00
Cary Clark
394197d064 Revert "efficiently dash very large rectangles and very long lines"
This reverts commit 1ad81981b0.

Reason for revert: broke chrome layout tests
Original change's description:
> efficiently dash very large rectangles and very long lines
> 
> Speed up dashing when lines and rects are absurdly large.
> 
> Prior to this CL, only horizontal lines were detected.
> 
> The onOnceBeforeDraw changes are there to make debugging easier.
> 
> Also folded in a change to handle dashing of zero length lines.
> 
> R=​reed@google.com, egdaniel@google.com
> Bug: skia:7311
> Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a
> Reviewed-on: https://skia-review.googlesource.com/84862
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=egdaniel@google.com,reed@google.com,caryclark@skia.org

Change-Id: I5e8f04c54486f8cd1a931f6cade92feaaa4a7647
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7311
Reviewed-on: https://skia-review.googlesource.com/87282
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-19 20:20:17 +00:00
Cary Clark
b0abd8502b Revert "disable large rect dash temporarily"
This reverts commit 54956e1581.

Reason for revert: original cl broke chrome layout tests

Original change's description:
> disable large rect dash temporarily
> 
> fix the build
> 
> TBR:halcanary@google.com
> NOTRY=true
> Bug: skia:7423
> Change-Id: I362fdf2b56c08111c1feab9ffd72351f2ff16f91
> Reviewed-on: https://skia-review.googlesource.com/87002
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>

TBR=halcanary@google.com,caryclark@skia.org

Change-Id: Ia71118dfb7d59ad9d4962d90f2e9a016b0988d0c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7423
Reviewed-on: https://skia-review.googlesource.com/87281
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-19 20:17:27 +00:00
Cary Clark
54956e1581 disable large rect dash temporarily
fix the build

TBR:halcanary@google.com
NOTRY=true
Bug: skia:7423
Change-Id: I362fdf2b56c08111c1feab9ffd72351f2ff16f91
Reviewed-on: https://skia-review.googlesource.com/87002
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2017-12-19 15:31:16 +00:00
Cary Clark
1ad81981b0 efficiently dash very large rectangles and very long lines
Speed up dashing when lines and rects are absurdly large.

Prior to this CL, only horizontal lines were detected.

The onOnceBeforeDraw changes are there to make debugging easier.

Also folded in a change to handle dashing of zero length lines.

R=reed@google.com, egdaniel@google.com
Bug: skia:7311
Change-Id: Ia16fb124c7a78a5cc639e612fae29c879a37da1a
Reviewed-on: https://skia-review.googlesource.com/84862
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-12-19 14:51:26 +00:00
Cary Clark
0b1df4b87a fix zero length dashed lines
targeted fix turns zero length line
into very short line.

R=egdaniel@google.com
Bug: skia:7387
Change-Id: Ic2a809d30d722f4e8f51d9205666dc1476a10067
Reviewed-on: https://skia-review.googlesource.com/84661
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-12-15 16:10:38 +00:00
Mike Klein
33d2055e59 GM: some header cleanup
gm.h includes sk_tool_utils.h but does not use it.

The bulk of this CL makes each gm that uses sk_tool_utils include it.

sk_tool_utils.h also provided SkRandom and SkTDArray,
so a couple GMs add those headers too.

Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1
Reviewed-on: https://skia-review.googlesource.com/10014
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-03-22 18:11:49 +00:00
mtklein
dbfd7ab108 Replace a lot of 'static const' with 'constexpr' or 'const'.
'static const' means, there must be at most one of these, and initialize it at
compile time if possible or runtime if necessary.  This leads to unexpected
code execution, and TSAN* will complain about races on the guard variables.

Generally 'constexpr' or 'const' are better choices.  Neither can cause races:
they're either intialized at compile time (constexpr) or intialized each time
independently (const).

This CL prefers constexpr where possible, and uses const where not.  It even
prefers constexpr over const where they don't make a difference... I want to have
lots of examples of constexpr for people to see and mimic.

The scoped-to-class static has nothing to do with any of this, and is not changed.

* Not yet on the bots, which use an older TSAN.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005

Review-Url: https://codereview.chromium.org/2300623005
2016-09-01 11:24:54 -07:00
bungeman
7438bfc080 Factor code to rotate a canvas about a point.
SkMatrix::scale and ::rotate take a point around which to scale or rotate.
Canvas lacks these helpers, so the code to rotate a canvas around a
point has been duplicated many times. Factor all of these
implementations into SkCanvas::rotate.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142033002

Review-Url: https://codereview.chromium.org/2142033002
2016-07-12 15:01:19 -07:00
halcanary
9d524f22bf Style bikeshed - remove extraneous whitespace
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002

Review URL: https://codereview.chromium.org/1842753002
2016-03-29 09:03:53 -07:00
reed
a439334b6e Reland of "switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )"
This reverts commit f28ad89427.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813123003

TBR=

Review URL: https://codereview.chromium.org/1813123003
2016-03-18 11:22:57 -07:00
reed
f28ad89427 Revert of switch patheffects over to sk_sp (patchset #5 id:80001 of https://codereview.chromium.org/1813553005/ )
Reason for revert:
some build breaks, possibly related to paint having to know what a patheffect is

Original issue's description:
> switch patheffects over to sk_sp
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813553005
>
> Committed: https://skia.googlesource.com/skia/+/9fbee18f691a0afed1e38a851048ce06063505ed

TBR=caryclark@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1817543002
2016-03-18 10:17:27 -07:00
reed
9fbee18f69 switch patheffects over to sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813553005

Review URL: https://codereview.chromium.org/1813553005
2016-03-18 10:00:32 -07:00
caryclark
40b7d3b48b fix hair fuzz
If the end and control points of a quad, conic, or cubic are the same,
adjust all of them when stretching the curve to account for a square
or round end cap. If all of the points are the same, move all but the
last.

Enlarge the clip check to account for the cap.

The clip bug was detected by ASAN.

R=reed@google.com, msarett@google.com
BUG=571214
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1547483003

Review URL: https://codereview.chromium.org/1547483003
2015-12-22 06:13:33 -08:00
scroggo
96f16e835e Use DEF_GM everywhere
BUG=skia:1902

Review URL: https://codereview.chromium.org/1518893002
2015-12-10 13:31:59 -08:00
caryclark
57eecc154e Zero length lines may have caps, but do not need joins.
Check to see if the point is preceeded or followed
by a line with a computable tangent before adding the join.

R=reed@google.com
BUG=566075

Review URL: https://codereview.chromium.org/1504043002
2015-12-08 04:29:45 -08:00
caryclark
b775e91e87 add more conservative check for wayward divide
When the parallel stroke to the curve can't be computed from
the intersection of the tangent lines, as straight line connects
the two points instead. Allow the intersection to succeed unless
the ratio isn't finite or the contribution of (1 - ratio) isn't
significant.

R=reed@google.com,fmalita@chromium.org
BUG=skia:4603

Review URL: https://codereview.chromium.org/1484873003
2015-11-30 13:47:11 -08:00
caryclark
950305ec77 fix for teeny strokes
Pass the scale before evaluating degenerate line segments.

This does not change other GMs.

R=reed@google.com
BUG=478337

Review URL: https://codereview.chromium.org/1418133007
2015-10-26 08:17:04 -07:00
caryclark
6651a3238d Reland of more zero-length changes for svg compatibility (patchset #1 id:1 of https://codereview.chromium.org/1334543002/ )
Reason for revert:
DEPS should be fixed now

Original issue's description:
> Revert of more zero-length changes for svg compatibility (patchset #6 id:100001 of https://codereview.chromium.org/1330623003/ )
>
> Reason for revert:
> breaks DEPS
>
> Original issue's description:
> > more zero-length changes for svg compatibility
> >
> > If a path contains a moveTo followed by a line or curve,
> > even if the line or curve has no length, SVG expects
> > the end caps to draw if the cap style is round or square.
> >
> > Fredrik Söderquist attached a patch to the chrome bug
> > (slightly modified here) that fixes layout test failures
> > resulting from deleting special-case code in SVG
> > dealing with zero-length path segments.
> >
> > R=reed@google.com,fs@opera.com
> > BUG=22974
> >
> > Committed: https://skia.googlesource.com/skia/+/62fb1ba1786863e545c89839b5706ad5151cec15
>
> TBR=fs@opera.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=22974
>
> Committed: https://skia.googlesource.com/skia/+/5ca4fa3846067a47e88d35ace895df3ebe3ec2a5

TBR=fs@opera.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=22974

Review URL: https://codereview.chromium.org/1314833004
2015-09-09 13:20:49 -07:00
caryclark
5ca4fa3846 Revert of more zero-length changes for svg compatibility (patchset #6 id:100001 of https://codereview.chromium.org/1330623003/ )
Reason for revert:
breaks DEPS

Original issue's description:
> more zero-length changes for svg compatibility
>
> If a path contains a moveTo followed by a line or curve,
> even if the line or curve has no length, SVG expects
> the end caps to draw if the cap style is round or square.
>
> Fredrik Söderquist attached a patch to the chrome bug
> (slightly modified here) that fixes layout test failures
> resulting from deleting special-case code in SVG
> dealing with zero-length path segments.
>
> R=reed@google.com,fs@opera.com
> BUG=22974
>
> Committed: https://skia.googlesource.com/skia/+/62fb1ba1786863e545c89839b5706ad5151cec15

TBR=fs@opera.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=22974

Review URL: https://codereview.chromium.org/1334543002
2015-09-09 09:34:22 -07:00
caryclark
62fb1ba178 more zero-length changes for svg compatibility
If a path contains a moveTo followed by a line or curve,
even if the line or curve has no length, SVG expects
the end caps to draw if the cap style is round or square.

Fredrik Söderquist attached a patch to the chrome bug
(slightly modified here) that fixes layout test failures
resulting from deleting special-case code in SVG
dealing with zero-length path segments.

R=reed@google.com,fs@opera.com
BUG=22974

Review URL: https://codereview.chromium.org/1330623003
2015-09-09 07:04:33 -07:00
halcanary
385fe4d4b6 Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
2015-08-26 13:07:49 -07:00
caryclark
5cb00a9573 zero-length cap fix
Re-land; layout tests are suppressed and gm differences are understood.
A merge conflict prevented a automatic reland.

If the endcap is not butt, draw the endcaps even when the line
has zero length.

If the dash length is zero, generate a zero length line segment.

Treat a move followed by a close as a move followed by a zero-length
line.

TBR=reed@google.com
BUG=422974

Review URL: https://codereview.chromium.org/1314213002
2015-08-26 09:04:55 -07:00
caryclark
45398dff71 Reland of ix zero-length tangent (patchset #1 id:1 of https://codereview.chromium.org/1312243002/ )
Reason for revert:
Layout suppression has landed, and verified that Skia gm test changes are correct.

Original issue's description:
> Revert of fix zero-length tangent (patchset #2 id:20001 of https://codereview.chromium.org/1311273002/ )
>
> Reason for revert:
> causes layout test to draw differently -- new drawing is more correct. Reverting until layout test ignore is landed.
>
> Original issue's description:
> > fix zero-length tangent
> >
> > If the end point and the control point are the same, computing
> > the tangent will result in (0, 0). In this case, use the prior
> > control point instead.
> >
> > R=reed@google.com
> >
> > BUG=skia:4191
> >
> > Committed: https://skia.googlesource.com/skia/+/7544124fb8ee744f68f549a353f8a9163cd7432d
>
> TBR=reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4191
>
> Committed: https://skia.googlesource.com/skia/+/91298b47c547b2ab4697038c04685af957bd1416

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4191

Review URL: https://codereview.chromium.org/1320473002
2015-08-25 13:19:06 -07:00
caryclark
91298b47c5 Revert of fix zero-length tangent (patchset #2 id:20001 of https://codereview.chromium.org/1311273002/ )
Reason for revert:
causes layout test to draw differently -- new drawing is more correct. Reverting until layout test ignore is landed.

Original issue's description:
> fix zero-length tangent
>
> If the end point and the control point are the same, computing
> the tangent will result in (0, 0). In this case, use the prior
> control point instead.
>
> R=reed@google.com
>
> BUG=skia:4191
>
> Committed: https://skia.googlesource.com/skia/+/7544124fb8ee744f68f549a353f8a9163cd7432d

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4191

Review URL: https://codereview.chromium.org/1312243002
2015-08-25 10:02:46 -07:00
caryclark
7544124fb8 fix zero-length tangent
If the end point and the control point are the same, computing
the tangent will result in (0, 0). In this case, use the prior
control point instead.

R=reed@google.com

BUG=skia:4191

Review URL: https://codereview.chromium.org/1311273002
2015-08-25 08:03:01 -07:00
caryclark
21b998b181 Revert of experiment with zero-length round capped line segments (patchset #4 id:60001 of https://codereview.chromium.org/1309753002/ )
Reason for revert:
More GMs changed than I expected. Will probably affect layout tests as well; reverting until I can verify that the changes are correct.

Original issue's description:
> experiment with zero-length round capped line segments
>
> If the endcap is not butt, draw the endcaps even when the line
> has zero length.
>
> If the dash length is zero, generate a zero length line segment.
>
> Treat a move followed by a close as a move followed by a zero-length
> line.
>
> R=reed@google.com,schenney@google.com
> BUG=422974
>
> Committed: https://skia.googlesource.com/skia/+/dd3c165828fffb369d0f4b13b48381169a0249a9

TBR=reed@google.com,schenney@google.com,schenney@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=422974

Review URL: https://codereview.chromium.org/1304163008
2015-08-21 13:47:06 -07:00
caryclark
dd3c165828 experiment with zero-length round capped line segments
If the endcap is not butt, draw the endcaps even when the line
has zero length.

If the dash length is zero, generate a zero length line segment.

Treat a move followed by a close as a move followed by a zero-length
line.

R=reed@google.com,schenney@google.com
BUG=422974

Review URL: https://codereview.chromium.org/1309753002
2015-08-21 13:27:37 -07:00
bungeman
d3ebb48320 IWYU: 'core' target, files starting A-C.
TBR=reed@google.com
Verbal lgtm, does not change API.

Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69

Review URL: https://codereview.chromium.org/1265033002
2015-08-05 13:57:49 -07:00
reed
fb8c1fcab1 Revert of IWYU: 'core' target, files starting A-C. (patchset #5 id:80001 of https://codereview.chromium.org/1265033002/ )
Reason for revert:
revert to unblock DEPS roll

../../chrome/browser/chromeos/display/overscan_calibrator.cc:43:10: error: variable has incomplete type 'SkPath'
  SkPath base_path;

Original issue's description:
> IWYU: 'core' target, files starting A-C.
>
> TBR=reed@google.com
> Verbal lgtm, does not change API.
>
> Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69

TBR=reed@google.com,mtklein@google.com,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1273613002
2015-08-04 18:44:57 -07:00
bungeman
7403d87db8 IWYU: 'core' target, files starting A-C.
TBR=reed@google.com
Verbal lgtm, does not change API.

Review URL: https://codereview.chromium.org/1265033002
2015-08-04 14:56:53 -07:00
caryclark
125960152d make tests portable by using 565 compatible colors
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1262703002
2015-07-29 05:27:47 -07:00
caryclark
612f70d5fa handle large conic strokes better
A stroked conic computes the outset quad's control point by
computing the intersection of the quad's endpoints. If the
the denominator used to compute the scale factor for the
control point is small, check to see if the numerator is also
small so that the division stays bounded.

Also clean up error returns and internal function calls to
simplify the code.

Additionally, remove comic max curvature (unimplemented) and call
extrema functions instead to handle cases where the conic is degenerate
or is a line.

R=reed@google.com, fmalita@chromium.org
BUG=skia:3843

Review URL: https://codereview.chromium.org/1144883003
2015-05-19 11:05:37 -07:00
mtklein
36352bf5e3 C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
caryclark
63c684a8a6 fuzzer fixes
Fix path bugs exposed by the path fuzzer.

Changes to existing gm and samplecode files defer their calls to construct
SkPath objects until the first draw instead of at test initialization.

Add an experimental call to SkPath to validate the internal SkPathRef.

Fix SkPath::addPoly to set the last moveto after adding a close verb.

Fix stroke to handle failures when computing the unit normal.

Add a unit test for the unit normal failure.

R=reed@google.com

Review URL: https://codereview.chromium.org/953383002
2015-02-25 09:04:04 -08:00
caryclark
3760457182 make strokes3 full size
The strokes3 test was limted to 400x800. Allow the captured gm to
go to 1500x1500, and shift it down slightly so it isn't clipped.

Review URL: https://codereview.chromium.org/945363004
2015-02-23 06:51:04 -08:00
mtklein
1c4029296f remove unused GM flags
Depends on https://codereview.chromium.org/873753002/

Thumbs up to CLion for refactoring this for me.

BUG=skia:

Review URL: https://codereview.chromium.org/867963004
2015-01-23 11:07:08 -08:00
mtklein
72c9faab45 Fix up all the easy virtual ... SK_OVERRIDE cases.
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases.  We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
2015-01-09 10:06:40 -08:00
tfarina
752e7eb157 Cleanup: Another round of override fixes.
BUG=skia:3075
TEST=ninja -C out/Debug
TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/815883002
2014-12-20 06:53:43 -08:00
scroggo
f9d610179d There can be only one (SkRandom)!
Remove SkLCGRandom. We already decided the new one was better, which is
why we wrote the new SkRandom.

Convert GMs that were using SkLCGRandom to use the improved SkRandom.
Motivated by the fact that these GMs draw differently on some runs. We
believe this to be a result of using the old SkLCGRandom.

Add each of the tests that were using SkLCGRandom to ignore-tests.txt,
since we expect they'll draw differently using SkRandom.

Move a trimmed down version of SkLCGRandom into SkDiscretePathEffect.
In order to preserve the old behavior, trim down SkLCGRandom to only
the methods used by SkDiscretePathEffect, and hide it in
SkDiscretePathEffect's cpp file.

BUG=skia:3241

Review URL: https://codereview.chromium.org/805963002
2014-12-15 12:54:51 -08:00
commit-bot@chromium.org
a90c680386 Turn on quilt mode in DM.
- Rename TileGrid -> Quilt to avoid the name overload.
  - Tag all failing GMs with kSkipTiled_Flag.

You may be wondering, do any GMs pass?  Yes, some do!  And that trends towards all of them as we increase --quiltTile.

Two GMs only fail in --quilt mode in 565.  Otherwise all GMs which fail are skipped, and those which don't fail aren't. (The 8888 variants of those two GMs are skipped even though they pass.)

BUG=skia:2477
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/256373002

git-svn-id: http://skia.googlecode.com/svn/trunk@14457 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-30 13:20:45 +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
skia.committer@gmail.com
e16efc1882 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-26 07:06:02 +00:00