I replaced the previous once, because I think this covers
everything it was testing, and lots more. It renders many
combinations of parameters, and automatically detects if
the results are correct or not. Each test is color coded,
and the overall image is tinted with gold's red/green to
make triaging easy.
Adds four new top-level GMs (single and double contour,
with and without AA). Each one tests several more params:
- Cap type
- Stroke width
- Path structure (M vs ML vs MZ vs MLZ)
- Different verbs (L vs Q vs C vs A)
Bug: skia:6781
Change-Id: Ie81b4417101fea0b439cb094a65257dc06b6b5c0
Reviewed-on: https://skia-review.googlesource.com/21480
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 27b3d272a8.
Reason for revert: guard has landed in android
Original change's description:
> Revert "Experimental blur code with 32 bit fix."
>
> This reverts commit d4b2c537d0.
>
> Reason for revert: speculative fix for android-roll
>
> java.lang.AssertionError: expected:<0> but was:<255>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:834)
> at org.junit.Assert.assertEquals(Assert.java:645)
> at org.junit.Assert.assertEquals(Assert.java:631)
> at android.graphics.cts.BlurMaskFilterTest.verifyColor(BlurMaskFilterTest.java:79)
> at android.graphics.cts.BlurMaskFilterTest.verifyQuadrants(BlurMaskFilterTest.java:72)
> at android.graphics.cts.BlurMaskFilterTest.testBlurMaskFilter(BlurMaskFilterTest.java:56)
>
> Original change's description:
> > Experimental blur code with 32 bit fix.
> >
> > This uses a new method of blurring that runs the three
> > passes of the box filter in a single pass. This implementation
> > currently only does 1x1 pixel at a time, but it should be simple
> > to expand to 4x4 pixels at a time.
> >
> > On the blur_10_normal_high_quality benchmark, the new is 7% faster
> > than the old code. For the blur_100.50_normal_high_quality
> > benchmark, the new code is 11% slower.
> >
> > Bug: skia:
> > Change-Id: I847270906b0ceac1dfbf43ab5446756689ef660f
> > Reviewed-on: https://skia-review.googlesource.com/22700
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Herb Derby <herb@google.com>
>
> TBR=herb@google.com,reed@google.com
>
> Change-Id: Ie84f6bf8872cae08c06d679f0c2f2e6c3d8a02a2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/22880
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=herb@google.com,reed@google.com
Change-Id: I393d1c05f83ccf98137201bc7b4e7d8e8b0e8742
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/23121
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
1) Bitfield was too small on Windows for signed enum type
2) Check for unused stencil settings rather than null
Also makes bool bitfields adjacent for better packing on Windows.
Change-Id: I8115cc31c55e83aa7bd85d99c1fca72042617aa3
Reviewed-on: https://skia-review.googlesource.com/23120
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This also removes the ability to have an arbitrary GrPaint with this op and as a consequence simplifies the op and its GrGeometryProcessor.
Change-Id: I19cc1c6f73a47e8925fc826291aad42e9423164d
Reviewed-on: https://skia-review.googlesource.com/22380
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This was accidentally broken when we added a guard for
kIndex_8 (https://skia-review.googlesource.com/c/22721).
Reenable the code for 32 bit color types.
Change-Id: Ibb79a163dc1cffe14e19d2affa17856b549509c4
Reviewed-on: https://skia-review.googlesource.com/23020
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
The cool bit here is that Sk4fLinearGradient is now always fast, and never calls the slow
base-class impl. This means we can rip out Sk4fGradientBase::{mapTs, shadeSpan4f, etc}.
Change-Id: Id3788bc810873b2a209f66efa4187c84b3397e2f
Reviewed-on: https://skia-review.googlesource.com/22366
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This reverts commit 0f3942fc24.
Reason for revert: Still cannot upload to partner bucket
Original change's description:
> Revert "Temporarily stop uploading to partner bucket in RecreateSKPs bot"
>
> This reverts commit 6945c946ea.
>
> Reason for revert: Should be able to upload to partner bucket now
>
> Original change's description:
> > Temporarily stop uploading to partner bucket in RecreateSKPs bot
> >
> > Bug: skia:6797
> > Change-Id: I812837d02b90b78b6df3980649ccf6362e939afc
> > Reviewed-on: https://skia-review.googlesource.com/20820
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Eric Boren <borenet@google.com>
>
> TBR=borenet@google.com,rmistry@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:6797
> Change-Id: I145275da0050da01fca3e6e9c3c5efd84bdadea1
> Reviewed-on: https://skia-review.googlesource.com/21738
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Commit-Queue: Ravi Mistry <rmistry@google.com>
TBR=borenet@google.com,rmistry@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:6797
Change-Id: I5114c2cacd239c45c6a60cb7aa795c96ef28439e
Reviewed-on: https://skia-review.googlesource.com/22840
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
This reverts commit d4b2c537d0.
Reason for revert: speculative fix for android-roll
java.lang.AssertionError: expected:<0> but was:<255>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)
at android.graphics.cts.BlurMaskFilterTest.verifyColor(BlurMaskFilterTest.java:79)
at android.graphics.cts.BlurMaskFilterTest.verifyQuadrants(BlurMaskFilterTest.java:72)
at android.graphics.cts.BlurMaskFilterTest.testBlurMaskFilter(BlurMaskFilterTest.java:56)
Original change's description:
> Experimental blur code with 32 bit fix.
>
> This uses a new method of blurring that runs the three
> passes of the box filter in a single pass. This implementation
> currently only does 1x1 pixel at a time, but it should be simple
> to expand to 4x4 pixels at a time.
>
> On the blur_10_normal_high_quality benchmark, the new is 7% faster
> than the old code. For the blur_100.50_normal_high_quality
> benchmark, the new code is 11% slower.
>
> Bug: skia:
> Change-Id: I847270906b0ceac1dfbf43ab5446756689ef660f
> Reviewed-on: https://skia-review.googlesource.com/22700
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=herb@google.com,reed@google.com
Change-Id: Ie84f6bf8872cae08c06d679f0c2f2e6c3d8a02a2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/22880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Also add a test factory function.
Change-Id: I612973312824a4ba358965ce8378160a980b86fa
Reviewed-on: https://skia-review.googlesource.com/22213
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Does not work when img->isAlphaOnly() && pnt.getMaskFilter().
Change-Id: I60712d035e3a505799258e24660bba30f2c0ed53
Reviewed-on: https://skia-review.googlesource.com/22723
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
This is mainly for getting ready to start adding lots of metal backend code.
I've also update the "gpu tools" target to require ARC with involved updating
one IOS file in there.
Bug: skia:
Change-Id: Ied22e8fe7532445cc274efb529e3450654a6614b
Reviewed-on: https://skia-review.googlesource.com/22484
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
- SkImageSubset becomes SkKeyedImage
- SkPDFCanvas::onDraw{Bitmap, Image} go away
- Remove SkPDFCanvas: base classes now do the right thing.
- SkPDFDevice::draw{Bitmap,Image}{Rect,}() simplified
- 244 fewer SLOC.
All but a few PDFs are identical, those rasterize almost the same.
Change-Id: I3ceb3b8935c689719cedf1ad544b0407b5c1733e
Reviewed-on: https://skia-review.googlesource.com/22218
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
I meant to add these when removing the guard, but since we landed without
a guard, might as well do it now.
A couple of things exposed by these asserts:
1) we need to also catch perspective in local matrices
2) we need to disallow burst mode with perspective
Also tweak the predicate to hasPerspective() instead of explicit mask
check.
Change-Id: I099e5125fca52dccffca77c60fc800bbdf539b53
Reviewed-on: https://skia-review.googlesource.com/22483
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This uses a new method of blurring that runs the three
passes of the box filter in a single pass. This implementation
currently only does 1x1 pixel at a time, but it should be simple
to expand to 4x4 pixels at a time.
On the blur_10_normal_high_quality benchmark, the new is 7% faster
than the old code. For the blur_100.50_normal_high_quality
benchmark, the new code is 11% slower.
Bug: skia:
Change-Id: I847270906b0ceac1dfbf43ab5446756689ef660f
Reviewed-on: https://skia-review.googlesource.com/22700
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
On at least one machine, I've seen SetPixelFormat fail after Vulkan was
used to render to a window, preventing us from creating a GL context.
This is ham-fisted, but solves the problem.
Bug: skia:
Change-Id: I76d0cb26e181304846aa06109c1af768f8363a18
Reviewed-on: https://skia-review.googlesource.com/22740
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This was being triggered at viewer startup, while initalizing the slide
list (and then again when switching to the slide). Removing it
declutters startup, particularly if you're trying to debug raster
drawing code.
Bug: skia:
Change-Id: If21cdd10b0dbda74f4a845031ae3e33f7305a1d7
Reviewed-on: https://skia-review.googlesource.com/22742
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit beae8a9faa.
Clean revert of revert.
Change-Id: Ibb486bf3411ed347b560fc110a2cfbb0e0caa4f2
Reviewed-on: https://skia-review.googlesource.com/22730
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
For single-contour paths (MLZ), the close is ignored during iteration,
and we instead process the 'Done', which does extend in both directions.
But if there's a second contour (MLZM), then we process the 'Close', and
only extend the degenerate segment in one direction. Depending on where
the path was positioned (relative to pixel centers), this led to some
contours not drawing at all.
Bug: skia:
Change-Id: I88aeaecc94c0e69532479e50920ba2e0cc6f4bda
Reviewed-on: https://skia-review.googlesource.com/22520
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
A false return from adjustMatrixAndAppendStages() currently means we'll
attempt to create a legacy context wrapper stage.
Only two gradient impls can return false, and they don't really want the
same thing:
1) linear returns false when the stops are compressed, to get the "nice"
legacy blend color behavior
2) two-point radial returns false when it cannot map the center points
(degenerate matrix); in this case we prolly don't want to draw at all
This setup made sense while we were retrofitting gradients with stages,
but now that all of them support RP, it is confusing to sometimes get
a legacy context wrapper even when we are specifically asked for stages.
I propose we align the semantics with SkShader::onAppendStages(), such
that a false return means "don't draw" rather than "try to draw with a
legacy context".
This means we're giving up the compressed stop behavior for linear, but
that's such an arbitrary corner case that I don't think we care at all.
Change-Id: I01256c4acb81b16fb68e6c74cf8d91ea77b95a3b
Reviewed-on: https://skia-review.googlesource.com/22541
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Previously, suitableForAAA disabled Analytic AA for small rects.
But that's a mistake. Re-enabling AAA will bring 10-20% speedup for small rects
(~800ns -> ~700ns measured by path_fill_small_rect nanobench).
Bug: skia:
Change-Id: I943f1c754669391f55e46471781fa65840629377
Reviewed-on: https://skia-review.googlesource.com/22205
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Change-Id: I7fd0739d7bae9176e816772b3aed54528c4fa576
Reviewed-on: https://skia-review.googlesource.com/21865
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Change-Id: I6205769ea77e12647985496a5c74d3754edd3108
Reviewed-on: https://skia-review.googlesource.com/22365
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This reverts commit d96ed9d0de.
Reason for revert: dm crashing
https://luci-milo.appspot.com/swarming/task/374d82c1d1263910/steps/symbolized_dm/0/stdout
Likely culprit:
unit test BlurDrawing
Stack trace:
/mnt/pd0/s/w/ir/out/Debug/dm(+0x2440eb) [0x568770eb]
linux-gate.so.1(__kernel_sigreturn+0) [0xf7714ca0]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK16SkMaskBlurFilter11blurOneScanENS_10FilterInfoEPKhjS2_PhjS3_+0x236) [0x5766301e]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK16SkMaskBlurFilter4blurERK6SkMaskPS0_+0x285) [0x57663491]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN10SkBlurMask7BoxBlurEP6SkMaskRKS0_f11SkBlurStyle13SkBlurQualityP8SkIPointb+0x5c) [0x5720d48e]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK20SkBlurMaskFilterImpl10filterMaskEP6SkMaskRKS0_RK8SkMatrixP8SkIPoint+0x67) [0x5720e427]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK20SkBlurMaskFilterImpl17filterRectsToNineEPK6SkRectiRK8SkMatrixRK7SkIRectPN12SkMaskFilter9NinePatchE+0x579) [0x5721a247]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK12SkMaskFilter10filterPathERK6SkPathRK8SkMatrixRK12SkRasterClipP9SkBlitterN11SkStrokeRec9InitStyleE+0xf6) [0x5706c2bc]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK6SkDraw11drawDevPathERK6SkPathRK7SkPaintbP9SkBlitterb+0x1bb) [0x57034f1b]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNK6SkDraw8drawPathERK6SkPathRK7SkPaintPK8SkMatrixbbP9SkBlitter+0x47f) [0x57035dd3]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN14SkBitmapDevice8drawPathERK6SkPathRK7SkPaintPK8SkMatrixb+0x6e) [0x56f937fc]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN8SkCanvas10onDrawPathERK6SkPathRK7SkPaint+0x39d) [0x56fb12e5]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN8SkCanvas8drawPathERK6SkPathRK7SkPaint+0x18) [0x56fad926]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x3f71b3) [0x56a2a1b3]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x2450bd) [0x568780bd]
/mnt/pd0/s/w/ir/out/Debug/dm(+0x2450fb) [0x568780fb]
/mnt/pd0/s/w/ir/out/Debug/dm(+0xae53e7) [0x571183e7]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZNKSt8functionIFvvEEclEv+0x20) [0x569f98de]
/mnt/pd0/s/w/ir/out/Debug/dm(_ZN12SkThreadPool4LoopEPv+0x298) [0x57045b2f]
/mnt/pd0/s/w/ir/out/Debug/dm(+0xbbd92c) [0x571f092c]
/lib/i386-linux-gnu/libpthread.so.0(+0x627a) [0xf76e827a]
/lib/i386-linux-gnu/libc.so.6(clone+0x66) [0xf70ecb56]
Segmentation fault
Original change's description:
> Experimental blur code.
>
> This uses a new method of blurring that runs the three
> passes of the box filter in a single pass. This implementation
> currently only does 1x1 pixel at a time, but it should be simple
> to expand to 4x4 pixels at a time.
>
> On the blur_10_normal_high_quality benchmark, the new is 7% faster
> than the old code. For the blur_100.50_normal_high_quality
> benchmark, the new code is 11% slower.
>
> Change-Id: Iea37294abc7c27de5ad569adf8bc62df77eafd02
> Reviewed-on: https://skia-review.googlesource.com/21739
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
TBR=herb@google.com,reed@google.com
Change-Id: I9e896c548d0a4cd3308d6a311c8bd16719a08a85
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/22421
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
This uses a new method of blurring that runs the three
passes of the box filter in a single pass. This implementation
currently only does 1x1 pixel at a time, but it should be simple
to expand to 4x4 pixels at a time.
On the blur_10_normal_high_quality benchmark, the new is 7% faster
than the old code. For the blur_100.50_normal_high_quality
benchmark, the new code is 11% slower.
Change-Id: Iea37294abc7c27de5ad569adf8bc62df77eafd02
Reviewed-on: https://skia-review.googlesource.com/21739
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
SkPathRef::Iter::next and several other bits of code depend on the first
verb of a path always being a move. Contructors and builders currently
enforce this, so the deserializer must do so also.
BUG=chromium:740789
Change-Id: Iad0f6fc6d2b2fe40064c674fa7dd1612c120bb8f
Reviewed-on: https://skia-review.googlesource.com/22216
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>