Cache last GrTexture needed by onGenerateTexture. Make sure
GrTexture is destroyed by the thread that owns its GrContext.
This CL avoids frequent eglDestroyImageKHR calls, which can take
more than 7ms.
Bug: skia:
Change-Id: Ic8472e7e4c55c0f559d96e16845054dc54ec8efa
Reviewed-on: https://skia-review.googlesource.com/20989
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
There are two remaining swap_rb uses that both look non-trivial to
replace:
- sampling out of index8 when the color table is bgra
- table transforms on bgra inputs in SkColorSpaceXform
I don't think it's a big deal to just leave swap_rb around,
just a little sad.
Change-Id: I3d30200cf867cbf37d6f86572b1574d3e22e3490
Reviewed-on: https://skia-review.googlesource.com/21040
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
No longer used.
Bug: skia:
Change-Id: I24424e540607b5c9a2607fd5f34034bea920f62e
Reviewed-on: https://skia-review.googlesource.com/21063
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Change-Id: I5f48ce9978370f07238a7318ccb6270e10069c92
Reviewed-on: https://skia-review.googlesource.com/21104
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Looks like Clang/Win is defining __i386__, but we're not linking in
stage functions (they don't exist yet for Windows).
Change-Id: I78fdd3e1d89020bc6c64bc1cd5dfb3fbca720b2e
Reviewed-on: https://skia-review.googlesource.com/21103
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
NOTREECHECKS:true
Bug: skia:
Change-Id: I612989c6ce2f309d2f70f896500f73e4baa971a7
Reviewed-on: https://skia-review.googlesource.com/19811
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This is a start to eliminating swap_rb as a stage.
I've just hit the main hot spots here. Going to look into
the ~dozen other spots to see how they should work next.
Change-Id: I26fb46a042facf7bd6fff3b47c9fcee86d7142fd
Reviewed-on: https://skia-review.googlesource.com/20982
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
This reverts commit c070939fd1.
Reason for revert:
This has some knock-on effects in the generation of Android.bp from our GN files. See gn/gn_to_bp.py? We're seeing things like "tmp/tmpsBVycx/gen/" end up in the include search path in Android.bp, which obviously don't exist there...
Original change's description:
> Re-land sksl fragment processor support
>
> This reverts commit ed50200682.
>
> Bug: skia:
> Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
> Reviewed-on: https://skia-review.googlesource.com/20965
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
TBR=benjaminwagner@google.com,ethannicholas@google.com
Change-Id: I502486b5405923b322429219f4cc396a45a14cea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20990
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Seems about same speed for legacy blitter, but much faster for raster-pipeline
Bug: skia:
Change-Id: I19be307c01a199e2477e045fb8c2cca7784564a5
Reviewed-on: https://skia-review.googlesource.com/20967
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: I25619f010f8ac6441529cfe8dff2d8c42d7400cf
Reviewed-on: https://skia-review.googlesource.com/20988
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Bug: skia:
Change-Id: I75d82ef2226c5f116b7de2208c4e914739414b6d
Reviewed-on: https://skia-review.googlesource.com/20984
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Also fixes some state issues in SampleApp.
Change-Id: I854754e8b547f7e62aa90914520aaaa20095f965
Reviewed-on: https://skia-review.googlesource.com/20975
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Generally stages take care of state setup themselves, either with
seed_shader, constant_color, a load, etc. I think these zeros may
be unnecessarily cautious.
This can't make anything draw more correctly, but it could make things
- draw wrong
- draw more slowly
- draw more quickly
so it's an interesting thing to try and keep an eye on.
Change-Id: I7e5ea3cd79e55a65e1dbd214601e147ba3815b87
Reviewed-on: https://skia-review.googlesource.com/20976
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Motivation: factor out some code for later re-use; clean up.
- mask_to_greyscale_image()
- addSMaskGraphicState()
- clearMaskOnGraphicState()
- stop using bare pointer to indicate ownership.
- add ScopedContentEntry::stream()
Change-Id: I7abe7ff9eab89e1002692017000cda2ca7642631
Reviewed-on: https://skia-review.googlesource.com/20978
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
If the circles are concentric, we can use the radial stage and
post-massage t with a 2x3 stage.
Change-Id: I744bc889d509d5f9ff162c179e8ec7ca35410e3c
Reviewed-on: https://skia-review.googlesource.com/20972
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Bug: skia:
Change-Id: I1183574de4e3a429fe00c5a6a0f71745f1f6f5b4
Reviewed-on: https://skia-review.googlesource.com/20969
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
No-Try: true
Change-Id: I2c1b598f03d8536aa3ef118630a0aed63fe54f9e
Reviewed-on: https://skia-review.googlesource.com/10526
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Bug: 6672
Change-Id: Ia6c6bae8a9adfd75172d7116487dfa63c3d69670
Reviewed-on: https://skia-review.googlesource.com/20904
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
Bug: skia:
Change-Id: Ia64f48581e8003baec2eeaa4821354350b3333f4
Reviewed-on: https://skia-review.googlesource.com/20504
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Motivation: a simpler call should make it easier for SkPDF to learn how
to do drawBitmap with A8 bitmap and a maskfilter.
Change-Id: I1a5d190b40b0e9e08fa8876d265a9835a3e9987d
Reviewed-on: https://skia-review.googlesource.com/20961
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Everything uses a ton of stack, nothing tail calls, and for now this is
non-Windows only. But, it does run faster than the portable serial code.
On my trashcan, running `monobench SkRasterPipeline_compile`:
- Normal 64-bit AVX build: 43.6ns
- Before this CL, 32-bit: 707.9ns
- This CL: 147.5ns
Change-Id: I4a8929570ace47193ed8925c58b70bb22d6b1447
Reviewed-on: https://skia-review.googlesource.com/20964
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Bug: skia:
Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
Reviewed-on: https://skia-review.googlesource.com/17843
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
If a bitmap glyph was loaded with FT_LOAD_BITMAP_METRICS_ONLY then the
glyph must be re-loaded without this flag before accessing the bitmap.
BUG=chromium:725975
Change-Id: If5e5a6844e9c32238560135e141fea7f77ad7fac
Reviewed-on: https://skia-review.googlesource.com/20830
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Debug-MSAN
Change-Id: Id53279c17589b3434629bb644358ee238af8649f
Reviewed-on: https://skia-review.googlesource.com/20269
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:6759
Change-Id: I021a8487ccb1d127b2005285e439be34d644f333
Reviewed-on: https://skia-review.googlesource.com/20905
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
AFAICT none of our clients use this entry point and it is tangling up efforts to add a new parameter to the BlurImageFilter.
Change-Id: I494634db98a1d246854a5e3735380fbe55f425c2
Reviewed-on: https://skia-review.googlesource.com/20837
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Adding a GM (Golden Master) image test in Skia to reproduce the bleed
black issue in Chrome. This would allow regressions to be caught in
Skia's status page before being rolled into Chrome.
Bug: 622128
Change-Id: Ifd2824fff59483c8e4be48392ba467414d41ca13
TEST=imageblurclampmode.cpp
Reviewed-on: https://skia-review.googlesource.com/20778
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
These were relying on a 15-minute status thread to keep them from timing
out. --verbose ought to do the same.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Debug-Android
Change-Id: I1d1467a5e777df6ec5e79d2d9ea992e69bfaeeb7
Reviewed-on: https://skia-review.googlesource.com/20821
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
No reason to keep going one at a time when we know there are generally
better ways to handle loading a power-of-two number of low lanes.
This strategy scales up too, with quick answers for 8 (one 8 byte load),
12 (one 8 byte, one 4 byte), etc.
$ ninja -C out monobench; and out/monobench SkRasterPipeline_compile 300
Before: 46.946ns
After: 43.341ns
(This happens to be _lowp. Expect similar small speedups elsewhere.)
Change-Id: I08f87769ea3c9f06ad13d2b1d5326e542b9b63a8
Reviewed-on: https://skia-review.googlesource.com/20903
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
The help simplify the code (and currect a current bug) inside the uploadPixel
functions in GL and Vulkan, we not restrict the bounds upload/write bounds
on a higher level. For non mipped uploads, we requiring the bounds to be within
the bounds on the texture, and for mipped uploads we require the bounds to be
the full texture.
Bug: skia:6780
Change-Id: Ia1cff3ee48edd3676afce6265d60e81ccea6ca6a
Reviewed-on: https://skia-review.googlesource.com/20825
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Per SVG, stroking a zero length line with square or round caps should draw
a square or circle. This path renderer has lots of baked in assumptions
that prevent that behavior, so the easy solution is to let some other path
renderer handle it.
Bug: skia:6781
Change-Id: I9d2da94f75d96554e3cd218848aa552f63add679
Reviewed-on: https://skia-review.googlesource.com/20900
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This lets us run bots that upload images with --verbose.
Today we're getting away with --verbose on some bots because they happen
to skip upload.
Change-Id: If915a65987b43c945263ada7751bf36aedff605a
Reviewed-on: https://skia-review.googlesource.com/20834
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Currently only referenced by SampleApp, and this squelches false positive
warnings from Clang's thread safety analysis when clients build this code.
Bug: skia:
Change-Id: I710fdc882e05fc5b80977139237028d1408f17db
Reviewed-on: https://skia-review.googlesource.com/20831
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This refactors {from,to}_{byte,8888} to lean a bit more on the compiler,
and to share code between the two. The algorithm is not exactly the
same, but it's comparable, and the results of course are identical.
This new algorithm is a lot easier to generalize to AVX2, and parallels
the full-precision {from,to}_{byte,8888} functions in _stages.cpp.
Change-Id: I31ea90d65967bf4ede2497d1e2197cb0e7648bf8
Reviewed-on: https://skia-review.googlesource.com/20828
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Bug: skia:6797
Change-Id: I812837d02b90b78b6df3980649ccf6362e939afc
Reviewed-on: https://skia-review.googlesource.com/20820
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This reverts commit 51f6a0f89e.
Reason for revert: try to fix chrome roll
Original change's description:
> Remove deadcode for sRGB image shading.
>
> Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> Reviewed-on: https://skia-review.googlesource.com/20695
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I90409a08409177d9dc3b094d736af0fdaf7d6cdd
Reviewed-on: https://skia-review.googlesource.com/20824
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>