This breaks up the giant IRGenerator::convertFunction method into more-
manageable chunks, moves the functionality into FunctionDeclaration,
and funnels the DSL through it so it receives the same error checking.
Change-Id: Icf2ac650ab3d5276d8c0134062a4e7e220f9bf32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402778
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
SkGpuDevice still needs to separately ref the context as
GrSurfaceContext has a bare GrRecordingContext pointer. However, it
doesn't need to be separately specified.
Also rm unused SkSpecialSurface_Gpu() width/height params.
Change-Id: Ia24bbce2a85e21277aff2c1c9e1fd37a29246a6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404236
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This will be used by the upcoming DSLParser, which needs to be able to
put DSLExpression and DSLVar into containers such as std::vector and
std::optional.
Change-Id: I8d367cfd0b3a852a368c69a5b3be6c0eaa41d74a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404156
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
A followup CL also applies this to Pixel5.
Bug: skia:10877
Change-Id: I2344bb1be75c94ed6960f4b13206c8b517f98613
Cq-Include-Trybots: luci.skia.skia.primary:Test-Android-Clang-Pixel4-GPU-Adreno640-arm64-Debug-All-Android_API30,Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android,Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan,Test-Android-Clang-Pixel4-GPU-Adreno640-arm64-Debug-All-Android_Vulkan,Test-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Debug-All-Android,Test-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Debug-All-Android_Vulkan
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403636
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
These types had no tests, have never been used, and GLSL doesn't support
byte types.
Change-Id: Id423e3e4790be7f443acc88bce5497470c7d3fd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404219
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
CCPR atlasing now handles merged tasks correctly so they can work
together happily again.
Bug: skia:10877, skia:11731
Change-Id: Id15c8fc3ed0560150f5c373651f5c583239f3e09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404136
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Adds aliasing barriers, a texture copy convenience routine, and
subresource support in texture resource state transitions. Also
some minor formatting cleanup.
Change-Id: Ic8ba504350a3f954a21d24a214d9cceb3f5fc44d
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403600
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This is a first step towards moving the ModifiersPool out of the
IRGenerator and into the Context.
Change-Id: I8000923f32a9e3cc1878a09464680884b950e513
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404216
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This allows the CCPR atlas manager to setup its atlas before
we do any memory budgeting. That way the atlas size is known.
Bug: skia:10877
Change-Id: I9d73df29d1e8412b714b00dbf2ebff47025d3e3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403857
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
If they are not maintained, then the merge leaves links to
deleted RenderTarget nodes. This creates confusion while
trying to debug.
Change-Id: I9d98a4ed2887573ddc5dfa2bae1bb22d30879c5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402641
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
We were previously doing a square-matrix multiply then discarding one
third of the result; now, when available, we just get the result we need
via a non-square multiply.
Change-Id: Ie13ae6f2c7f23e3a4c1f2c4eeb6361a97cdccf67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403079
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This simplifies our world a lot, especially when reordering/merging
ops tasks. As noted in the comments, this assumes a full flush every
time but the successor – which is coming soon – won't rely on that.
Bug: skia:10877, skia:11948
Change-Id: I1843e80dfee8d7a868c6db4bae94bcd2cbfb5b78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403856
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Now that the fixed count stroke tessellator has landed, these should
hopefully not regress performance.
Bug: skia:11138
Bug: skia:11139
Change-Id: Ifdcd817705d394ea6d0f932711ed725a66a7fc91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403956
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:11945
Change-Id: I1a8b167c320108392c2a168ad88a92c36b34459f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404118
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This reverts commit adadb95a9f.
Reason for revert: breaking android
Original change's description:
> Better first-class shader & color filter support in runtime effects
>
> This does a few things, because they're all intertwined:
>
> 1) SkRuntimeEffect's API now includes details about children (which Skia
> stage was declared, not just the name). The factories verify that the
> declared types in the SkSL match up with the C++ types being passed.
> Today, we still only support adding children of the same type, so the
> checks are simple. Once we allow mixing types, we'll be testing the
> declared type against the actual C++ type supplied for each slot.
> 2) Adds sample variants that supply the input color to the child. This
> is now the only way to invoke a colorFilter child. Internally, we
> support passing a color when invoking a child shader, but I'm not
> exposing that. It's not clearly part of the semantics of the Skia
> pipeline, and is almost never useful. It also exposes users to
> several inconsistencies (skbug.com/11942).
> 3) Because of #2, it's possible that we can't compute a reusable program
> to filter individual colors. In that case, we don't set the constant
> output for constant input optimization, and filterColor4f falls back
> to the slower base-class implementation.
>
> Bug: skia:11813 skia:11942
> Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I94ba57e73305b2302f86fd0c1d76f667d4e45b92
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11813 skia:11942
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404117
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Change-Id: I721825d1a38e9f6846b94f84d14cb8c85b7a7519
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403601
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Being able to Construct() arbitrary types is necessary for the upcoming
DSLParser.
Change-Id: I2d439b4a1db7a460043efa5f0e9207b6073e9f1f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403696
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Galaxy S20 is dropping draws that involve stencil. This hopefully
won't affect performance since these GPUs have fast framebuffer fetch
support.
Bug: skia:11906
Change-Id: I5d81e689e161bdf5cdc767439561172bb6a4d311
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401042
Auto-Submit: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
4ab224f7b0..c6fb0e5afb
2021-05-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from ae499a6ea7cf to 34166dd37ed5 (607 revisions)
2021-05-03 jmadill@chromium.org infra: Add trybot_analyze_config.
2021-05-03 tandrii@google.com [infra][realms] bump usage to 25% of all builds.
2021-05-03 timvp@google.com Fix Rolling ANGLE into AOSP
2021-05-03 jplate@google.com Add support for OpenCL ICD Loader
2021-05-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c5559fe406e3 to 4676514cf188 (3 revisions)
2021-05-03 tandrii@google.com [infra] use realms on 5% of Angle builds.
2021-05-03 tandrii@google.com infra: init LUCI Realms config for Angle.
2021-05-03 tandrii@google.com infra: validate configs using lucicfg tool in PRESUBMIT.py
2021-05-03 tandrii@google.com infra: remove redundant ACL.
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 egdaniel@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: egdaniel@google.com
Change-Id: I3b147e5cd58eb7af996e121e24badb964194be4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404038
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This does a few things, because they're all intertwined:
1) SkRuntimeEffect's API now includes details about children (which Skia
stage was declared, not just the name). The factories verify that the
declared types in the SkSL match up with the C++ types being passed.
Today, we still only support adding children of the same type, so the
checks are simple. Once we allow mixing types, we'll be testing the
declared type against the actual C++ type supplied for each slot.
2) Adds sample variants that supply the input color to the child. This
is now the only way to invoke a colorFilter child. Internally, we
support passing a color when invoking a child shader, but I'm not
exposing that. It's not clearly part of the semantics of the Skia
pipeline, and is almost never useful. It also exposes users to
several inconsistencies (skbug.com/11942).
3) Because of #2, it's possible that we can't compute a reusable program
to filter individual colors. In that case, we don't set the constant
output for constant input optimization, and filterColor4f falls back
to the slower base-class implementation.
Bug: skia:11813 skia:11942
Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
We can't attach stencil to a wrapped render target. If we find
ourselves rendering to one that doesn't have stencil already, don't
issue any ops that use stencil.
Bug: chromium:1196353
Bug: skia:11943
Change-Id: I9db93f31a4f8556103be72eb708755e4eaf78136
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399839
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This string had several characters which resulted in zero
glyphs. Having zero glyphs bypassed the buffer sizing code,
and continued to process the glyph run list assuming it had
7 runs because the buffer sizing code also clears the run list.
This caused the code to process runs from a previous SkTextBlob,
which was already deleted.
If the there are no glyphs, call the buffer sizing code to
set up all the invariants. Exit if there are no runs produced.
Bug: oss-fuzz:33915
Change-Id: I9f3f38a58112c44ddd65265c68d982b3b0dcd79c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403439
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
The full 'display' presentation attribute [1] has a number of settings
that we likely don't want to support. However, 'display:none' has some
practical uses and is easy enough to support. This progresses some
local tests as well as a few W3C tests.
[1] https://www.w3.org/TR/SVG11/painting.html#DisplayProperty
Bug: skia:10842
Change-Id: I60fef959fb45c3cfb229b85b720dfa69fc458bc3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403438
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This will be followed up by a CL that actually flips the flag
back for these GPUs under Vulkan. For reasons that are
entirely wacky, flipping the flag AND landing this change in
one CL causes the segfault in the Pixel5 perf job. Makes no
sense.
So we separate this flag into its own CL to see what happens.
Bug: skia:10877
Change-Id: Ia7c91b52f1d9c7e0817454a1af2de69706ed8c34
Cq-Include-Trybots: luci.skia.skia.primary:Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403576
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
This flag was only used by the IRGenerator-based inliner, and has not
been used since it was removed.
Change-Id: Ie8f3e60dfd0065c1056c54fec2597abd34292613
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403437
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>
ProcessorOptimzationFlags already returns kAll for null children
Change-Id: Iff29d1a2bfd4d6a3aaa7359f3003b757fdef8ccb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402649
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ifddf49096943260eefa8d313a8a90a74ddb27097
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403078
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>
257b29efa9..4ab224f7b0
2021-04-30 jmadill@chromium.org infra: Always checkout swarming_client in standalone.
2021-04-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 42d8716d0294 to c5559fe406e3 (24 revisions)
2021-04-30 cclao@google.com Vulkan: Disable logMemoryReportStats if driver extension not exist
2021-04-30 jmadill@chromium.org Add tools/perf essential Python files.
2021-04-30 lubosz.sarnecki@collabora.com formatutils: Add 8 unused bits to 24 bit depth formats.
2021-04-30 gert.wollny@collabora.com Angle: drop ANGLE_serialized_context_string from requestable
2021-04-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 5feb27ec9892 to ae499a6ea7cf (462 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 egdaniel@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: egdaniel@google.com
Test: Test: mb.py zip
Change-Id: Id9e4c7e79854d70b39d38a57486bf0011ce944f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403376
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Adds counters for the number of render passes, number of MSAA render
passes, and each op that either does or would trigger MSAA. Adds a
bot that collects stats on the html (not svg) skps.
Bug: skia:11396
Change-Id: Ic48263d6310670d8f0d09ec4c4bf6a2b83fc7d02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401636
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Bug: skia:11900
Change-Id: I97d1f2a9523252318ffb4f479b197cb0ef9cf0b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402920
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: b/68860345
Bug: b/151177513
Bug: b/151953481
ag/Iead63ec340208211058d0a04ed4e476af6cd51b0 added these to Android.bp,
resulting in merge conflicts. After that is reverted, we can land these
here unchanged to get the same effect, without conflicts.
Change-Id: Ia9e3970564dca014e4f144fba9e3da4f0c174e7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357277
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Default the background color to transparent black, which is correct for
mskps captures from Android framework.
Bug: skia:11900
Change-Id: I97cab04993c0f85259e831f3d0c44f9b962365af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403077
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Two issues:
1) we are currently computing object bounding boxes using the
RenderContext of the client resource, which can override presentation
attributes
-> introduce an OBBScope to capture not just the current OBB node but
also its original RenderContext
2) text fragments must use the root <text> bounding box for OBB-relative
units [1]
-> update SkSVGTextFragment::renderText to not override the current
OBBScope; this ensures we're using the root element scope for the
whole text subtree
[1] https://www.w3.org/TR/SVG11/text.html#ObjectBoundingBoxUnitsTextObjects
Bug: skia:11936
Change-Id: Ib48ccd3dc22639de42ea150b881a26dda72fa4bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403037
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>