With the new drawing API in Ganesh it should be relatively
straightforward to chain FPs with different textures.
Bug: skia:11396
Change-Id: I57cde39a2c00c79ea8b9b907c0ee8a034f977a14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386616
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 8b6788079f.
Reason for revert: Fixed variable type for chrome & flutter
Basically, you can't use objc_externally_retained with `auto` type
variables because the compiler isn't smart enough to deduce the type
before checking that it's compatible with the attribute.
Original change's description:
> Revert "Use objc_externally_retained to cut down retain/release in Metal"
>
> This reverts commit 78381ee5e0.
>
> Reason for revert: breaking chromium and flutter mac builds
>
> Original change's description:
> > Use objc_externally_retained to cut down retain/release in Metal
> >
> > Until we get off of ARC, these extra retains and releases can really
> > add up in previous profiling of Metal, especially on iOS.
> >
> > Change-Id: Ib3aaa0b863c4469bdb6ad930395a170719c0293d
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381110
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=jvanverth@google.com,bsalomon@google.com,adlai@google.com
>
> Change-Id: I36aff7698a70052a42b91a910b92fd512b3eecd4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388717
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Change-Id: I5cad02fc9d8c7f21e22021858b2e6e9b038a3de6
Cq-Include-Trybots: luci.skia.skia.primary:Canary-Flutter
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389157
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
The main change here is just fusing the following three methods into recreateSKP:
deflateSKP
createCallbackContexts
createSKP
All the remaining changes are just API fallout from that.
Bug: skia:11728
Change-Id: Iae2ce65983ad56c8288bdc830e248394a0055bfb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389925
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Previously it aborted if at a downscale to 1 pixel the effective
sigma was greater than the max sigma.
For repeat/mirror the single col/row is the blurred result
For decal/clamp add a border of transparent/original border and then
recurse.
Bug: skia:11735
Bug: chromium:1174354
Change-Id: I3438f49fdc5167f6def61a49f9fc8eaef3912ec3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385279
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This starts to move us in the right direction for DMSAA support. In
future CLs it will allow GrVkOpsRenderPass to depend/use a
GrVkFramebuffer object when setting things up instead of a GrVkRenderTarget.
This makes it easier to dynamically tell it to use an msaa color attachmet
or the normal non-msaa attachment from the render target.
A bonus to this is that we can remove the ugly addResources call on the
GrVkRenderTarget.
Bug: skia:11809
Change-Id: I7e5db64210830994ec507e6bbc4d3d1e1a9ed4e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390036
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Variable and VarDeclarations cross-reference one another. They generally
get deleted around the same time, but this is not always the case. In
this CL we explicitly detach them from each other at destruction time
to avoid holding a stale pointer, removing the risk of accessing it
later. (Accessing null is still fatal, of course, but it's less
dangerous than using a recently-freed pointer, and easier to debug as
well.)
Modifying things in the symbol table requires a const_cast, but it's not
too risky to null out a pointer field on a conceptually-dead object.
A Variable without a VarDeclaration is inert.
Change-Id: Ie01244495a82a8007269522a561b2512c5f12384
Bug: oss-fuzz:32587
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390056
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This skp started causing
Perf-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-Puppeteer_RenderSKP
to timeout.
Change-Id: I248b4be8f2287ecb16969f71f985acd794bd8d11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390298
Reviewed-by: Ravi Mistry <rmistry@google.com>
This is a reland of 2a88456c15
Original change's description:
> Don't reuse scratch textures when texsub image banned for FBO textures
>
> If writePixels uses a scratch surface it will likely bind it to a FBO.
> If this workaround is in play that texture then becomes "poisoned" as
> a temp surface for a future writePixels(). However, our caching
> mechanism will still find it and we'll incur an extra recursion in
> writePixels to allocate a new texture that has never been bound to a
> FBO. This pattern can repeat itself with increasing recursion depth
> until the cache budget has been reached and we start purging the
> "poisoned" textures.
>
> Disallowing reuse of scratch textures avoids this issue.
>
> Bug: skia:11204
> Change-Id: I8002a673900a9a34e889c92e816781d4b7f84688
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388696
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:11204
Change-Id: I0585497e0d0d09dd68cbef050a0bbb8f9a85c16d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390058
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
I tested sksl_small, sksl_medium and sksl_large to check their ratio of
characters to AST nodes and the amount varied between 8:1 and 12:1. The
parser now reserves a pool of 1 AST node per 10 source characters before
beginning the AST translation. This gives a ~3% improvement in
sksl_large on my machine, not a huge win per se but still pretty
significant given the simplicity of the change.
Change-Id: I028c6c251504065cbbd36b6199b18728ff2414e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390057
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: chromium:1176969
Change-Id: Ie3853bffe1e004c4a930b83201d7e89f82d1df12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385196
Reviewed-by: Stephen White <senorblanco@google.com>
Commit-Queue: Stephen White <senorblanco@google.com>
This allows me to separate the wrapper around the ID3D12PipelineState
from the other data we track with GrD3DPipelineState. In this way I can
create a GrD3DPipeline directly for compute experiments without worrying
about managing graphics-specific objects. In the long run, we'll
probably need GrD3DGraphicsPipelineState and GrD3DComputePipelineState.
Change-Id: I36ff90a93b6e53fae217aaca3f6e0e76d698aa57
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389896
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
We've had a rule that the max render target size can't be larger than
the max texture size. The fMaxTextureSizeOverride option put us in a
situation where that rule could have been broken.
Bug: skia:11396
Change-Id: I403d0fd6af8c294e8a72e379690581523b0ce819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387856
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This resetting occurs when merging ops tasks, when we decide to skip
an ops task because a later ops task in the list has a clear color.
You can't just delete the op chains, you have to get all the stuff
out of the chains first or else you'll hit an assert.
Bug: skia:10877
Change-Id: I5377f242a67ab65a656783a61a534be4756f6c21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389959
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Change-Id: Ic976545daeb8b6e81b8595d5058429d0b0a9b49b
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389958
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:11785
Change-Id: I4af4641c6a8b47d9dbb35448ca6db61763161464
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389836
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This function took a unique_ptr<Expression>& but it was sufficient to
take just an Expression&. This doesn't change anything in this CL, but
I have been experimenting with ownership changes of VarDecl expressions
(due to fuzzer findings) and not requiring a unique_ptr here has been
helpful.
Change-Id: Ic6851e8171779b77c6e5caf45903f2d99dd012fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389797
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The `compositor_quads_xxxxxx` slides were attempting to create their
renderers at program startup time. These are now created in
onOnceBeforeDraw instead.
Change-Id: I5dd5844447bf87348cb88ee97aa4e03593eb07fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389616
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
3d6cedb1e9..eac2397bcf
2021-03-25 jmadill@chromium.org Trace Tests: Work around autoninja.bat change on Win.
2021-03-25 m.maiya@samsung.com Vulkan: Enable glBlitFramebuffer for EXT_sRGB_write_control
2021-03-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 91a2a0b15f23 to 3f4383f1d450 (26 revisions)
2021-03-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from a98fb3f8380a to 8969f861fc24 (2 revisions)
2021-03-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from bda1e3894abc to 7a30f2f0e630 (468 revisions)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC mtklein@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: mtklein@google.com
Test: Test: SRGBFramebufferTest*.*Vulkan*
Change-Id: Ib34bb94945e11d3998401c6becf07d78b249e362
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389776
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
As soon as a single VarDeclaration is successfully created, its Variable
is added to the current symbol table. However, if a variable-declaration
line declared several variables in a row, we would stop if ANY of the
declarations contained an error and discard the entire statement, but
would continue processing the rest of the program. This left us in a
position where some Variables existed in the SymbolTable with valid,
reachable names, but their corresponding VarDeclaration statement had
been thrown away as erroneous. Since Variables point back to
VarDeclarations for their initialValues, this gave us a stale pointer.
Any future reference to that variable name which could trigger an
access to its initialValue would read from this dead pointer.
This CL fixes the conversion of VarDeclarations so that we no longer
throw away any VarDeclarations associated with a successfully-parsed
Variable.
Change-Id: If8ec3c160933e48a0e1f36414234b3a849d8978c
Bug: oss-fuzz:32587
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389636
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 CL lands copies all the documentation in /site into /site2
but also adds frontmatter to each page.
Additionally it adds a Hugo `config.toml` file.
Once the new documentation server is live the original /site
directory will be removed and /site2 will be renamed /site.
Bugs: skia:11799
Change-Id: Ic300cf5c2a2a8fa2f9acc3455251bf818cb96a52
Docs-Preview: https://skia.org/?cl=386116
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386116
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
This is particularly relevant for "vector / scalar" divides, as these
end up generating an extra OpFDiv to take the reciprocal of the scalar.
This meant we were generating code to calculate "literal 1 / literal N"
at runtime whenever dividing vector V against scalar N. This fix moves
the reciprocal calculation to compile-time. And of course, it's a valid
strength reduction in all cases.
Change-Id: I0986057e516120fe872e70135f1ac365155d5377
Bug: skia:11792
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389156
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Due to missing type-checks, we would emit `OpVectorTimesScalar` when
multiplying an ivec with an int, or an `OpFDiv` when dividing an ivec
against an int.
Change-Id: Idc214dbe0ec208cb44f28b22e585584ac2ab7dae
Bug: skia:11267, skia:11788
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388742
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
We had constant-folding tests for vector-scalar arithmetic, but didn't
have an equivalent SkSL unit test for vector-scalar arithmetic that
actually needs to be computed at runtime.
This exposes two SPIR-V bugs: one was previously known, but the other
is a new discovery.
Change-Id: I28737128f20b445797c6c29872335d05f94cc95c
Bug: skia:11267, skia:11788
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388739
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Prior to this change, we were creating the SkSL variable and declaration
immediately on DSLVar creation. This causes problems with function
parameters, which are sometimes supposed to be tagged
SK_MAIN_COORDS_BUILTIN. If we have already created the variable and
inserted it into the symbol table, then by the time we determine the
variable is supposed to be SK_MAIN_COORDS_BUILTIN, it is too late to
modify the (now-const) variable.
We are not yet doing this tagging, but refactoring the creation in this
fashion paves the way to making it possible.
Change-Id: I031170502c5e7c1fff5ecfac01bea470ff4e61ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389216
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Previously, these tests were never actually executed, only read during
code review. They are now properly tested for correctness whenever dm
is run. Non-ES2 compliant statements (do/while/switch) are unfortunately
excluded here, as they are not compatible with Runtime Effects yet.
Change-Id: I965c782baad6f8dd3961a400ae791fb2c1f844d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389296
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
The nitty-gritty details of this optimization don't belong in the body
of BinaryExpression::Make.
Change-Id: I7077d0ccf4ca1b049239f27443db897ed51a5895
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389060
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Found during implementation of COLRv1 fuzzer for FreeType that translate
operation was still missing.
Added a test glyph containing two squares filled with a radial gradient
shifted by dx 128, dy -128 and dx -308, dy 307
combined using a PaintComposite.
Bug: skia:11790
Change-Id: I4cbfe34a111a450777dc2f8fa9d32a405f808a89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389116
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Bug: skia:11785
Change-Id: Ie66d0c49c978c02c23412b6525ee5d5e94f5d5d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388137
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>