Commit Graph

61383 Commits

Author SHA1 Message Date
Kevin Lubick
ee3358e96f [canvaskit] Fix DisplacementMap test
Change-Id: I9a52454552fb6cbc179691bb50131fa8465a6496
Bug: skia:13450
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558436
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-07-13 17:18:42 +00:00
John Stiles
c3d175bee2 Use passed-in pre-local matrix name consistently.
Fixed several other places that were regenerating the `preLocal` matrix
name from scratch, instead of using the passed-in name.

Change-Id: I11824a31b6d3eba9944c6166b11bfd1ccb2f50ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558303
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-07-13 16:44:13 +00:00
John Stiles
ba5f3d0966 Restructure pre-local matrix generation code.
Previously, `generate_default_before_children_glue_code` would create
a new variable but wouldn't actually return its name. This made it
difficult to use in several ways:
- The caller would need to manually regenerate the variable name
- We may just want the matrix expression, not a whole new variable
  (in the context of a runtime effect, we might not have the luxury of
  freely inserting new statements into the code)

We now have a function `pre_local_matrix_for_entry` which returns the
pre-local matrix expression but does not assign it to a variable at
all. This simplifies our implementation of `emit_glue_code_for_entry`
because we no longer need to recreate the variable name.

Change-Id: Ib5e32db1543b34d154c7df6b31140564f888f584
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558298
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-07-13 16:44:13 +00:00
John Stiles
a92f606864 Update child handling in Graphite glue-code generation.
Previously, `emitGlueCodeForEntry` assumed that every child should be
invoked exactly once, and those values should be passed into the shader
snippet.

This model does not work for Runtime Effects. A runtime effect is
free to invoke its children multiple times, or not at all. Now,
glue code generators can choose to call `emit_child_glue_code` and get
the old behavior, or they can handle children their own way as
needed. In practice, GenerateDefaultGlueCode uses this function, but
no other glue-code generators currently use children or have a need
to call it.

This CL also changes `emitGlueCodeForEntry` into a free function
instead of a private method. This makes it possible for us to use
this function from the glue-code generators, which are not part of
SkShaderInfo. SkShaderInfo is documented as a "simple collection
object," so this is probably the right design anyway.

Change-Id: I6975ca92df8a71942f09d7d9ea6f146d9eb3b9ab
Bug: skia:13508
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558157
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-07-13 16:44:13 +00:00
Robert Phillips
1a7bd58e37 Improve encapsulation of SkRadialGradient
Bug: skia:13438
Change-Id: Iba09a04f648f4a11a18e3dd82a257036e311a167
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555636
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-07-13 16:19:04 +00:00
Florin Malita
e9effac80c [skottie] Don't assert with multiple camera layers
While at the moment we only support a single camera layer, we're still
parsing all cameras (in case they are being used as parent layers).

Remove the assert in getParentTransform() and check for camera layers
explicitly instead, to avoid crashing in debug builds.

Bug: skia:13515
Change-Id: Iaaec828941d206a6e02c5921a7d26a75ad899832
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557897
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-07-13 15:59:08 +00:00
Brian Osman
101ad96b34 Disallow all layout qualifiers (other than 'color') in runtime effects
Bug: skia:11301
Change-Id: Ie6a5ef920093b63983d8dbbdbaa94960fa7af83c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558304
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-07-13 15:51:01 +00:00
Herb Derby
cef14e607d Move StrikeRef to StrikeForGPU.h
Moved sktext::gpu::StrikeRef to sktext::StrikeRef in the file
StrikeForGPU.h. The move required a strangely large number of
header fixing up.

StrikeRef will be returned by StrikeForGPUCacheInterface in
future CLs.

Change-Id: I7f71cec586d4d9ed66b2b7adb5c848ca1fe273de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558077
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-07-13 14:50:54 +00:00
William Candillon
cabb1f65d0 Expose make luma color filter
Change-Id: Id43b00a84fed05f5a60c56bb8a828431559fe828
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551456
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-07-13 13:38:40 +00:00
John Stiles
2d35191b04 Add #if guards for Graphite and SkSL inside glue-code builders.
The glue-code functions don't do anything useful if we have disabled
SkSL or Graphite.

