Fixes a bug with name conflicts in the final SkSL.
Bug: skia:10526
Change-Id: Ic238f89dd778c186e775ecbaabfbaed9e426274f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305563
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: I0da997bd373860ed5e729159abf1b9a0878d2ba4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305570
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Includes full-range Rec709 and BT2020, as well as more precise
matrices for 10 and 12 bit BT2020.
Bug: chromium:1108626
Change-Id: I28cbce982a00c082c8b510dbb7b144bdc1ce02e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305596
Reviewed-by: Dale Curtis <dalecurtis@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Fix the situation when an unresolved {arabic} text is broken into
many small runs by resolved english spaces.
Bug: skia:10487
Change-Id: I3a739501c0fb7e0fc845e68392e1d214df9302db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304000
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Switch DM to --skip, and replace a few others I found
with similar skip-related names, or remove names entirely.
This leaves things with just the unavoidable,
$ git grep blacklist
gn/BUILD.gn: "-fsanitize-blacklist=$_suppressions",
tools/lottie-web-perf/lottie-web-perf.js:
browser_args.push('--ignore-gpu-blacklist');
tools/perf-canvaskit-puppeteer/perf-canvaskit-with-puppeteer.js:
browser_args.push('--ignore-gpu-blacklist');
tools/skottie-wasm-perf/skottie-wasm-perf.js:
browser_args.push('--ignore-gpu-blacklist');
Bug: 1101491
Change-Id: I9f60a18df4fd0304e702df4c68333f669a485c7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305760
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
No real way around using -fsanitize-blacklist,
but we can change the rest.
Bug: 1101491
Change-Id: I3ec84bd2911b6cf6e77eac1c9d565a398bfcde77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305754
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This CL will allow sk_bit_cast to be used in more places (such as .fp
generated code) without #including the entire RasterPipeline header.
Change-Id: Iba3da944d33898d4fc8bc4df97231c55de2b1d0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305710
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
I forgot that fTriangleBufer can be bound in both the stencil step and
the cover step.
Change-Id: I53a394b37d3d551fe7e1fe25f45d26e7bda46e3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305737
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This fragment processor is not accessible to the outside world; it's
only accessible via `SkLightingImageFilterInternal::drawRect`, which
creates its own GrPaint and does not set a custom paint color. The input
color is always default white, so the modulation step is wasted effort.
Change-Id: Ia6c18edab069947ec80b372c1d0728b5ed6ffc98
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305725
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
In theory, all sub runs should be fully const because they are shared by
multiple threads. But, they are used in a single-threaded situation
when flushed to the GPU. AtlasSubRuns are mutate during the GPU flush
to convert PackedGlyphIDs to GrGlyph pointers. Because of that I
decided to make everything const, but label the GrGlyphVector (the
structure that holds the PackedGlyphIDs/GrGlyphs) to be mutable.
Change-Id: I328175a8933b64fda7fab2b3b3d8699683451e60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304216
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This abstraction had one subclass. That subclass was used only as
an implementation detail of SkImage_Lazy. Move the functionality
into SkImage_Lazy.
Change-Id: Icd8754114dc33ae957e542b372086e8caa0408a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305724
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit a75dc33a67.
Reason for revert: Breaking the bots
Original change's description:
> Metal: Hold refs for input buffers from bindBuffer calls.
>
> Mirrors what we have in Vulkan and Direct3D.
> Also adds command buffer tracking, again like Vulkan and Direct3D.
>
> Change-Id: I2280d92274d81830aec7950afc64a0147e38c317
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305396
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=egdaniel@google.com,jvanverth@google.com
Change-Id: I7f3e3bde8ac0f302ecb6b3c44d7850160d2102f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305729
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: Ibdd662fac5b3dedd1f231a9ba32c6e35e8fdf4da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305545
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This reverts commit b6d4ad92ad.
Reason for revert: Breaking the bots
Original change's description:
> Make GrRingBuffer more generic so it can be used over all backends
>
> * Removes the spinlock (should no longer be necessary)
> * Uses GrGpuBuffer and creation through GrResourceProvider
> instead of internal native creation
> * Changes the SubmitData to pass up all buffers used over a given submit
> so the backend can track that better
>
> Bug: skia:10530
> Change-Id: I0d3a686b950dd5cb5f720f827b573238386b9524
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305567
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=egdaniel@google.com,jvanverth@google.com
Change-Id: Ief7df521f66e85d9bfb85508e5a5f8223d7d6725
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10530
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305720
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
We no longer have any use cases where we compose more than 2 processors.
Change-Id: I895d7e538386788dbea18faf3a1833a68b3d5704
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305519
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: Iaa0829d72d0da1469df2da23102ff0e3572b641b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305556
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Bug: 842296
Change-Id: I4564f96d4f179211df19893270ccc222abcdd446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305439
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Mirrors what we have in Vulkan and Direct3D.
Also adds command buffer tracking, again like Vulkan and Direct3D.
Change-Id: I2280d92274d81830aec7950afc64a0147e38c317
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305396
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This existed because GrTexture used to be public.
Change-Id: I5e507084ae12058a20481b517b9130b41c793d29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305521
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
* Combine find and makeMRU.
* Switch from SkMutex to SkSpinLock
In the gm 'paragraph_$' this reduces acquiring the lock from 1.2% to 0.7%
as measured by instruments and nanobench.
Change-Id: I33e3af31825f175c9de42f001acf68ffe3623a8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305564
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
* Removes the spinlock (should no longer be necessary)
* Uses GrGpuBuffer and creation through GrResourceProvider
instead of internal native creation
* Changes the SubmitData to pass up all buffers used over a given submit
so the backend can track that better
Bug: skia:10530
Change-Id: I0d3a686b950dd5cb5f720f827b573238386b9524
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305567
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
make correctness activity loop through all available lotties
implement tests for lottie correctness through Android Activity
Change-Id: I8b5d1dfc0641e3227f23a4d4560faa756b245ede
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305216
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Bug: skia:10419
Change-Id: Iffd139c2d489deb9d57fa860c20158ee398b7c11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305561
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Removes the intermediate stroke representation that GrStrokeGeometry
used to generate. Uses GrOpFlushState::makeVertexStateAtLeast instead
and writes patches directly to a vertex buffer as we iterate the path.
If the vertex buffer runs out of room we simply allocate a new one and
draw the stroke in chunks.
Bug: skia:10419
Bug: skia:10460
Change-Id: Ic743158366e43d4d3f5a4ff97b039d48c9c9c65b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305380
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Although deprecated, loadFont is still in use - we should proxy it for
now.
Change-Id: Iccef76d4ba394d08fc61c7471def8dee470db695
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305516
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
20eb9be552..f6659b3df0
ANGLE has updated the structure of their gn files. This CL updates Skia to match.
Change-Id: I20a735bbb3f4f119c5315627118a82d12df3f856
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305518
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is functionally equivalent to RunInSeries, but the implementation
can be simpler, because it doesn't support an arbitrary number of
processors.
In practice, Ganesh no longer calls RunInSeries with more than two
inputs at once, so all existing calls to RunInSeries have been replaced
with Compose.
Change-Id: I719d0a11ed747775af4e99fb9de33323d43e7874
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305400
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
The code in cts subfolder was unused in over a year, and the SKQP stuff
was also unused (and non-inclusive).
Bug: 1097221
Change-Id: Icf3d37fbe773125ab714a9b68b1b620f39857b5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305438
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Change-Id: Ia6f93673de9b4cb76c4b0655c55b374aef362cfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305405
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Spread/choke operates as a compression of the alpha channel towards the
low bits.
Change-Id: I82aec1321b60f7f75a79e8280e761d4629f6c923
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305183
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
This lets us end up with a single coverage processor instead of an array
of them. Coverage processors simply multiply against their input so the
results are conceptually equivalent.
In practice, it is uncommon to have more than one applied clip (at least
on GMs).
Change-Id: I73d5da8015f48c6cb1d3f37257e7e0c4329579b5
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305117
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
GrTAllocator implies relatively limited use cases, while GrTBlockLinkedList
helps clarify the underlying data structure (and its associated advantages
and disadvantages). I am not beholden to the name, so am happy to have
a discussion on alternatives like GrTLinkedList or GrTBlockList or
GrTBlockArray.
Change-Id: I5b10801d8593991d5e804c4074a81efb1dd110ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304396
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Only works on raster backend for the now.
Bug: skia:10344
Change-Id: I2c82d5345ae83a2bb2744ab27e3d971c57ea989e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303271
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Did some cleanup to remove repetition that was distracting from the
thing being tested.
Change-Id: Ie385c6ec2d1325a1bd0ba5c2270e7f2ddd1d24b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305076
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
This is an attempt to fuzz the usage of SkSurfaceCharacterization,
SkDeferredDisplayRecorder, and SkDeferredDisplayList.
This fuzzer first makes a surface and characterization from
GrDirectContext and then create a DDL and draw it on the surface.
The code is compiled with ninja and run with AFL at the speed around
600/sec
The future changes will include:
1. An alternative way to create DDL: first create the surface and
extract the characterization from that existing surface.
2.currently we just pass the ownership of the DDL into draw_ddl. In
the future we should add a version that retains ownership of the DDL
in order to fuzz the lifetime of the DDL.
3. Refactorize line 62-119
Change-Id: I9cd9736813be3abc82430bd4eeb559d6993ecbd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303600
Commit-Queue: Zepeng Hu <zepenghu@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
vpermps (added here) makes this very easy,
with an index controlling what 32-bit values go where.
A index of the form {0,2,4,6|?,?,?,?} will put the 4 low 32-bit halves
of 4 64-bit values in lanes 0,1,2,3. We can use that twice to get all 8
low halves, then our new vperm2f128 to put them together. Conveniently
vpermps can also load directly from memory:
vpermps (%rdi), {0,2,4,6|?,?,?,?}, lo
vpermps 32(%rdi), {0,2,4,6|?,?,?,?}, hi
vperm2f128 0x20, lo,hi, dst
We don't care what those top four indices are for load64_lo, so we'll
use them as the indices for load64_hi. That makes the full index
{0,2,4,6|1,3,5,7}, and load64_hi will just vpermf128 the other 128-bits
of lo/hi:
vpermps (%rdi), {?,?,?,?|1,3,5,7}, lo
vpermps 32(%rdi), {?,?,?,?|1,3,5,7}, hi
vperm2f128 0x31, lo,hi, dst
vpermps needs its index in a register, so we use a temporary for that.
Our logical lo can alias dst, and hi can alias that index, so it's just
one extra temporary register in the end.
Change-Id: Ie6a4efbf12ddada45dd09c0f580fa7350cf3019e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305171
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
After this change:
https://skia-review.googlesource.com/c/skia/+/303481
we began using VK_SAMPLER_MIPMAP_MODE_NEAREST rather than
VK_SAMPLER_MIPMAP_MODE_LINEAR when disabling MIP filtering and it
caused Chrome pixel tests to fail with imperceptible changes.
Note we disable MIP filtering in Vulkan using maxLOD because
there is no VK_SAMPLER_MIPMAP_MODE_* value that disables it.
Change-Id: Ifd51f7a07e2725ba8e77fb65df2e9f3ff2f984de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305189
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>