We had an #ifdef DEBUG (rather than the intended SK_DEBUG) which was
never actually compiled due to DEBUG not being defined. Apparently G3
defines DEBUG, and this code started failing.
Change-Id: I4c3695440ddae91c90605f742791eabc51b2fe6a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322616
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This is a reland of c1916c34fe
As it turns out, benches are not always given a canvas.
Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: I61a2ac058fafc99653e3304876cf4b97350dac8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322490
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This takes the "one pass" code path more often, using less memory, as it
does not have to allocate an intermediate width*height pixel buffer.
Wuffs v0.2 did not support SRC_OVER, only SRC, but Wuffs v0.3 does.
The gif-transparent-index.gif test file comes from the
test/data/artificial directory of the github.com/google/wuffs
repository. It was programmatically generated.
The new GifTest.cpp test passes with skia_use_wuffs true or false, with
or without the SkWuffsCodec.cpp change.
Change-Id: I46fb4c849319fbefc39f331416a8b7d3836093ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320116
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
This reverts commit 58384ad0a7.
Change-Id: I18fcf623675cd97224f99c048fd691b4799d2479
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322396
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This provides an overall ~5% speedup in sksl_medium and sksl_large.
http://screen/9d992SKbYf7DzhW
Change-Id: Ia006a0b6b9f5d3d4e5b2298c64c491a4e04464c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322436
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>
These changes aren't on the critical path, so this doesn't lead to a
measurable speed boost, but this code does a bit less work in the
FunctionDeclaraction/UnresolvedFunction cases, and is flattened out a
bit for easier readability.
Change-Id: I105a1a0b1d02c9ec87f6f874437ddf1a53d9be0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322456
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>
draw_shape_with_mask_filter needs to be pulled apart and refactored to
support sharing the result of HW-generated blur masks with DDL recording
threads.
Change-Id: I4b03d5f0cbdd0f12e9740889159d9e91d7f8a060
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322397
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit c1916c34fe.
Reason for revert: Bots unhappy
Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
TBR=djsollen@google.com,bungeman@google.com,herb@google.com,reed@google.com
Change-Id: I365d2b1d19241a90130bc1b59663651817966f63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322400
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
In the ongoing effort to remove the display globals from Skia, allow
their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
in a normal Skia build and remove all use from Skia code.
Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit 2d403f203b.
Change-Id: Idbcf128f170d17c371221e57ef05a5dc5e306e3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321777
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Our code relies on std::unordered_map for storage of unordered data.
Unfortunately, while unordered_map is algorithmically quite efficient,
in many real-world scenarios--particularly with small amounts of data--
a simple vector with linear search runs rings around it.
This CL doubles the performance of `nanobench -m sksl_large`:
http://screen/7uGYGLCaTtaHU4j
Change-Id: Ia2f6cedfac338876c2da57642e9b34addd85b683
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322320
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>
0.18.1 should add docs
0.19.0 should remove Sk prefix
Change-Id: I21ef6e0735186bffc215a5855d3d53f405bde0fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322318
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This adds docs or stubs for everything that is on the main CanvasKit
object.
Paragraph, Particles, and Skottie will be their own CLs.
Bug: skia:10717
Change-Id: I0f5027d73b2ac7d127f3a03a8f1aaa15f694ae38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321789
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Paragraph will be its own CL.
Bug: skia:10717
Change-Id: I5c0d0ff40b500ec8f8eb74e7a44402a9e9548f8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321519
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This also includes matrices (which I'm reminded I want to test with
TypedArrays and make optional).
Bug: skia:10717
Change-Id: I0f6565a46b766c1f81c28dfc1229d403bff32e69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321118
Reviewed-by: Nathaniel Nifong <nifong@google.com>
This is the object with the most APIs by far.
Some APIs are stubbed out temporarily and will be given more
detail in a follow-up CL.
Bug: skia:10717
Change-Id: Iff5d4269303e7102ad79de90f20640918f403ff4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320770
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Just a typo fix.
Change-Id: I2fe1f6ae1c99d7f20a4fa5f49eefea514e224652
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321977
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>
This reverts commit 556b8bef61.
Reason for revert: TSAN (& ASAN?) bots unhappy
Original change's description:
> moved SkSL Field data into IRNode
>
> Change-Id: Ib119035466a9d5dbd870e5b4e22f45f3b56455c4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321120
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: Ibc6b41c8cfc13d1d7fafc43ff643483da5a5f368
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321980
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Fix a missing null check in SkSLAnalysis.cpp
Change-Id: Ifb976e79f93add9b7439d6b707bcee986f1284a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321936
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
No code changes in this CL, only hundreds of lines of indentation fixes.
Change-Id: I780a0f93a61e567c4dca0e8b8d7066350569dc55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321795
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
With these changes, SkTArray/SkSTArray can be used.
Change-Id: Ibf9a720086ac4342157a665786afac713d56c300
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321786
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This greatly improves the output from a profiler. It makes it much
easier to determine how much time is spent in searching for candidates,
versus actually inlining them.
It also improves the code readability somewhat by breaking a large
monolithic function into several smaller functions.
Change-Id: I1b3ef6ddbe46af60e673f37ded766f8077ed6b03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321376
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
We were letting this get further, then asserting.
Bug: skia:10797
Change-Id: Iff6fe43aa32450b5a517c94773031d593f1f62a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321794
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
- Use a named constant for unsized array columns. Some places were using
0, others were using -1. (It's now -1 everywhere).
- Fix dehydrate/rehydrate of unsized arrays.
- Change sk_in to be an unsized array - this matches the GLSL
declaration (the size is implicitly the number of vertices per
primitive). It also makes our use of sk_in where we index it not look
like out-of-bounds access.
Change-Id: I64b9e81872ed71bcb691657d21b5713217b0b5e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321553
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:10632
Change-Id: Icb27e44d234063ab049fef95587f474323d7ada9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321537
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-resizing and vertical alignment require a non-empty text box. But
currently, the presence of the text box is used to discriminate between
point text [1] and paragraph text [2].
In order to support auto-scaling and v-alignment for point text, we must
decouple the text mode encoding from the text box:
* introduce and explicit LinebreakPolicy property for skottie::Shaper,
and use it to control line breaking instead of the text box presence
* by default, the line breaking policy is initialized per existing
AE/BM semantics: non-empty text box -> paragraph mode,
empty box -> point mode
* the policy can be overridden via the PropertyObserver APIs to enable
point mode auto-resizing and vertical alignment
[1] https://helpx.adobe.com/after-effects/using/creating-editing-text-layers.html#enter_point_text
[2] https://helpx.adobe.com/after-effects/using/creating-editing-text-layers.html#enter_paragraph_text
Change-Id: I007144283a31a2faa579d7eec82af72af3d540cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321788
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
There is not need to have read accesses list in the srcAccessMask of
barriers. This is cause the srcAccessMask is used to make writes to
memory available and reads obviously have no writes.
Change-Id: I2fb1eca04d6f216bc63e200ad36bacdb40bf8146
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321785
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This reverts commit a0c82f08df.
Change-Id: Ic2e93591c64992ec22e477bd0975d71954bef1c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321469
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This will later allow us to rescan parent statements independently,
instead of performing a full rescan of the entire Program on each
iteration.
Change-Id: Id86e139d81125bc529aba9453cba5606d1041908
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321462
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The vulkan spec says that if a subpass has an input attachment that the
input attachment descriptor set must be bound to all pipelines in that
subpass. This includes pipelines that don't actually use the input
attachment.
Bug: chromium:1134454
Change-Id: I9a544a9a457dde80d315010a626ae74eb422bb9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321779
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This will allow us in a follow on change to put in a "fake" gl stencil
format for the wrapped FBO.
Bug: skia:10727
Change-Id: Iba1eca5114b34d25e6a220591d28a20f7b36b12b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321545
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
I noticed it was broken and untested when writing docs.
Change-Id: I5254b7bd50fde8a361c72ccbd7380809d31ccc08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321464
Reviewed-by: Nathaniel Nifong <nifong@google.com>
We don't believe this is needed anymore and was mostly here to support
old desktop GL
Bug: skia:10727
Change-Id: Iab35ec7d6ed64d817aed57c38864932cc417c68e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321541
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This reverts commit 3e40ce0937.
Reason for revert: Lots of bad Vk images from Pixel2/3
Original change's description:
> Convert sksl_frag.sksl to an IRIntrinsicMap
>
> Did some related cleanup:
> - We were setting the IRGenerator's fIntrinsics to the (empty) GPU map
> while converting the GPU/frag/vert source. Make the IR generator
> support a null intrinsic map, so we can (more correctly) structure the
> compiler's constructor.
> - Use explicit types on all calls to findAndInclude.
> - Move the assert back into grab_intrinsics - every converted include
> only contains supported elements (and will continue to do so).
>
> Change-Id: I80ebb247107dde656946858bf2cd1f50a03f67d3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321496
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I6f11366971bfd252f11d30c48e2e776d30458933
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321683
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>