The GLSL backdoor for tessellation shaders is only experimental at
this point. In order to enable the tessellation path renderer, we need
to turn off HW tessellation and let it use the indirect draw modes.
Bug: skia:10419
Change-Id: Ic979978a331c7ad016907cf42b2562b35caab8ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344336
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: chromium:1156804
Change-Id: I95af34415f334bfc3c7ccef48a2110aa499b427c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344557
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
All fragment processors now use explicit returns; sk_OutColor no longer
exists at all.
Change-Id: Ic5cf566a916c1d616edcc56ba84b6780776f8515
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344300
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Bug: skia:10419
Change-Id: I63f000e7b3c5623c1e40c3ce6950c8f5565bc11c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343477
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This mostly undoes commit 2777cd37 "Have SkWuffsCodec use two Wuffs
decoders", also known as
https://skia-review.googlesource.com/c/skia/+/250937
Using two Wuffs decoders is more complicated, but was necessary to allow
getFrameCount() to update when part-way through an incremental decode
while more data comes in. Updating that count matches an existing
Chromium test (TestResumePartialDecodeAfterClearFrameBufferCache).
On further discussion (crbug.com/1132828), that behavior is unnecessary
(and that Chromium test will be removed), so having Skia use two Wuffs
decoders is unnecessary complexity.
Removing the now-redundant WhichDecoder enum (an enum with only one
possible value), a mechanical change, will be a follow-up commit.
Bug: chromium:1132828
Bug: skia:8235
Change-Id: I892e4790c7265597be1eee10e6364e76b6402cb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342836
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
This was completely unreferenced, as it should be.
Change-Id: I9ec99aa8f70e42618b3abc918a13dbb6e4fa1b1b
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344657
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: I41a5aea7b01efe8901498621197b9a5ff0f4fe5f
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344656
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Instead of relying on RenderContext to pass text rendering options
downstack, introduce a dedicated virtual (onRenderText) and pass options
explicitly.
Root text nodes bridge from onRender() -> onRenderText().
This removes some complexity from RenderContext and incidentally fixes
xml:space = preserve (the value was being dropped during local ctx
copying).
Bug: skia:10840
Change-Id: Ic5fd9e0f9382f52f65108521574fcb2a422b97aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344559
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Change-Id: I25529ec79bd53dcd475a959503d15b1be7d39970
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344616
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
- rename to clean_paint_for_drawImage()
- switch LatticePaint to clean_paint_for_lattice()
- factor out clean_paint_for_drawVertices()
Change-Id: Icb31172dfcf4d20ca085a951b8239731441e5433
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344519
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
When the filter units are objectBoundingBox, values are fractions/pcts
of the object's bounding box, which we were miscomputing.
Also adding in a small tweak to return bounds for <polygon> elements
(will be needed for future filter tests).
Bug: skia:10841
Change-Id: I7fcac21258570d872672c42e99a9739a65c53e30
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343520
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
This definitely simplifies the drawing code, but always copies the input
SkPaint so that it can be modified if necessary. If we get perf hits, we
can just revert this. We could keep it using a copy-on-write, but with
this change, I believe we've removed the majority of instances of
SkCopyOnWrite<SkPaint> inside SkCanvas. There's just one LatticePaint
struct that's overly complex for what it does that I can clean up next.
A middle ground would be to keep the copy-on-write behavior, but drop
the branch on image-filter. Given the lack of perf needle movement on
some of the other simplifications that avoided technically unnecessary
paint copies, I doubt it's worth the complexity.
As part of this change, since the draw calls no longer branch based on
the presence of an image filter, the AutoLayerForImageFilter takes over
calling predrawNotify() in its various forms. We don't have to follow
through with that, if we'd rather have the notification be called out
explicitly within the draw call itself. I've found it easy to forget to
call predrawNotify(), or keep it in the right place while updating draws
so I may be biased.
Bug: skia:10987
Change-Id: I5204c175aae691f82cc45f3d9a04ef64dee5d80f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342920
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This had a hand-rolled version of unpremul() inside of it; it now
simply calls unpremul(). Also converted to return its result instead of
setting the sk_OutColor.
Change-Id: I1061bd01bc416e8260a82f7ee0f2a44910116e5f
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344297
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This reverts commit b476981949.
Reason for revert: https://logs.chromium.org/logs/skia/507fb79e5cf79811/+/steps/dm/0/stdout
Original change's description:
> Add integer relational ops to sksl_public.
>
> These aren't implemented yet in the software rasterizer, but work
> properly on GPU and serve as a good end-to-end test for skia:10999.
>
> Change-Id: I1dac66cd5762ebde828e819c1b6890016599672e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344036
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: Ic9ace24c3f0ea764b2720bffa50792a136d452ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344558
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
These aren't implemented yet in the software rasterizer, but work
properly on GPU and serve as a good end-to-end test for skia:10999.
Change-Id: I1dac66cd5762ebde828e819c1b6890016599672e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344036
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Change-Id: I9c059ec562f981fdd5a2ac78d40aec204af2a5f9
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344160
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
282fb4092b..cb8903b143
2020-12-15 lehoangq@gmail.com Metal: Ignore OS's internal shader cache when testing.
2020-12-14 cwallez@chromium.org GeometryTest: Expand suppressions to AMD Intel OpenGL
2020-12-14 m.maiya@samsung.com Vulkan: Add test for Pixel bug with passthrough GLSL function
2020-12-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 0a64a9747555 to c16dc7107fd3 (8 revisions)
2020-12-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from c594de23cdd7 to c0bcfaf3bae9 (3 revisions)
2020-12-14 xiaoxuan.liu@arm.com Vulkan: Fix build issue in vulkan display/headless backend.
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 tdenniston@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: tdenniston@google.com
Change-Id: I401a45adae5af0cd7f1ef8058dd01cea13c1bf4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344456
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
No more
friend class ::SkArenaAlloc; // for access to ctor
Change-Id: I76fa3319498a965623e6865b75d1fb507ab845a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344236
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This probably isn't ideal, but it's a step to keep it compiling while we
get this utility up and running in a more permanent way.
Change-Id: I98f56fe28b98862000a134f697bb441d87e47f30
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344176
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This FP now uses an explicit return statement instead of sk_OutColor.
Additionally, simplified the generated code by removing a temp variable
that did nothing (coordSampled), and by removing a needless addition at
the end of the loop.
It looks like coordSampled was useful when it was introduced at
http://review.skia.org/20465, but it was later rendered useless.
Change-Id: I8c549b16b4d422d7faeab48e2087f168ad5788b5
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344156
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Some of the SVG libraries, there appear to be some SYScalls
(getStreamFromFD) that are no longer included in an emsdk 2.0.10 build.
Change-Id: Ib6ac4c20186e79316cd5b2566ed2deb2d3e3d0af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344076
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Change-Id: I842d04855a711481fae64bc1671a8c433eb27265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344056
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Folds the update of fQuickRejectBounds into the destructor of the Auto
object. So it's still a little magical, but less so than a macro.
Bug: skia:10987
Change-Id: I275b21718291c353e889da77e1e56ee6a0dbb72c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342922
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Instead we calculate these values on the fly as needed. This is
necessary for hairlines because the tessellator will operate on them
in post-transform space, which requires different tolerances than the
setup code.
Bug: skia:10419
Change-Id: Ia8ffa8858b45949521c085ccbe5712b3842f785f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343499
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
findMSB has one special trick that Metal doesn't naturally have an
equivalent for, specifically in its treatment of negative numbers.
findMSB searches negative numbers for a zero bit, not a one bit!
We emulate this behavior in Metal using select(n, ~n, n<0).
Change-Id: I861c6b8fb3dc5427643cd8c68a39a53f1959bff3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343996
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This reverts commit f760258654.
This version doesn't assume SK_BUILD_FOR_ANDROID_FRAMEWORK implies SK_SUPPORT_GPU
Cq-Include-Trybots: luci.skia.skia.primary:Canary-Android
Change-Id: Ib1d983d76f3258ed84aa2d6ef4a5cddf7f342cf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343578
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
When replaying DDLs w/ offsets it is no longer true that the
dimensions of the recording characterization must match those of
the playback characterization.
Change-Id: I3dba1a91af3d58aaf3619274303f8d2b10a76e24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344016
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Previously, coercion between a signed type and an unsigned type was
treated as "no cost" because these types shared the exact same priority.
This meant that we couldn't choose the proper overload with function
calls that only differed in signed-ness, like:
void fn(int4 x);
void fn(uint4 x);
So we would always choose the int4 version since we encountered it
first. Now, we can choose the correct overload; signed types now have
a slightly elevated priority over unsigned types, allowing coercion
costs to work normally.
Also added some comments to `determineFinalTypes` while trying to see
if that needed some improvements as well, but this turned out to be
a red herring--it didn't need any functional changes.
Change-Id: I334debae9ad0e9b290109658d2fde8f6526770a2
Bug: skia:10999
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344017
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>
Change-Id: I1a96060b2e52cddb50948a48520aab30bd097bbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343577
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The derived classes already had to initialize a base-class caps member.
Convert that to a function, which also constructs the compiler.
Eliminates a bunch of boilerplate, and gives us a single place to do
startup tweaks to the compiler object.
Change-Id: I5d14d894e454a2ac56defd43e51ebc1d3a862736
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/337718
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Before compiling, write the shader text to 'sksl.bak', then remove it if
we succeed. This avoids loss-of-work if you manage to uncover an assert.
Change-Id: Idec7740210ce56cc9522c31e79f6aae1d4c3da1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343425
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This makes it much easier to understand what sorts of types we are
creating.
This has some minor repercussions for the SPIR-V code generator, which
actually created temporary Types on the stack occasionally, but these
were simple to fix.
Change-Id: I1ca43cdef0445d2b9789a435221dce50b03d954a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343517
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
By using npm ci, we can make sure the versions of the helper
libraries (e.g. Karma, Jasmine) we are testing with locally
is the same as the versions we are using in the continuous
integration system.
The copying is needed because our docker recipe forces us
to run as not root, and this was causing some issues. As a
result, I changed the canvaskit test/perf to not re-use the
same file as pathkit does so copying was easier and the
dependencies between the two modules is broken.
Bug: skia:11077
Change-Id: Ib05890d666d3507d4f724a4ae298484629c7932a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343503
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Update pathkit too. I want to make sure we are up to date with testing
harnesses that could support testing as ES6 modules.
Bug: skia:11077
Change-Id: I1ecd8acbdf6ad47a5877aa7dbb6772406d2edb54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343501
Reviewed-by: Kevin Lubick <kjlubick@google.com>
The build process was broken a few weeks ago and never fixed.
Thanks to metzman@ for the suggested fix!
Change-Id: Id3e0370896cd59b72b484accae107a2e0c9d36e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343896
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Bug: skia:10987
Change-Id: I2fb1315ad1c78a64782cc7476f8153e41285abaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342924
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>