Fixes the threshold logic for "0 ~= d1 && 0 ~= d2".
Previously, if d1 and d2 were both near zero, but on opposite sides
of the threshold, the curve could be misclassified as kCuspAtInfinity
and drawn incorrectly.
Bug: skia:
Change-Id: I65f30ddebf0a4a0b933610d8cc1a2f489efc99e4
Reviewed-on: https://skia-review.googlesource.com/22400
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
This reverts commit 41ed7f3379.
Reason for revert: Need this in temporarily to navigate Flutter and Fuchsia rolls.
Original change's description:
> remove dead code for legacy image encode api
>
> Bug: skia:
> Change-Id: Ia90d776946281473c56cd93006df1b523475696a
> Reviewed-on: https://skia-review.googlesource.com/23022
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=scroggo@google.com,reed@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: I078762fc13de0c455dc6f8a5725d9529af03bffc
Reviewed-on: https://skia-review.googlesource.com/23385
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ib9eaf149100b0ccecf1c18a755263f2579b8e6f6
Reviewed-on: https://skia-review.googlesource.com/23482
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:
Change-Id: Id089b9ead7a21e903b001006dffff2381efd4ba3
Reviewed-on: https://skia-review.googlesource.com/23582
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: Id82a58f2f4d947894bb710cb3190c873b20b98eb
Reviewed-on: https://skia-review.googlesource.com/23404
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Previously, if ReadHeader returned false, it deleted the input stream.
But there are a couple of cases where ReadHeader creates an SkCodec and
then returns false. The SkCodec deletes the stream, and then so does
NewFromStream.
Make sure that we do not double delete by only deleting if no SkCodec
was created.
Add a test, so such a double delete will be caught by the bots.
Bug: b/37623797
Change-Id: I787422c9af58f0b92ad9e9ef9ad87c54a12f5e31
Reviewed-on: https://skia-review.googlesource.com/23620
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
The rebaseline has finished in Chromium.
Bug: skia:
Change-Id: Ibafb32b3683f1bfc3e451911e6fb8382bfc9b857
Reviewed-on: https://skia-review.googlesource.com/23481
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
static ifs (and switches) in .fp files are a bit tricky, because they
aren't necessarily static when the CPP file is being produced. They
become static when the CPP file produces the final SkSL; at this point
the final values of the 'in' variables are known.
This change permits 'deferred' static ifs and switches. The initial
compilation (.fp -> .cpp) passes the @if / @switch through, and then
the final compilation (.cpp's generated SkSL -> GLSL or whatever)
enforces the static test.
Bug: skia:
Change-Id: I0087dfe1725c8fd350507ac77f64db1d82659cdf
Reviewed-on: https://skia-review.googlesource.com/23403
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
We're currently adding picture shader cache entries to the resource
cache, but we don't ever purge. To avoid exhausting the budget, add
logic to associate cached entries with their owning picture shader, and
purge when the shader is deleted.
-- Side note --
The current cache key is
K(pictureID, ...)
so technically the cache entries are associated with the picture, not the
shader. One could resonably argue we should only purge when the
*picture* is deleted. Unfortunately, this doesn't work: the cache entries
contain indirect refs to the picture (SkImageShader -> SkImage_Generated
-> SkPictureImageGenerator -> SkPicture), so the picture is always kept
alive.
Associating the cache entries with the shader itself seems like a
reasonable alternative, even if we give up some cache persistence in the
process.
Change-Id: Ia115dbb5ae627e5ee171da7c4430fecfd42f4292
Reviewed-on: https://skia-review.googlesource.com/23380
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Bug: skia:
Change-Id: I84dbd56c17d4856496af4491f340ec560e29c8a6
Reviewed-on: https://skia-review.googlesource.com/23200
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:6797
Change-Id: I02e2a3d13a52bba66f4f9d2129aae5f094828329
Reviewed-on: https://skia-review.googlesource.com/23323
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Bug: skia:
Change-Id: I93d117c22ae2b374294f6a5e961c497ac2c92b09
Reviewed-on: https://skia-review.googlesource.com/23301
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
No longer read?!
Change-Id: I6258a64590bb5ee16e02a7ad923ad41cc7bd8791
Reviewed-on: https://skia-review.googlesource.com/23043
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Change-Id: I7d3c4053d4a833215371d77de683964cef317a5c
Reviewed-on: https://skia-review.googlesource.com/20460
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Also adds the support code to allow our TestContext to create a Metal
backend.
Bug: skia:
Change-Id: Ia850687019d79b897bb16e2c151f4f8526721ad9
Reviewed-on: https://skia-review.googlesource.com/22644
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 4e91f16fdf.
Reason for revert: Still does not work
Original change's description:
> Re-enable uploading to partner bucket
>
> This is a revert of
> https://skia.googlesource.com/skia/+/da066b865c1e2777a84a829486a7b37a984484b4
>
> NoTry: true
> Bug: skia:6797
> Change-Id: I9eca7e4b2234c79e39b2c25aaf459512dd206acc
> Reviewed-on: https://skia-review.googlesource.com/23202
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>
TBR=borenet@google.com,rmistry@google.com
Change-Id: If1abb65801ba93d409825e290e22d7a9eb3818fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6797
Reviewed-on: https://skia-review.googlesource.com/23004
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Also update SkPictureImageFilter to use SkColorSpace::Equals instead of
direct comparison.
Change-Id: I434cd6d1afcb869d2a56601b72edf56d207d9868
Reviewed-on: https://skia-review.googlesource.com/23201
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This helps explain why some frames are slow in Flutter.
Change-Id: Ic8b36186f1c8c262950e5ff9e0da3b808cff8d0c
Reviewed-on: https://skia-review.googlesource.com/22087
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
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>