Bug: skia:
Change-Id: I2e164ef1d7de05e6e1eb1b7d7d4d3efeb785dd43
Reviewed-on: https://skia-review.googlesource.com/46562
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I1cb30b50068e99181788181683e82e2421d0038a
Reviewed-on: https://skia-review.googlesource.com/46701
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Due to floating point math, it's possible to add a round-rect to a path,
then pull it back out and have the type change.
Bug: skia:7037
Change-Id: I071b77378da08b873ff9d68fdac2373370faa71c
Reviewed-on: https://skia-review.googlesource.com/46585
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
kPathRefGenIDBitCnt is used only by SkPath.cpp and SkPathRef.cpp.
Curiously, there's no existing private declarations shared by
SkPath and SkPathRef, so I added kPathRefGenIDBitCnt to
SkPathPriv.h as the go-between. If there's an existing convention
I overlooked, please let me know.
R=reed@google.com,djsollen@google.com
Bug: skia: 6898
Change-Id: I929d780c3b4a10e5cf78e7176a7516abf912508e
Reviewed-on: https://skia-review.googlesource.com/46560
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
TBR=mtklein@google.com
Bug: skia: 6898
Change-Id: I1c83fe67cbfb978f15ebcbb9081ac4d4a8f00e4a
Reviewed-on: https://skia-review.googlesource.com/46680
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Change-Id: Ic72884c8447ad950a91a2afe9566dd5a92dd6f11
Reviewed-on: https://skia-review.googlesource.com/46582
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
That breaks the assumption that the work is proportional to loops.
For example, loops = 5 and loops = 7 would result in the same count
if count = loops / 4.
Bug: skia:
Change-Id: Idae86d658cbfba8a7f49b983ed61a8b7fbea007a
Reviewed-on: https://skia-review.googlesource.com/46600
Commit-Queue: Yuqian Li <liyuqian@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
a couple of missing names
trip up bookmaker
TBR=reed@google.com
Bug: skia: 6898
Change-Id: I224f3a0422474cb6d4d3558abb3e800d5abedd12
Reviewed-on: https://skia-review.googlesource.com/46580
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Guarding loads of 8-15 with defined(__AVX2__) should prevent errors
like these:
external/skia/src/jumper/SkJumper_stages_lowp.cpp:287:46: error:
'memcpy' called with size bigger than buffer
case 12: memcpy(&v, ptr, 12*sizeof(T)); break;
The loads of 8-15 were of course unreachable, given the &(N-1) == &7.
Change-Id: Ifcb5c177c6909e1df55cb564779a4d6610ff7b32
Reviewed-on: https://skia-review.googlesource.com/46521
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
I have text_16_AA_FF -> 8888 (forcing RP) faster than head now on my
laptop. I'm feeling confident that we can make this perform well.
After looking at performance a bit more today, it looks like everything
is within what I'd consider comparable in performance, especially on
ARM. On x86-64 it looks like big bulk blits get a little slower and
small mask blits get a little faster.
Quality looks good, and maybe improved for 565.
There are fewer platform-specific differences now in _lowp, and I think
they're few enough now that we could even consider completing the
unification by folding the 8-bit and float code together. Rename
"div255()" to "rebias()", slap on a few coats of paint...
Guarded for Chrome with SK_JUMPER_LEGACY_LOWP.
Change-Id: I36309c07cf736f3cb31952cca66030ad56026318
Reviewed-on: https://skia-review.googlesource.com/45982
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
For the blur_1.50_normal_low_quality benchmark, this code goes from about 120us to 85us.
The original implementation executes at about 95us.
This changed in controlled by the flag:
SK_SUPPORT_LEGACY_SLOW_SMALL_BLUR
BUG=chromium:759070
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Change-Id: If722cb8ffd8c47a94b7a6b4e6dd26fd1474b6209
Reviewed-on: https://skia-review.googlesource.com/45300
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: Ib6a289553ecd15c722599b7dc0d347a7800801cb
Reviewed-on: https://skia-review.googlesource.com/46284
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
The extra generality of having a std::function is for MDB reordering. In the current MDB reordering world there is one pass through the surfaceProxies at creation time and a second pass after flush to create the usage intervals.
Change-Id: I3f548417eddc1dad7503d919241301e404255ffe
Reviewed-on: https://skia-review.googlesource.com/46200
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
All of the published coefficients assume math is being done on bytes, and
that 128 is the encoding of 0 (in the biased Cb and Cr values). When
sampling an A8 texture, though, GPUs typically decode as byte/255. Thus,
128 ends up slightly larger than 0.5. To fix this, just adjust the bias
terms to be scaled by 128/255, rather than 0.5.
I also changed some of the other coefficients to be higher precision,
based on the values in ITU-T T.871.
This originally surfaced as a Chromium bug where an all-black JPG decoded
to (1/255, 0, 1/255) on GPU. I've added a GM that encodes a color cube to
JPG, then draws from the encoded data. GPU and CPU (libjpeg) still
disagree in many cases, but the newer version performs much better
(diffing gl and 8888 configs):
Previously: 95.2% of pixels differ, max diff of 2, avg diff of 1
Now : 65.4% of pixels differ, max diff of 1, avg diff of 0
Bug: skia:7038 chromium:763605
Change-Id: I4801db9f6e2fc4d4109eb5e27c9499f214084d38
Reviewed-on: https://skia-review.googlesource.com/45842
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:4632
No-Try: true
Change-Id: I85a0b23037d5885e5d762788d8bf5b7cc6fc19b2
Reviewed-on: https://skia-review.googlesource.com/45980
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Match based on the whole test name.
No-Try: true
Change-Id: I03c180195f5854f30e521e2772dcb7e44f1cc3b8
Reviewed-on: https://skia-review.googlesource.com/46000
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
No-Try: true
Change-Id: I5290942396a903fcaac94feaab83a5db31af1f93
Reviewed-on: https://skia-review.googlesource.com/45844
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Gives the convex and tessellating renderers first claim on larger
paths, and the distance field renderer first claim on complex,
non-volatile paths. This also requires plumbing the clip bounds
through GrPathRenderer::CanDrawPathArgs.
Bug: skia:
Change-Id: I16e1d35ad5ee63251e33f113b1579cbba60456da
Reviewed-on: https://skia-review.googlesource.com/42224
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This brings the optimization in blink's FEComposit::MapRect() [1]
into skia.
Previously for these classes we used the default SkImageFilter::
onFilterBounds() which returns the union of the bounds of input filters.
However, this was not optimized if some input filters don't contribute
to the output. When we switch blink SPv2 paint invalidation from using
blink's FilterOperations to cc/skia's filter classes, the non-
optimization caused over-raster-invalidations.
Now override SkImageFilter::onFilterBounds() in these classes to make
their filterBounds() return the same results as the blink counterparts.
Also fix a bug of SkArithmeticImageFilter when k4 is non-zero by
overriding affectsTransparentBlack() to return true in the case, so
that we will use the crop as the final bounds.
[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/graphics/filters/FEComposite.cpp?l=115
Change-Id: I91d4cadc267e6262ee3f050a0ddac90154419775
Reviewed-on: https://skia-review.googlesource.com/38921
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Step two in supporting growable/shrinkable atlases.
Bug: skia:3550
Change-Id: I0cdec2a9f59cc8ced071bfeec2f8ed5a228c4b7a
Reviewed-on: https://skia-review.googlesource.com/43260
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Just let the general three-stop shader handle all three-stop gradients.
Also, pre-compute values derived from the middle stop to remove all
division (and actually convert computation to FMA form).
Bug: skia:
Change-Id: I1aae069d929d1a942c38aa2e2f3fd5fb7d9b2f10
Reviewed-on: https://skia-review.googlesource.com/45800
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Re-enable more verbose output across all bots.
There is no good reason why we shouldn't collect additional
information that helps triaging failure.
Some of the current output might have to be expanded down the road.
Bug: skia:
Change-Id: I5ff89a803f1e390bbd859756cba53a359d2801ba
Reviewed-on: https://skia-review.googlesource.com/45140
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Stephan Altmueller <stephana@google.com>
This fixes an Android rendering bug where radial gradients were being used
for "clipping" (via DstIn blend mode). The gradient stops were placed at
(0, 0.999, 1), which caused our table quantization to drop the last stop.
kThree_ColorType now means "0, any t, 1". The old (special-case)
kThree_ColorType is now called kSymmetricThree_ColorType.
Bug: skia:
Change-Id: I96a0b9e679f2d537862a3e097f7e3446474914ea
Reviewed-on: https://skia-review.googlesource.com/45260
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I57ef380202183580a953dec2617c8210ccab8927
Reviewed-on: https://skia-review.googlesource.com/45160
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Also refactor the prepare callback stuff to share logic
between software path rendering and clip mask generation.
Bug: skia:
Change-Id: I0c56c6df8703eb59d2d49a4c3985bd4f5ef20f01
Reviewed-on: https://skia-review.googlesource.com/44421
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit c576e93d17.
Reason for revert: ASAN failures
Original change's description:
> Switch to the new SkSL lexer.
>
> This completely replaces flex with a new in-house lexical analyzer generator,
> which we have done for performance and memory usage reasons. Flex requires us
> to copy strings every time we need the text of a token, whereas this new lexer
> allows us to handle strings as a (non-null-terminated) pointer and length
> everywhere, eliminating most string copies.
>
> Bug: skia:
> Change-Id: I2add26efc9e20cb699520e82abcf713af3968aca
> Reviewed-on: https://skia-review.googlesource.com/39780
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
TBR=bsalomon@google.com,ethannicholas@google.com
Change-Id: If27b750a5f696d06a6bcffed12fe9f0598e084a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/44881
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This completely replaces flex with a new in-house lexical analyzer generator,
which we have done for performance and memory usage reasons. Flex requires us
to copy strings every time we need the text of a token, whereas this new lexer
allows us to handle strings as a (non-null-terminated) pointer and length
everywhere, eliminating most string copies.
Bug: skia:
Change-Id: I2add26efc9e20cb699520e82abcf713af3968aca
Reviewed-on: https://skia-review.googlesource.com/39780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Since the script cannot do anything to prevent submission via the API it might
help to atleast add a "[DO NOT SUBMIT]" prefix.
NoTry: true
Bug: skia:7016
Change-Id: I825f28947df85a4d54ead764f8d363e12f83fbfb
Reviewed-on: https://skia-review.googlesource.com/44840
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This does not add additional textures to the atlases, just adds the
ability to access those textures in the shaders.
Bug: skia:3550
Change-Id: I4c1da2bc374a76131f5f4ad946543e03e0ab3126
Reviewed-on: https://skia-review.googlesource.com/44841
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Tried this out locally and it shrunk the size of the checkout from 1010M
to 586M and shaved a few seconds off the running time as well.
NoTry: true
Bug: skia:7016
Change-Id: I472712e88d2cf30f0cfd71a373630d12a4937684
Reviewed-on: https://skia-review.googlesource.com/44820
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
This file makes use of va_list so it should include stdarg.h. This was handled
implictly by SkString.h before https://skia-review.googlesource.com/34381
landed.
Bug: skia:
Change-Id: I74fc50463549481a0e8835943823e627bc288dd8
Reviewed-on: https://skia-review.googlesource.com/44740
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>