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>
persp_shaders_ gm expected diff (in gpu backends only), due to change
from filterquality (which gpu and cpu interpreted differently for mips)
to samplingoptions (which both backends interpret the same).
Specifically for kMedium:
- gpu treated as SkMipmapMode::kLinear
- cpu treated as SkMipmapMode::kNearest
Bug: skia: 7650
Change-Id: Idc53ad8d01d9c928b425c092b36191153714d347
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343737
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit b37a693254.
Reason for revert: Breaking Flutter roll
Original change's description:
> Revert "Reland "Reland "Revert "Initial land of SkSL DSL.""""
>
> This reverts commit 6b07e0eb49.
>
> Change-Id: Ic01f31edf55b2d1a7533e0e8ed33b39b4846d937
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343106
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
# Not skipping CQ checks because this is a reland.
Change-Id: I3373f186f4d0531bc8ab1e4392c512608389734f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343518
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This reverts commit 14a25eff99.
Reason for revert: breaking android roll.
Original change's description:
> Add new SkCanvas methods for Android Framework WebView queries.
>
> Existing queries will be deleted after Android framework update.
>
> This puts the queries behind SK_BUILD_FOR_ANDROID_FRAMEWORK and
> removes the need for the framework to hop through multiple levels
> of abstraction to get to the FBO info.
>
> Change-Id: Ia016b0d3044c803603e36bc1c5e1a644f50a7eaf
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343417
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,reed@google.com,stani@google.com
Change-Id: I40ac3b7eec101c246cc41a40d930b9a03ece3264
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343519
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:10594
Change-Id: I853f05f12c0a3b8e25948c51c11fa9bd01cc67f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343422
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: I9fe7e637028ca5345f4ef19e4aedd035ba71070c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343430
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This problem is being fixed on the record side as well, but meanwhile
it need not stop the rest of the debugger from functioning
b:skia:9765
Change-Id: I3b466ff4ea0b04b39c5b79fbc1cd84acfef3e7e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343442
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
This ensures that if the original src had transparent-black in the
border pixels that our downsampled image does as well. Otherwise,
clamp mode causes these nonzero border pixels to produce vertical
/horizontal smears at the edges of the result.
Bug: chromium:1156804
Change-Id: Id2c3a66de29724db2fcc7954abf7f14937cfb76d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343111
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
- Add primitiveUnits attribute to SkSVGFilter class
- Add optional x, y, width, height attributes to filter effect base
class (SkSVGFe)
- Add function to return list of inputs for all filter effects
- Add function to compute filter primitive subregion and use it in all
filter effect classes.
Currently the "primitive subregion" just returns the entire filter
effect region, so there should be no diffs on gold with this change.
Bug: skia:10841
Change-Id: I1de283bebe302c0710d6b09d62a2472787820a49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343107
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Essentially GrGpuResources have two counts now. The original fRefCnt has
not changed and is still used for things like knowing if we can reuse
a scratch texture. The new fCommandBufferUsageCnt is used to track
when a resource is in use on a command buffer or gpu in general. We now
delay calling notifyRefCntIsZero until both of the counts are zero.
Bug: skia:11038
Change-Id: I1df62f28e4b98e8c1a5ab2fd33d4aead19788d93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343098
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Existing queries will be deleted after Android framework update.
This puts the queries behind SK_BUILD_FOR_ANDROID_FRAMEWORK and
removes the need for the framework to hop through multiple levels
of abstraction to get to the FBO info.
Change-Id: Ia016b0d3044c803603e36bc1c5e1a644f50a7eaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343417
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: If29ee048d359d0ccd7b0ab708f54d40746b92386
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343423
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Id38a3d04fcb1904a4c666d92087b4fe14bd03a27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343110
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
No reason to limit the user's painting to the upper left corner.
Change-Id: Ia71f57cda7a26ea9be874eca753e0929cfc10873
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343426
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 6b07e0eb49.
Change-Id: Ic01f31edf55b2d1a7533e0e8ed33b39b4846d937
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343106
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
- Consolidate SVGColor resolution into one method in render context, now
that it's a shared type.
- Remove all instances of `~TypeName() override = default;`. The only
thing this provides is slight/unreliable protection against someone
inadvertently removing 'virtual' from the base class destructor. In
our case that is SkRefCnt, which I'm assuming has very low risk of
that happening.
- Clean up some .h copy/paste issues of the form
`#endif // Typename_DEFINED`
Change-Id: I67fb40b2828b010fb7fdd83046bc1eae1a476267
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343421
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Change-Id: I1eaffcce43921632df483e40aa365c645663093a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343418
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I8eae896f5a859b59a1ba0b29dc95d5aa070c12ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343102
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Several related W3C tests still won't pass until we implement the filter
primitive subregion.
Bug: skia:10841
Change-Id: I9e4beb9da8aa769f23a979ad5116a38fcda85ca4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343105
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>