Change-Id: I67db1dcd202528769e643671e9b269a853fc93f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558296
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-07-13 13:32:07 +00:00
skia-autoroll
f0d5285d3a Roll vulkan-deps from 43d1c87aa958 to 50b3fdf7ad7d (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/43d1c87aa958..50b3fdf7ad7d

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC scroggo@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: scroggo@google.com
Change-Id: Ifd6c18709e5e753046fccb45c36410be1979cb6a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558357
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-13 09:56:54 +00:00
skia-autoroll
07e65f9cb2 Roll ANGLE from c525ccf7de83 to a2f64b81dc2b (5 revisions)
c525ccf7de..a2f64b81dc

2022-07-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c119749eff1f to 4d09ee266d3c (17 revisions)
2022-07-12 ianelliott@google.com Extra buffer logging/checking on Android Cuttlefish
2022-07-12 syoussefi@chromium.org Vulkan: SPIR-V Gen: Apply Flat to gl_ViewID_OVR in FS
2022-07-12 cnorthrop@google.com D3D: Fix compile after CreateTemporaryFile changes
2022-07-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from eb8af3adeed3 to 2b7014d6e622 (496 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 scroggo@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/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: scroggo@google.com
Test: Test: Compiled with "angle_enable_trace = true"
Test: Test: Visual inspection of logcat output
Change-Id: Ia030dd2a122e343b2a0071e7d3c5b87994230260
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558316
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-13 05:52:58 +00:00
skia-autoroll
1ad80ef431 Roll vulkan-deps from a24d59adec8c to 43d1c87aa958 (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/a24d59adec8c..43d1c87aa958

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 69e1deabc1cd to faa8d6a6539d

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC scroggo@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: scroggo@google.com
Change-Id: I503c9ea3d36f467d547d53741fde826d1e72cb8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558216
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-12 21:15:23 +00:00
Greg Daniel
79ce404aef [Graphite] CommandBuffer no longer derives from DrawDispatcher.
With the removal of CommandBufferTest this is no longer needed.

Bug: skia:13357
Change-Id: Id7d4afadf5559f651cac14bcdc5f30f91e065443
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555078
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-07-12 20:10:28 +00:00
Brian Osman
1167a800ca Suppress divide-by-zero error in PathOps' AlmostDequalUlps
Comment explains the rationale - even in the presence of divide by zero,
we will produce the correct answer.

Bug: oss-fuzz:48607
Change-Id: I2a2ebe5ecdd8eefa76b3b3d93d3065c38e4dc750
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/558076
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-07-12 19:46:08 +00:00
John Stiles
1dcd118f9d Only include Graphite module data when SK_GRAPHITE_ENABLED is on.
This should save a few kilobytes of space for our non-Graphite clients.

Change-Id: I1528450963c77329e37451ef935a6ffd80999cfa
Bug: chromium:1343014
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557902
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-07-12 19:35:09 +00:00
John Stiles
8b2633215e Update single-child RuntimeShader to use string_view.
This change has the potential to break existing clients if they pass
nullptr as the childShaderName, which used to be supported. To fix
this breakage, pass the empty string instead of null.

Change-Id: I984ec0e12be5bb0a82ec5b719fec48ee7d577dc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557898
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-07-12 18:59:43 +00:00
John Stiles
c752f8490e Mark precompiled data as constexpr.
This will move it to the .rodata section.

Change-Id: I5a88cb198180a8e8e02fe506fe716df56034a39c
Bug: chromium:1343014
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557899
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-07-12 18:58:23 +00:00
Robert Phillips
437ae4e6ef Make SkGradientShaderBase.h/.cpp files
This is a straight up mechanical rename and split.

Bug: skia:13438
Change-Id: I860b5d537924e1f872ce502477beefaae1fcb2f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557896
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-07-12 18:30:01 +00:00
Brian Osman
d4ab5dcb83 Simplify UseDestColorAsInput
This was only used in one place, and the input FP was always nullptr. In
that situation, it just returns 'args.fDestColor'. Given that, rename
it, and remove the argument.

Change-Id: I8507f9f93b3010beea87d344c8346aa771b875e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557840
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-07-12 18:12:01 +00:00
Kevin Lubick
372a39c91d [canvaskit] Expose more ImageFilters
Notes to reviewer:
 - modules/canvaskit/npm_build/types/canvaskit-wasm-tests.ts
   is not actual test code that is executed. It is parsed with
   our types (index.d.ts) only, as a way to make sure the
   declared types match up with how one would write code.
 - MakeDisplacementMap looked a bit strange when I tried to
   use it. It might be easiest to debug if we land as is,
   so we can use jsfiddle to test dynamic parameters.
 - modules/canvaskit/package-lock.json was updated by running
   npm audit fix.
 - There are two copies of the test cases, one for the old
   way, and one for Bazel. Getting Bazel on the CI is currently
   blocked (http://review.skia.org/547576)
 - I am adding all the image filters in by default for now,
   we can measure code size and adjust them if needed later.

Change-Id: I2f4eae71de7ee5d53f0c74147d0662f156522d18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555596
Owners-Override: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-07-12 17:36:52 +00:00
Kevin Lubick
71c19d9ed1 [canvaskit] Upgrade minimum TS version (for types) to 4.4
PredefinedColorSpace was not available before then.

To upgrade the package-lock.json, I deleted the node_modules
folder in npm_build and the existing package-lock.json,
then ran `npm install` (using npm 7.20.6, along with node
14.15.0).

There was still an issue with the order of types in
the type union for readPixels. Apparently, TS changed
this slightly in a version upgrade. To address this,
I added an "or" to that type assertion, along with
a comment.

I double-checked the necessity of reference types="@webgpu/types"
and this is needed to use things like GPUTexture and
GPUDevice.

Change-Id: I7044ae562c155ad4405dbc0e3d647601014fefdc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557738
Reviewed-by: Arman Uguray <armansito@google.com>
2022-07-12 17:36:52 +00:00
Arman Uguray
33067317b7 Update emsdk to version 3.1.15
Bug: skia:13476
Change-Id: I6b4be10b48ee1b69f0c5dc6e4ebc0901ca11e053
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555656
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-07-12 17:30:43 +00:00
Herb Derby
a09751f240 Move StrikeForGPU to text/gpu
Change-Id: I2dbb064523a896f4cac0d2545fc98676a7c6eb3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557384
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-07-12 17:27:49 +00:00
John Stiles
c5c0043a74 Update SkRuntimeEffect::Child to use string_view names.
Change-Id: I294453bb18b9ecd46a84cdfaac831679437a4fe2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557589
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-07-12 16:30:58 +00:00
Benoît Lizé
916351bd6e [core] Allow SkArenaAlloc to query malloc() for usable size
When allocating memory with malloc(), allocators can provide a larger
size than requested. SkArenaAlloc tries to guess what jemalloc would
return, and align its allocation requests on the to-be-provided
size. Some platforms (e.g. glibc or bionic with malloc_usable_size(),
macOS with malloc_size()) can provide the actual value.

This CL adds support to skia's malloc() wrappers to get this data, and
to SkArenaAlloc to use it. Note that as is, this is a no-op in skia
proper. Indeed, clients can (and do, for instance Chromium does)
override sk_malloc() (and friends), so Skia cannot assume that
sk_malloc() memory comes from malloc().

To implement this, a client needs to override sk_malloc_usable_size() to
return the actual value.

Bug: chromium:1335342
Change-Id: Id8ea177e9adccc9c4446fe379b6f05e726ea07ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549516
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2022-07-12 16:08:14 +00:00
John Stiles
955b73beec Convert SkRuntimeEffect::Uniform to use string_view.
Change-Id: I07c0cb63286cb2c74853a49a44a9ee5ae7b994c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557102
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-07-12 16:07:08 +00:00
Jim Van Verth
d0066ba138 [graphite] Add support for shader varyings
Bug: skia:13118
Change-Id: I94131b9d05f73445def32d9e880a6048a23de74d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557585
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-07-12 15:48:51 +00:00
Brian Osman
d9f2c12ec1 Fail gracefully when drawing ES3 effects on CPU or ES2 GPU
Includes a unit test that we handle ES3 effects correctly
on all devices.

Bug: skia:11209
Change-Id: Ib99bc91b0d1f09dc523db5cbea78613fc1e63b04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550702
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-07-12 14:36:02 +00:00
John Stiles
1f617a6716 Replace enforceES2Restrictions with a max-version setting.
SkSL versioning was originally based on a binary "strict ES2" versus
"everything else" split, but now we have an SkSL::Version enum which
gives us more fine-grained control.

Change-Id: Ic7e26381cc3c4c1868bd6ee48d4f44d704dae119
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557378
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-07-12 14:25:21 +00:00
Ian Prest
94e34f7a1b Add a way to get 'active' props from SkCanvas
This CL adds two new APIs to SkCanvas: getBaseProps, and getTopProps.

SkCavas::getBaseProps is functionally identical to getProps, but returns
the SkSurfaceProps by value, rather than via an 'out' parameter.
SkCanvas::getProps is now considered deprecated.

SkCanvas::getTopProps returns the 'currently active' SkSurfaceProps,
i.e., it returns the props from the "top device".  This is useful
because the SkSurfaceProps can change when creating new layers.

Bug: skia:13483
Change-Id: Ia1d9a10ffdd929427f1f2c0a7c4ba6965d4bd3c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554736
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Ian Prest <iapres@microsoft.com>
2022-07-12 13:52:36 +00:00
Robert Phillips
72a08f4b8a Repackage gradient utilities for increased encapsulation
As we fully encapsulate the gradient derived classes they are going to
need access to their shared utilities.

I will follow up w/ a CL splitting SkGradientShaderBase out into its
own header and .cpp file.

Bug: skia:13438
Change-Id: I305e06ab3b3dfac384bc1151a58906f6a3c0c496
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557637
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-07-12 13:26:44 +00:00
Aaron Krajeski
6f7b78e5f4 SkBitmap::erase(SkColor4f c, const SkIRect& area) was never implemented
Its defined in the header file though.

Bug: skia:13329
Change-Id: I5f9551aea269af1295c8c04433f813e8ff2fcec5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557737
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-07-12 13:13:20 +00:00
Kevin Lubick
f54445e937 [gardener] Update docs for triaging oss-fuzz bugs
Change-Id: I8b5a01795f6f13e3e72d3e9eca6a1c65abeadc74
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557396
Commit-Queue: Heather Miller <hcm@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
2022-07-12 11:04:12 +00:00
skia-autoroll
768043eb0d Roll vulkan-deps from d3342011562e to a24d59adec8c (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/d3342011562e..a24d59adec8c

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC scroggo@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: scroggo@google.com
Change-Id: Ic149d1905d4c17b3006456f0b0aee406865c190a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557466
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-12 08:30:53 +00:00
skia-autoroll
56540e5e01 Roll ANGLE from adcc645392e2 to c525ccf7de83 (5 revisions)
adcc645392..c525ccf7de

2022-07-12 syoussefi@chromium.org Vulkan: SPIR-V Gen: Apply Flat to int inputs in FS
2022-07-11 gman@chromium.org Add Metal to the perf tests
2022-07-11 lexa.knyazev@gmail.com Caps: Check if ANGLE_texture_multisample is enabled
2022-07-11 lexa.knyazev@gmail.com Metal: Skip invalidation of emulated formats
2022-07-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 14abb4e33fdf to eb8af3adeed3 (542 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 scroggo@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/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: scroggo@google.com
Change-Id: I46300ac1ab7bcb1c40178acd4daf257e38721aac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557463
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-12 05:50:58 +00:00
John Stiles
a33befc610 Update SkWriteBuffer::writeString to take a string_view.
This will work fine with existing call sites passing a const char*,
and unlocks the ability for passing string_views when we don't have
null-terminated text handy.

Change-Id: I4e69b1cbccceba19bc77d70a48c6fc9dff8ba87e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557587
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-07-11 21:38:43 +00:00
John Stiles
467762b90f Add fetch-sk to documentation.
Change-Id: I5bda64c41119222a144b085910a0127f2e16a65d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557588
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-07-11 21:32:53 +00:00
John Stiles
8161b4e12a Pass labels into KeyBuilder as string_view.
This will let us pass in string_views as labels even if they aren't
zero-terminated.

Change-Id: Iee941528e041531d5d63a05d760d1c77e9c7769d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557099
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-07-11 21:31:52 +00:00
John Stiles
5186379e5e Disallow function calls to main().
In practice, calls to main are not meaningful:
- If main is called in live code, it's recursive
- If main is called in dead code, it's eliminated

However, if optimization/dead-stripping is turned off, the dead-code
case emits bad code in our GLSL/Metal backends. Rather than add a
special case to the backends to work around an error in a meaningless
edge case, we now reject the function call entirely.

Prototyping main() is, as far as I can tell, harmless, so this
continues to be allowed.

Change-Id: I69916840c06810cd948bd74ff168ada1c4fc74f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557578
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-07-11 20:55:12 +00:00
Greg Daniel
a4aa32d24f In GLES always use HALF_FLOAT_OES with LUMINANCE.
In GLES 3.0+ even though HALF_FLOAT is a valid type it is not listed as
a valid type combination with LUMINANCE. Thus we need to still use the
type from the extension HALF_FLOAT_OES in combination with LUMINANCE.

Bug: b/238170249
Change-Id: I2adba67fa98a8adac0345f0af9783e299674f9c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557580
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-07-11 20:20:57 +00:00
Herb Derby
5310228f27 remove SkStrikeForGPU from SkScalerContext; fix IWYU problems.
Change-Id: I7f274c039ed943701b95af9f677ecc14f4319678
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557583
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-07-11 19:58:20 +00:00
skia-autoroll
817df3e9f3 Roll vulkan-deps from 2cd215e4b5c5 to d3342011562e (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/2cd215e4b5c5..d3342011562e

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC scroggo@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

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/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: scroggo@google.com
Change-Id: I8aee8d4d770ccacdaf1f2ed640f4d60fa14af999
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557462
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-11 19:52:00 +00:00
Herb Derby
6aa1170c10 Consolidate glyph attributes in SkGlyphDigest
SkGlyphDigest encompasses glyph attributes used early in the
text drawing stack. This is a newer class, so move functions and
constants  to  SkGlyphDigest that were historically misplaced.

Change-Id: Iec20c9a96fd7f4adf560f0c385dfd90abf13f009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557579
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-07-11 19:30:12 +00:00
Jim Van Verth
4e085a7ab0 [metal] Add label support
Bug: skia:13446
Change-Id: If1cb6a27858cfcee10439c70cdac2e66761e05a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557392
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-07-11 18:01:48 +00:00
John Stiles
090b06557d Emit runtime shader SkSL code into Graphite programs.
Many runtime shaders are now able to render something in Graphite.
Child effects are not supported, so effects which rely on these will
not work properly.

Change-Id: I19190161b641420be3b813a518b80ebbb5f6b500
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557097
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-07-11 16:49:07 +00:00
Robert Phillips
fc49c18ca2 Better encapsulate Blend, Color and Empty shaders
Bug: skia:13438
Change-Id: Id1b7e6759144820f200040616deb3a120d809765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554405
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-07-11 16:37:52 +00:00
John Stiles
a43654ec7e Replace addRuntimeEffectDictionary with constructor argument.
Change-Id: I695a76d5b0aad2ffcf8c1e074c465ed3f60016e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557058
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-07-11 16:32:40 +00:00
John Stiles
34e9334877 Pass runtime-effect dictionary to GenerateRuntimeShaderGlueCode.
At long last, we can retrieve our SkRuntimeEffect from within the
Graphite glue code. In this CL, we simply assert that it can be found
in the dictionary.

Change-Id: I43e8296a0138b6dddae78fd4fbc80c8f5afa1da5
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556797
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-07-11 16:28:03 +00:00
Michael Ludwig
bde3fb8f37 Manually roll dawn
Change-Id: I2fdbff5c4d58d5eace99abd809b2c9861c629ce4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557356
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2022-07-11 15:45:53 +00:00