- Carmack rsqrt uses an int where it wants a uint32_t.
- turn off all santizers (including signed-integer-overflow) in third_party/externals/sftntly.
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot
BUG=skia:4635
Review URL: https://codereview.chromium.org/1511643002
Batches together path range draws whose view matrices differ by a
simple translation by pre-translating the individual path transforms
during the copy.
BUG=skia:
Review URL: https://codereview.chromium.org/1507203002
Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.
Add SkImageEncoder::CreatePixelSerializer() to return a
PixelSerializer that calls into SkImageEncoder::EncodeData.
SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.
Review URL: https://codereview.chromium.org/1507123002
Replaces drawPathsFromRange with a more general drawPathBatch method.
While this still isn't perfect, it's a step in the right direction that
removes the need for path range draws to fit in a public API.
BUG=skia:
Review URL: https://codereview.chromium.org/1506823004
In the repro case the conic in question has a replicated control point at the end. These points end up being slightly different by the time they get to convert_noninflect_cubic_to_quads so the initial checks for a zero vector don't fire. The following checks, in the constrainWithinTangents path, do fire however leading to a premature termination of conversion to quads.
BUG=skia:4611
Review URL: https://codereview.chromium.org/1504983003
When using NVPR, sometimes paths must be stroked by Skia and then drawn
with fill using NVPR. In these cases, use the fill type and bounds of
the stroked path, not the original path.
Fixes degeneratesegments for nvprmsaa backends.
BUG=skia:4608
Review URL: https://codereview.chromium.org/1504753003
Since the SK_SAVE_LAYER_BOUNDS_ARE_FILTERED path is long gone from
SkCanvas, remove or localize some temporary variables.
Cleanup only; no user-visible changes.
BUG=skia:
Review URL: https://codereview.chromium.org/1508823002
If the stream can peek less than requested, peek that amount. Return
the number of bytes peeked.
This simplifies crrev.com/1472123002. For a stream that is smaller than
14 bytes, it can successfully peek, meaning the client will not need to
fall back to read() + rewind(), which may fail if the stream can peek
but not rewind.
This CL revives code from patch set 3 of crrev.com/1044953002, where I
initially introduced peek() (including tests).
Add a test for SkFrontBufferedStream that verifies that peeking does
not make rewind() fail (i.e. by reading past the internal buffer).
BUG=skia:3257
Review URL: https://codereview.chromium.org/1490923005
When checking whether a matrix was a pure scale, we subtracted
0x3f800000 from the diagonals; if the diagonal value was already
very negative, we'd underflow. Replace subtraction with XOR.
When dealing with repeating tiled bitmaps, when the bitmap was
very large, we'd multiply an offset by 65535, possibly causing
underflow. Throw in a cast to long (casting to unsigned also
silences the warning and wouldn't involve extension, but I can't
convince myself that it's correct).
BUG=skia:4635
R=mtklein@google.com
Review URL: https://codereview.chromium.org/1504933002
To fix the Chrome fillRect issue on Galaxy S6.
We should use high precision for position related calculation.
BUG=chromium:552999
Review URL: https://codereview.chromium.org/1500393002
We were doing (x+127)/255 = ((x+128) + (x+128)>>8)>>8 in three instructions:
1) x += 128
2) shift x right 8 bits
3) add x and x>>8 together, then shift right more 8 bits
Now do it as two instructions:
1) shift (x+128) right 8 bits
2) add x and (x+128)>>8 and 128 all together, then shift right 8 more bits
On ARM this will be a 5-10% speedup for SrcATop, DstATop, Xor, Multiply, Difference, HardLight, Darken, and Lighten xfermodes. When we have a mask (e.g. text), *all* xfermodes except Plus will get a similar boost.
This should mean now that (a*b).div255() is the same speed as a.approxMulDiv255(b) on both x86 and ARM, and of course it's perfect instead of approximate. So we should eliminate approxMulDiv255(), but I'll leave it to another CL, as it'll need Blink rebaselines.
This CL should not change GMs or Blink.
https://gold.skia.org/search2?issue=1502843002&unt=true&query=source_type%3Dgm&master=false
BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.android:Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Debug-Trybot,Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release-Trybot
Review URL: https://codereview.chromium.org/1502843002
Because the convolution kernel is (currently) applied in device space,
there's no way to know which object-space pixels will be touched. So
return false from canComputeFastBounds().
The results from the matrixconvolution GM were actually wrong, since
they were showing edge differences on the clip boundaries, where they
should really only show on crop boundaries. I added a crop to the GM
to keep the results the same (which are useful to test the different
convolution tile modes).
While I was at it, SkImageFilter::affectsTransparentBlack() was
inapplicable on most things except color filters, and its use on
leaf nodes was confusing. So I removed it, and made
SkImageFilter::canComputeFastBounds() virtual instead.
BUG=skia:4630
Review URL: https://codereview.chromium.org/1500923004
Adds a check for PBO/transfer buffer support to GrGLCaps,
and uses that to pick the correct buffer type.
BUG=skia:4604
Review URL: https://codereview.chromium.org/1503593002
visual bench run on Mac Pro
curr/maxrss loops min median mean max stddev samples config bench
100/100 MB 16 412µs 413µs 413µs 414µs 0% ▄▁▇▄▄▄▄█▄▃▅ gpu warmupbench
101/102 MB 32 547µs 548µs 611µs 1.24ms 34% █▁▁▁▁▁▁▁▁▁▁ gpu image-filter-sprite-draw-image
102/103 MB 32 547µs 548µs 721µs 1.23ms 41% █▁▇▁▁█▁▁▁▁▁ gpu image-filter-sprite-draw-bitmap
103/103 MB 64 546µs 546µs 546µs 547µs 0% ▆▄▂▁▇█▅▇▅▇▃ gpu image-filter-sprite-draw-sprite
Should have no effect on Chrome while SK_SUPPORT_LEGACY_LAYER_BITMAP_IMAGEFILTERS is defined (which it is in chrome)
BUG=skia:1073
Review URL: https://codereview.chromium.org/1491293002
Reason for revert:
Introduced memory leak; pixel changes in Chrome.
Original issue's description:
> Matrix convolution bounds fix; affectsTransparentBlack fixes.
>
> Because the convolution kernel is (currently) applied in device space,
> there's no way to know which object-space pixels will be touched. So
> return false from canComputeFastBounds().
>
> The results from the matrixconvolution GM were actually wrong, since
> they were showing edge differences on the clip boundaries, where they
> should really only show on crop boundaries. I added a crop to the GM
> to keep the results the same (which are useful to test the different
> convolution tile modes).
>
> While I was at it, SkImageFilter::affectsTransparentBlack() was
> inapplicable on most things except color filters, and its use on
> leaf nodes was confusing. So I removed it, and made
> SkImageFilter::canComputeFastBounds() virtual instead.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8705ec80518ef551994b82ca5ccaeb0241d6adecTBR=reed@google.com,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1497083005
Because the convolution kernel is (currently) applied in device space,
there's no way to know which object-space pixels will be touched. So
return false from canComputeFastBounds().
The results from the matrixconvolution GM were actually wrong, since
they were showing edge differences on the clip boundaries, where they
should really only show on crop boundaries. I added a crop to the GM
to keep the results the same (which are useful to test the different
convolution tile modes).
While I was at it, SkImageFilter::affectsTransparentBlack() was
inapplicable on most things except color filters, and its use on
leaf nodes was confusing. So I removed it, and made
SkImageFilter::canComputeFastBounds() virtual instead.
BUG=skia:
Review URL: https://codereview.chromium.org/1500923004