* Make sure to actually use hardware tessellation on the *_tess_segs_5
gms. These had started using the fixed count tessellator.
* Add a trickycubicstrokes version with round caps to test upcoming
coverage AA modes.
* Make the colors more appealing since I spend all day looking at
these gms.
Bug: skia:10419
Change-Id: Ie7ab4e936ffa3ccffe4999e51fac4c3d4ab97f06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406976
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This effectively reverts a80ce1a36d,
and goes back to using SkMakeSpan (which works in C++14).
Change-Id: Iaa63c86b5acaadbdd60588b0a5c703820e810770
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406938
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit f3c38a3d0a.
Reason for revert: this breaks the Chrome roll
Original change's description:
> Transform verts using nonsquare matrices in FPs.
>
> IF THE CHROME ROLL BREAKS, ROLL BACK THIS CL!
>
> This relands one portion of http://review.skia.org/403079, which was
> rolled back due to a Chrome roll issue (a pixel-gap introduced in a form
> rendering test).
>
> Change-Id: I3d8f900c80c79f20e876ae360a93febe16a0a4bc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406836
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
TBR=bsalomon@google.com,brianosman@google.com,johnstiles@google.com
Change-Id: I45fced067ee18acfc7a36273bf9421f55eeaab5e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407096
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Another accidental logic change when removing GrGLDriver::kANGLE.
Change-Id: I3b79e86d66ad2edc6801d879ed54f9556aa97aa6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406940
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
- expand SkParsePath to support relative path encoding
- introduce a new SkSVGCanvas flag for clients to opt into relative
encoding
Bug: skia:11981
Change-Id: I2d6c63254df23311f1a86dee9481bde9531c3b61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406876
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Makes computeFastBounds not part of the public API, it's only accessible
to subclasses of SkPathEffect, GrStyle, and SkPaint. Subclasses can
invoke it other path effects using SkPathEffectPriv::ComputeFastBounds.
Changes the internal function to
bool computeFastBounds(SkRect* bounds) const;
Subclasses of SkPathEffect must implement this, and can choose to return
false when fast bounds aren't computable.
Provides implementations of computeFastBounds() for path effects
bundled with Skia.
Bug: skia:11974
Change-Id: I545ccf99b4e669d3af9df13acfac28573306fab8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406140
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Aside from sqrt() and normalize(), we now optimize all the intrinsics
which take a single argument as input, and return that argument with
each of its components permuted as output.
This CL also introduces a minor restriction--we no longer optimize
intrinsics which evaluate to inf or nan, such as `inversesqrt(-1)`.
These will be left in the source as-is.
Change-Id: I4919b3c18a2df81accd6daf2f650b9f587ff43fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406577
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
IF THE CHROME ROLL BREAKS, ROLL BACK THIS CL!
This relands one portion of http://review.skia.org/403079, which was
rolled back due to a Chrome roll issue (a pixel-gap introduced in a form
rendering test).
Change-Id: I3d8f900c80c79f20e876ae360a93febe16a0a4bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406836
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Change-Id: I71531f4cb3b306687c0d532d5e5e9c1c36ed5357
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406476
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This makes them easier to integrate with other shader code than having
them in GrGeometryProcessor.
Bug: skia:11396
Change-Id: I572348b8484ae46e00ac15832cd818390d536441
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406437
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This IRNode was removed when the bytecode interpreter was replaced with
SkVM.
Change-Id: Iaade5632e4b76bced00dfb3766c7d911064d2722
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406758
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Accidentally changed the triggering of this. (Though, it looks like
it probably isn't necessary anymore).
Bug: 1203705
Change-Id: Id7f1f4efa80b50fae602b6bd8b520d76edf79d6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406756
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This is similar to the intrinsic optimization for any() and all(). Tests
for all three intrinsics have been bulked up a bit as well.
Change-Id: I262b9448e543b4709d1e7c8585f74a206c4b5abd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406576
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bug: skia:11968
In the simple constructor without an SkImageInfo, cropRect, etc, read
the orientation and swap the width and height if necessary. Although
SkAnimatedImage respects the orientation at decode time, initializing
with backwards width/height results in treating them as a scale.
Change-Id: I0500c3e9a99701c0ec2bba8994c356587a3c876c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406456
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
0639f7a9e6..2e84e59ab3
2021-05-11 timvp@google.com Skip EndWithDifferentProgram() on Vulkan+Pixel 2
2021-05-10 jmadill@chromium.org samples: Use rpath on Linux/ChromeOS.
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC robertphillips@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: robertphillips@google.com
Test: Test: TransformFeedbackTest::EndWithDifferentProgram()
Change-Id: I680053635edc35ba3dab7f8614a21c383e71cfa4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406559
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This layout qualifier is not actually used anywhere.
Change-Id: I817c9affdd00e492c70f251eb52680644b7ff3f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406141
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Also remove kANGLE from GrGLVendor and GrGLDriver. Just use
GrGLANGLEBackend to detect if on ANGLE.
Bug: 1203705
Change-Id: I676dcf52ae5209abf6227175d0435441d0d42e25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405692
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
UInt support was added to DSL in http://review.skia.org/403601. We use
the UInt type in the DitherEffect fragment processor.
Change-Id: I2770eb0196177ee403b461134c9895d2e0b2e6db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406139
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
SkSpan is a convenient type to use on API boundaries - callers can have
their collection in a stack-allocated array, or any contiguous container
(std::vector, etc). Those will all implicitly convert to SkSpan, making
call-sites easy to read/write.
Before making it part of Skia's public API, this CL removes parts of the
API that aren't present in std::span -- when Skia moves to C++20, this
should allow us to use std::span instead, and remove SkSpan entirely.
The most disruptive change is the removal of `int count()`. That's
replaced by a new free function `SkCount` that works on any container,
and incorporates the overflow check from SkTo<int>.
Change-Id: I86cdfad1700f341da3b81a965b396ca9d8b79df9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405816
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This will make it possible to reuse this code to detect the GL driver
info when running on ANGLE's GL backend.
Bug: 1203705
Change-Id: Ib0ef3f1ea50e462d743f5a0be3ec1eef3850c62b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405691
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This relands one portion of http://review.skia.org/403079, which was
rolled back due to a Chrome roll issue (a pixel-gap introduced in a form
rendering test).
Change-Id: I1a609ca54be58dd7ceeb2a63c22aac6eea90e8b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406138
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Add an assert in SkTHashTable::uncheckedSet that each added key is equal
to itself. This is an implied precondition which is easy to get wrong if
the key contains floating point values which may become NaN.
Motivated by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30314
which would have been much easier to track down with this assert, since
the issue would have been discovered at insertion instead of much later
on removal.
Change-Id: I4eabb6892d2bff1e7bc33c04fd6b297b189a3b02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405695
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
ANGLE requires two new variables to be defined; angle_spirv_headers_dir
and angle_spirv_tools_dir.
This change adds those variables in preparation for an ANGLE roll.
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Change-Id: I0c45cb19fd07c6a8551de68cdfe430675108ddb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405678
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
It took a few "independent" changes in order to get the linked fuzzer
bugs to pass without failing. Leaving any out triggered an issue :/
1. I changed nearly_flat to be <= epsilon, since if it's == epsilon and
we split the edge, then the new coordinates would have
difference < epsilon.
2. I updated double_to_clamped_scalar to also snap very small values to
0 (right now 16 * float epsilon).
3. double_to_clamped_scalar is now used to clean up the computed
intersection of two edges, and is used to process all initial
vertices (in case the curve evaluation generates lots of denormals
etc.)
4. I updated the use of nearly_flat in checkForIntersection to report
no intersection if both lines are nearly_flat. The comments suggest
nearly_flat means you can't split along that line since the new
coord is incalculable. So if both lines are flat, it's a really
tough numerical scenario and I just punt.
Then I made a few other changes for the fuzzer and debugging:
1. Added more logging messages and updated the code so that it compiles
correctly if TRIANGULATOR_LOGGING is defined.
2. I was also getting asserts in the fuzzer because the vertex
allocator expects the vertex buffer to be detached by the path
renderer before its destroyed, so I just have the fuzzer detach and
discard it. Running locally, the fuzzer test cases from the two
linked bugs pass successfully without oom'ing or timing out.
Bug: oss-fuzz:33672, oss-fuzz:33620
Change-Id: I7687b920db0a9e200b3fa79b323974b7812e52ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404120
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Define a lambda to iterate over a FT_ColorStopIterator and copy the
stops and colors to a vector.
No functional changes.
Change-Id: I505b32c3add7b723beb43f6ec10cfcd3feaf3b9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405716
Commit-Queue: Dominik Röttsches <drott@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
In particular, this optimizes abs() and sign() when all inputs are known
at compile time. This resolves a TODO on a test case in
`IllegalIndexing.rts`.
Change-Id: Ica310522a85b42dc7ae255bd25004a6629d04176
Bug: skia:10835
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405676
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Currently our ANGLE vendor/renderer detection is based ANGLE's D3D
backends. To detect on the GL backend it'd be helpful to reuse the
normal GL detection after extracting the relevant GL backend strings
that ANGLE puts in GL_RENDERER in its GLES frontend. This is a step in
that direction.
Bug: 1203705
Change-Id: I5367c49e8aaee2e138088316566f95900b9c4831
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405689
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
We only break runs (from the shaper's perspective) on typeface/size
changes. All others we just track locally, and then 'chop up' our draws
accordingly.
Change-Id: I81695772f71175cd5116ed34981ecf16b52123c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405876
Reviewed-by: Mike Reed <reed@google.com>