Change-Id: I1d8c1714c63e2f3833726342845d44abfc49745c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243096
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Everything except for SkImageInfo.h is mechanical
Change-Id: I2d775c79467fb15f6022e80d21b4a9151272fe2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242896
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I87b0fc76ef48c1a21498e576853a6c3b4a6a98f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242563
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
I happened to have this on when profiling skottie_tool and got curious
why I was seeing the interpreter run and not JIT code. Mostly this
moves the code in bulk out of SkVMTest.cpp to SkVM.cpp so that code in
SkVM.cpp can call dump() on itself.
Also this CL has the skvm::Program hang onto the original value-based
builder program (in addition to its own interpreter program and JIT
program if we can). This is entirely so that when JIT bails out I
can have it dump out both the builder and interpreter programs for
more debugging aid.
I'm still going to need more debug tools somewhere to figure out
what the program that needs 17 registers is, and what to do about
it.
Finally, remove skvmtool. It's annoying to maintain its build
rules, and I don't use it much if ever anymore.
Change-Id: I995d15d04bda79ddfc4d68bda8aaa3b5b9261f08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242520
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This CL adds:
kAlpha_F16_SkColorType
kRG_F16_SkColorType
kRGBA_16161616_SkColorType,
which should be it for a while.
Bug: skia:9121
Change-Id: I81b9d46a202a76e9b7d7ca86495d72dbdae32576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241357
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: If7b84731bce9ba8f1034c974fc7852ee304b499d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242478
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
One describes the color type use case for the texture and the other
the color type of the texel data, a la writePixels().
Bug: skia:6718
Change-Id: I3ca2ab9f76aaeca4b2861a171b1aaacaa0709d1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240679
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This change adds another layer of complexity and control to
the particle system. There are now two code chunks: the old
code that's run per-particle, and new code that's run for
the effect itself. This allows for effect lifetime to be set
by the script (eg, randomly), as well as the emission rate.
Rate can vary over time (see pulse.json), and particles can
be emitted in bursts by setting the effect's burst field
(see fireworks.json).
Additionally, the effect has its own frame of reference and
color, which becomes the default state for newly emitted
particles. This allows synchronizing state across particles
in various interesting ways (see color in fireworks.json).
Change-Id: Iec2f7a3427ce1d6411ed7ef5b3023cbef2e8a134
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240498
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We need to specify attribute locations and (sometimes) frag shader
output locations. Desktop GL worked fine without this, but Flutter
ran into this problem, and a Pixel 2 reproduced the issue.
Note that both APIs (BindFragDataLocation and BindAttribLocation)
don't take effect until the next time the program is linked, so
we have to relink the program after applying those changes.
I was afraid that re-linking would eliminate the perf benefits of
pre-compiling the shaders, but (at least on Pixel 2) that's not
the case. I traced the life of a single program, and the initial
link (during precompile) was 4.4 ms. The re-link took 0.23 ms.
Change-Id: Iadb3b425a8cf9f6a52e015c2e37f875c0fd73d6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241758
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This also switches GrColorType::kR_16 to kAlpha_16 to more closely match raster.
Bug: skia:9121
Change-Id: I03c6e6c52c90aa4223478c5ea6c8b2ed8558f677
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239930
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is a reland of a7398246cb
TBR:egdaniel@google.com
Original change's description:
> Separate texture creation from uploading in GrGpu subclasses.
>
> GrGpu base class still allows creation with initial data, but separated
> at subclass level into create and then write pixels.
>
> GrGpu handles determining which levels need clearing and GrGpu
> subclasses take a mask and clear levels with mask bit set.
>
> GrGLGpu uses three pronged clear strategy:
> glClearTexImage() if supported, glClear() if format is FBO bindable, and
> lastly glTexSubImage2D with zero'ed buffer.
>
> Change-Id: I65fb1e60eed8f9d0896d686d3baeb10b57ff8f39
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236676
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
Change-Id: I54cda3b6a4b017a94ef1f50bb3748c45a24d8936
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240558
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit a7398246cb.
Reason for revert: breaking bots
Original change's description:
> Separate texture creation from uploading in GrGpu subclasses.
>
> GrGpu base class still allows creation with initial data, but separated
> at subclass level into create and then write pixels.
>
> GrGpu handles determining which levels need clearing and GrGpu
> subclasses take a mask and clear levels with mask bit set.
>
> GrGLGpu uses three pronged clear strategy:
> glClearTexImage() if supported, glClear() if format is FBO bindable, and
> lastly glTexSubImage2D with zero'ed buffer.
>
> Change-Id: I65fb1e60eed8f9d0896d686d3baeb10b57ff8f39
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236676
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com
Change-Id: Icc6860053242ff1a55784a0f38938968f9e5e5b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240556
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
GrGpu base class still allows creation with initial data, but separated
at subclass level into create and then write pixels.
GrGpu handles determining which levels need clearing and GrGpu
subclasses take a mask and clear levels with mask bit set.
GrGLGpu uses three pronged clear strategy:
glClearTexImage() if supported, glClear() if format is FBO bindable, and
lastly glTexSubImage2D with zero'ed buffer.
Change-Id: I65fb1e60eed8f9d0896d686d3baeb10b57ff8f39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236676
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Add GM that generates reference blur rect images and compares against
actual.
Change-Id: If0ce291e211fefe96af8afdf0a60636b5f40ef47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239757
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Sets UIPinchGestureRecognizer and UISwipeGestureRecognizers and
passes the result down to the sk_app::Window. To simplify detection,
swipes take precedence over pans, and pans require a single touch.
This is less flexible for the app, but in most cases I think is
what we want.
Bug: skia:8737
Change-Id: Ib031b6ad465d3a353da29d7e0b48a666d4ff8b9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239776
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The name "blocklist" is more inclusive than "blacklist" while
still conveying the intention clearly.
See https://developers.google.com/style/word-list#blacklist
In order to rename Chromium's --ignore-gpu-blacklist command line
parameter we must first add the new --ignore-gpu-blocklist
everywhere it is used. Once this is done, Chromium can rename its
command line parameter and then we can remove the old references.
This CL adds the --ignore-gpu-blocklist command line parameter.
Bug: 842296
Change-Id: Icb54aa74a899d5530bad0c679f4382f28e13ff40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239923
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Blume <cblume@google.com>
The client can do a test run of their application with
a persistent cache set to SkSL mode. They store the key
and data blobs that are produced.
Ship those blobs with the application. At startup, call
GrContext::precompileShader for each key/data pair. This
compiles the shaders, and stores the GL program ID, plus
a small amount of metadata in our runtime program cache.
Caveats:
* Currently only implemented for the GL backend. Other
backends will require more metadata to do any useful
amount of work. Metal may need a more drastic workflow
change, involving offline compilation of the shaders.
* Currently only implemented for cached SkSL (not GLSL
or program binaries). Supporting other formats again
requires more metadata, and the cached shaders become
increasingly specialized to GPU and driver versions.
* Reusing the cached SkSL on different hardware is not
supported. Many driver workarounds are implemented in
the SkSL -> GLSL transformation, but some are higher
level. Limiting device variance by artificially hiding
extensions may help, but there are no guarantees.
* The 'gltestprecompile' DM config exercises this code
similarly to 'gltestpersistentcache', ensuring that
results are visually identical when precompiling, and
that no cache misses occur after precompiling.
Change-Id: Id314c5d5f5a58fe503a0505a613bd4a540cc3589
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239438
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:8737
Change-Id: I81379bd57684626705da48e03c91b83e91031e0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239104
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Combines the two boolean options into a single tri-state enum. Old GLSL
option is still present (temporarily) until Chrome is switched over.
Also add a type tag for cached program binaries, so we can safely
detect cache entries of the wrong type.
Change-Id: I0ddeefa9180b27bc2c46e2e7b77e6c9cdf4a730a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238856
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
GrResourceAllocator.
Removes LazyInstantiationType. All callbacks can be invoked one time (if successful).
Lazy callbacks indicate whether their lifetime should be extended, which is used by
promise image proxy callbacks.
Promise image proxies are no longer deinstantiated at the end of flush and
GrDeinstantiateProxyTracker is removed. They will be instantiated the first time
they are encountered in GrResourceAllocator::addInterval (without actually adding
an interval) and then remain instantiated.
Also removes some "helper" versions of proxy factory functions that took fewer
params. They weren't much used outside of test code and as the total number of params
has grown their relative utility has diminished. We could consider a params struct
or radically simpler helpers that take only a few params if desired.
Change-Id: Ic6b09e7b807b66cb9fcbb7a67ae0f9faf345485f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238216
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Adds MetalWindowContext_ios and hooks it up to Window_ios.
Also includes some minor clean up in other iOS code.
Bug: skia:8737
Change-Id: I2e8a0c755310fbc4ed534f975815c60f8eca130b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238438
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Also simplify type registration.
Change-Id: Ia47febb2ae2cd5821476c3dd33a688b688aa6d6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238359
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This replaces the SDL-based system and should allow Metal to work on iOS.
OpenGL and raster will render but there's no touch input yet.
Bug: skia:8737
Change-Id: I863accc47f0e1781192d567dbe54d1e321c3cd2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231561
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Icd331e8946d80652750b8b6ea0db65f5f676ac3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Bug: chromium:795132,chromium:985500
Change-Id: Idbb4d45b29d2c0d0fd54b05b807086ecf0b8cf26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237492
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Skia has traditionally snapped horizontal and vertical baslines to
pixels as a kind of baseline hinting. This is a feature which cannot
reliably be implemented from the outside and tends to make static text
better looking by ensuring the baselines are consistent. However, with
animation like scrolling or flying and resizing text the animation
suffers. Allow the user to disable the baseline snapping.
Change-Id: I6ee1c12a07242d10c08ae4b75c73e4e28c860790
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237124
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
The existing intersect logic already fails if either argument is empty,
without performing any extra checks.
Change-Id: I4cc4f1e63af7efbed4e1084284c1607c104ff361
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237142
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Also whitelist third_party/skcms from #include rewrites.
https://skia.googlesource.com/skcms.git/+log/d931999c3afd..6655095842ec
git log d931999c3afd..6655095842ec --date=short --no-merges --format='%ad %ae %s'
2019-08-20 mtklein@google.com Add missing b-tweak to skcms_TF_Invert()
Created with:
gclient setdep -r skia/third_party/skcms@6655095842ec
The AutoRoll server is located here: https://autoroll.skia.org/r/skcms-skia-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux-blink-rel
Bug: chromium:976551
Change-Id: I6566968525070f0af808d04211b16e71f9850cea
TBR=egdaniel@google.com,mtklein@google.com
TBR=egdaniel@google.com,mtklein@google.com
Change-Id: I2c9b6a270693e9e93303b9cfef1262488bba1aae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235936
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
gn_to_bp: wrap defines in ifndef
create_apk.py assumes you are either run from the aosp tree, or you are
being run from make_universal_apk.py, which now defers to create_apk.py
for all functionality, even argument parsing.
tools/skqp/generate_gn_args moved some functionity into skqp_gn_args.py,
which is now used by create_apk.py
create_apk now accepts android sdk license for you.
create_apk and make_universal_apk.py now are better about cleaning up
after exceptions happen.
Old script make_apk.sh now just points at make_universal_apk.py
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP
Change-Id: I2dba20ef7017987cabb2bd49f070e2b1594785d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235678
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
fMaxTextureSize and were never used by Skia, and
f{Min|Max}DistanceFieldFontSize are never set by Chrome.
Make a new constructor that only takes a bool to indicate DFT
capability. Move Chrome to use that ctor.
Change-Id: I1889dd39ffdaa2134b0892b8275f8223c6c8aad0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235102
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
- clang 3.9 -> clang "9" (pre-release)
- libstdc++ -> libc++ (pretty sure)
PS1 should fail to build... need to update
infra/bots/recipe_modules/build/chromecast.py too.
PS2 compiles but fails to link.
PS3 puts -Lchromebook_arm_gles/lib on the link line;
unclear to me how we're linking today...
PS4 removed a workaround for the older toolchain.
PS5+ tries to request the older glibc math symbols
that shipped with the devices we test on... we don't
seem to have glibc 2.27 there.
Cq-Include-Trybots: skia.primary:Test-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Debug-All,Perf-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All,Test-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All
Change-Id: I7a1ac2da646fb5b0cbdeb44310f1c0747013f3f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234956
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Change-Id: I127c979670c3dc7dac2e35908a795afbdefca8f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234902
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: I962e923a4994eb549a9c1002323f33d05b936b84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234912
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>