Commit Graph

61278 Commits

Author SHA1 Message Date
Aaron Krajeski
93f5c2b6f0 SkPixmap::getColor4f and SkBitmap::getColor4f
Part of an ongoing effort to move chromium away from SkColor and towards SkColor4f: crbug.com/1308932

Many tests use SkBitmap::getColor to validate pixels, this means that we're now in a state where we draw using float colors but then have to validate the operation with the nearest integer color value. As can be seen in SoftwareRendererTest.SolidColorQuad.

Change-Id: Ic4493e578c8f4066c2439f1e793eef10eb4f4056
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553797
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-06-28 23:54:01 +00:00
Arman Uguray
dd9d54d2c2 [canvaskit] Use WebGPU in npm_build/example.html
Several canvases in the npm_build/example.html demo now use WebGPU if it
is supported by the browser and the CanvasKit build in use.

The examples have been refactored to support both WebGPU and non-WebGPU
mode of usage. Two examples that currently rely on Surface.drawOnce
don't work correctly on WebGPU as the API call may draw to the wrong
swapchain texture ("paths" and "pathperson") and will benefit from a
`WebGPUCanvasContext.drawOnce` function.

Bug: skia:13427
Change-Id: I16dc06a9788cf78e86b2097f44c1f83ca0b2315a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553637
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-06-28 23:05:13 +00:00
Arman Uguray
b1b818896c [canvaskit] Implement WebGPU API methods for surface creation
* The native backend exposes a variant of _MakeGrContext that creates a
  GrDirectContext backed by a Dawn wgpu::Device.
* The native backend currently exposes a single API function,
  "_MakeGPUTextureSurface" which returns a SkSurface from Dawn backend
  render target over a Dawn wgpu::Texture. This function can be used to
  draw to any WebGPU texture, including offscreen textures or to a
  canvas swapchain texture.
* The MakeGPUDeviceContext, MakeGPUCanvasContext, MakeGPUCanvasSurface
  functions are implemented purely in JavaScript.
* The CanvasKit.webgpu property can be used to detect whether WebGPU
  support has been compiled in.

Bug: skia:13427
Change-Id: I953f24ca58389d5989a108685abbc02e56d4e18b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553636
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-06-28 22:53:12 +00:00
John Stiles
2b7f32a725 Add map from code-snippet ID to runtime-effect in Recorder.
This will keep the runtime effect alive and findable until we are ready
to paint it.

Change-Id: If047dfa8be1376a7a2a092211e0cbbdedfd2faf0
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553579
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-06-28 21:13:29 +00:00
Ethan Nicholas
0360b2798b Require compute shader in/out arrays to be unsized
Turns out sized arrays don't work currently; the path of least
resistance is simply disabling them for now. See bug for explanation.

Bug: skia:13471
Change-Id: I90e321ccae199ac5697d1d9a63f73e30554e2981
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553583
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
2022-06-28 20:03:12 +00:00
John Stiles
4db16d754e Remove unchecked_bit_puns.
We are on C++17 now and already use `if constexpr` where necessary.

Change-Id: Icc780b6e4db7ae6ccc648ea333a172f11bf0581c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553584
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-06-28 19:24:19 +00:00
Greg Daniel
8133080b5c [Graphite] Add a ResourceProvider onto the Context.
The Context is going to have to be able to make some Resources when we
insert a recording onto it. Some examples of this will be discardable
MSAA and Stencil attachments that are shared by all Recordings.

Bug: skia:13357
Change-Id: I9d49f640404176d38416372fd208b591b032d599
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553581
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-06-28 19:16:55 +00:00
Greg Daniel
ab286e8531 [Graphite] Add QueueManager Class.
This CL is mostly moving the queue/command buffer systems off of Gpu and
Context and moving them to the QueueManagerClass.

Bug: skia:13357
Change-Id: I0ee5096c84b1210082745fafd2d38791fd9be52e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/549557
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-06-28 19:10:19 +00:00
John Stiles
af348ef4b0 Create SkUniform data in findOrCreateRuntimeEffectSnippet.
Graphite expects uniforms to be passed in as a span of SkUniforms.
When making a runtime effect, we now convert the SkRuntimeEffect's
`Uniform` data into SkUniforms as well.

I briefly looked at sharing a single uniform type, but
SkRuntimeEffect::Uniform is public API, so changing it is non-trivial,
and Uniform would not be usable as a direct replacement for SkUniform.
(Uniform is non-POD since it contains an SkString; SkUniform is POD
and we declare a bunch of them at global scope. Also, each class
represents types using a separate enum.)

Change-Id: Idef2141d3a4860529719382840a157b7b0c41643
Bug: skia:13457
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553595
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-28 18:45:48 +00:00
Herb Derby
7ba8191991 Refix perspective for glyph drawing of last resort
This is a redo of:
https://skia-review.googlesource.com/c/skia/+/553593

Turns out the getMaxScale returns -1 when given a perspective matrix.
Seems like the best guess for a perspective situation is I.

Change-Id: I79ddd5d6b07c39ffd6f50a5e636cea30d7f399ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554076
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2022-06-28 18:36:31 +00:00
Jim Van Verth
2fe648ade9 [graphite] Change Device::drawGeometry() to take a Transform parameter
This will be used for pre-transformed Geometry such as DirectMaskSubRun.

Bug: skia:13118
Change-Id: I82e277acf786931c04a4667b2b93a6ccd8ae90fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/554036
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-28 18:28:13 +00:00
John Stiles
280987977c Split ArenaAlloc test into separate tests with narrower scope.
The tests themselves are the same, just split up into their logical
groupings. http://go/unit-testing-overview#properties

"Focused. Above all, unit tests are narrow in scope, validating the
correctness of individual pieces of code rather than the correctness of
the system as a whole."

Change-Id: I6149536e84763abc98dfe243d4090bb25a555525
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553592
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-28 18:20:57 +00:00
Arman Uguray
4780d97065 [ganesh][dawn] Implement GrDawnBuffer::onRelease
GrDawnBuffer now implements GrGpuBuffer::onRelease in which it unmaps
the underlying wgpu::Buffer if it is mapped to main memory. This has to
be done explicitly to prevent unbounded growth in memory usage of
staging buffers.

Bug: skia:13475
Change-Id: I985cf090b3861b08e13a425dfeae53e01c784d2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553736
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-06-28 17:57:07 +00:00
Kevin Lubick
c7b407553b [bazel] Replace -isystem with -I for copts
MSVC and clang-cl do not recognize -isystem, but do recognize
-I. Thus if those compilers use our rules, we want our copts
to be maximally compatible.

Some of these options didn't seem to do anything, so I removed
them rather than replace them.

Change-Id: I73feb63d5c682a6df646d731b10ca2509e105e6f
Bug: skia:12541, b/237076898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553878
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-28 17:16:42 +00:00
John Stiles
27e5eb1281 Add SkRuntimeEffect flag indicating half-precision uniforms.
Graphite's uniforms (SkUniform) distinguish between "Float" and "Half"
as separate types, so we now preserve this information in a Uniform
flag. We didn't have any tests verifying the behavior of Uniform flags
in SkRuntimeEffect at all, so I added a test here.

Change-Id: If6323ce26eeca2ef7da6c7424ad7350c6a0b7362
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553594
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-06-28 17:11:31 +00:00
Herb Derby
6ef5116f78 Fix perspective for drawing of last resort
I don't know why none of the CQ bots don't run scaledemojiperspective,
but this was not found in the gold for the CL. Because it is
clearly wrong.

Take a best guess at the perspective size calculation by using
the matrix's getMaxScale() to estimate the scaling caused by
the perspective matrix.

Change-Id: I58258b18c0c427b39c56f16c7ee17b8b8d4e4e1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553593
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-28 16:09:55 +00:00
Herb Derby
d8e179fba2 Remove maximum glyph dimension tracking from buffers
Change-Id: I7abba20991482d72ca90b52a92034b9875be4098
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553578
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2022-06-28 15:09:42 +00:00
Herb Derby
0d50d5475e Convert last remaining SkGlyphRunLists
Change-Id: I22a19038f03e39f1944066a5ea049e2dcea5302c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553591
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-06-28 15:06:15 +00:00
Jim Van Verth
2fdd438b01 [graphite] Fix up ClipStack setup for non-Shape Geometries
Bug: skia:13118
Change-Id: I04d47d0cf3e2f6318d289b4f8d41fe9386bb4fad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553876
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-28 14:56:27 +00:00
Herb Derby
b780fc21c3 Replace SK_ARRAY_COUNT with std::size() for skia/tools
Change-Id: I7db855e675b2ece5d3cf6f237beae3294ffa1e72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553589
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-28 14:42:07 +00:00
Herb Derby
e0f153ee85 Remove unused MakeSourceFallback method
Change-Id: Id781d04f9ece7e27365e19c8ba509d28f3f4e186
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553576
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-28 14:23:31 +00:00
Herb Derby
603ff41e73 Simplify calculating the reduced font size for transformed glyphs
I'm switching to this two pass method because it will allow
simplifying the buffer structures in MakeInAlloc routine.
I need to simplify the buffer handling to rewrite the interface
to the SkStrikeForGPU to pass only the information the RemoteStrike
has. This will be many CLs to accomplish.

This seems to give the exact same results as the existing code.

Change-Id: I94a31549cbc1924adb1de44e0438996b902fdca8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552682
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2022-06-28 14:20:52 +00:00
Chris Mumford
86acaa3bca Removed deprecated Bazel clang config references.
The clang_linux and clang_mac Bazel configs were removed in
commit I515c114099d659639a808f74e47d489a68b7af62.

Bug: skia:12541
Change-Id: Ib42764686a19a73164efbcf3d72869574f747b8f
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553590
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Mumford <cmumford@google.com>
2022-06-28 14:18:26 +00:00
John Stiles
908cc8071c Revert "experimental alternative isconvex"
This reverts commit 64284e1482.

Reason for revert: unused code

Original change's description:
> experimental alternative isconvex
>
> Bug: skia:
> Change-Id: I55175a95d37aad9a656cd211fc6c7238bdb7d674
> Reviewed-on: https://skia-review.googlesource.com/c/173361
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

Change-Id: Ib00acfc0964ecfd2fe01689c0d46d0773d5c5258
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553588
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2022-06-28 13:29:31 +00:00
Jorge Betancourt
cdf06973a5 add skottie to android bp
Change-Id: If858b0840d796557b8304933797aa47573a3588f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551895
Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2022-06-28 13:28:37 +00:00
Kevin Lubick
4855152354 [bazel] Add cc_library_with_options
This can let us create versions of skia_public with certain settings
enabled in an easy way (i.e. not requiring clients to set the compile
flags themselves).

Change-Id: I909449c6186f4912ea80dd9d579fcd7cafb4775c
Bug: skia:12541 b/237076898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553377
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-28 13:20:54 +00:00
skia-autoroll
b007c1909b Roll ANGLE from 89e38b5799cc to c775dd498ae4 (9 revisions)
89e38b5799..c775dd498a

2022-06-28 syoussefi@chromium.org Allow list of restricted traces to be overriden in gn args
2022-06-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 8fdbb85c2176 to 1bfae54dd233 (738 revisions)
2022-06-27 chris@rive.app Add a pls test for memoryless storage
2022-06-27 ynovikov@chromium.org Revert "Vulkan: Destroy DescriptorSet cache when it becomes invalid"
2022-06-27 ynovikov@chromium.org Skip CreateFramebufferFetchMidRenderPass on Win SwANGLE
2022-06-27 ynovikov@chromium.org Revert "Vulkan: Support EGL_ANDROID_front_buffer_auto_refresh"
2022-06-27 steven@valvesoftware.com Vulkan: support QCOM_shading_rate on Intel graphics
2022-06-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 7f32e27c6969 to 8fdbb85c2176 (321 revisions)
2022-06-27 ynovikov@chromium.org Skip TextureSampleShadingTest.Basic on Win Intel Vulkan

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 borenet@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: borenet@google.com
Change-Id: Ib9a9523eaae9c3aeada59db1ff1d2b6387c01742
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553756
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-28 05:51:17 +00:00
Herb Derby
c836692f20 Replace SK_ARRAY_COUNT with std::size() for skia/tests
Change-Id: I4f0321dbf5c03adc7219ca2cfb6dbfbbaecc1e4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553582
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-27 21:27:13 +00:00
Herb Derby
cdf338247b Update SkSpan docs and check for bad initializer_list
Change-Id: I539ecd32ecb61d4be6b89c52065f55269937aa32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553580
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-27 21:26:45 +00:00
Florin Malita
fe354d0963 Enable inline/datauri image support for SkottieView
Change-Id: Ic22d65bcaf1ac8ef8d9a6dbd64281cdc6b0f0df8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553540
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-27 19:54:24 +00:00
Michael Ludwig
9d10f64104 Manual dawn roll
Change-Id: Id6efc88e2d048ade8aa2c0e7870c0bc73b1afcf5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553537
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: James Godfrey-Kittle <jamesgk@google.com>
2022-06-27 19:09:52 +00:00
Kevin Lubick
2292a55e38 [bazel] Fix GCS mirror typo
Suffixes already have a . in the beginning. Two dots does not
leave us with a valid URL.

Change-Id: Ia232d1b68a78450da7883e659fa6871b562db20f
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553538
Reviewed-by: John Stiles <johnstiles@google.com>
2022-06-27 17:55:34 +00:00
Robert Phillips
36d67f462f [graphite] New Combination API
Bug: skia:13430
Change-Id: I816c57d0ed8694d21911c449d67c035580dd63d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/548776
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-06-27 17:30:16 +00:00
Jim Van Verth
45a6f2c986 [graphite] Set up ContextOptions for text
Bug: skia:13118
Change-Id: I90aee8cff625ad822fa9d62f803a8badbe51925e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552676
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-06-27 16:57:43 +00:00
Dominik Röttsches
b17a4843ec Pass SkGraphcis::GetVariableColrV1Enabled() to FreeType
In [1] SkGraphics was changed to receive a flag callback from Blink if
variable COLRv1 is enabled. Pass this flag down to the corresponding
FreeType property in order to be able to continuously land changes in
FreeType for COLRv1 until shipping it.

Roll FreeType to current head, to include property addition to FreeType
in [2].

[1] https://skia-review.googlesource.com/c/skia/+/551637
[2] 4b6f92e6b3

Bug: skia:13448
Change-Id: I296ec5c5b4093cb1af0300de7d1eadcc8e740a36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553436
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Dominik Röttsches <drott@google.com>
2022-06-27 16:26:58 +00:00
Kevin Lubick
86678ed625 [bazel] Add option for SkSVGCanvas (and expat third_party DEP)
Our SVG code depends on our XML code which depends on expat.

See also cl/457481999

Change-Id: I83b61f5d73570d0aa7e851a01ccd019b4b1019e4
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553376
Reviewed-by: Florin Malita <fmalita@google.com>
2022-06-27 15:56:55 +00:00
John Stiles
a10e6c1025 Add SkShaderCodeDictionary::findOrCreateRuntimeEffectSnippet.
`findOrCreateRuntimeEffectSnippet` takes a pointer to the runtime effect
and returns a code-snippet ID associated with the runtime effect, with
matching uniform layout, etc. The SkShaderCodeDictionary will maintain a
persistent map from {sksl-hash, uniform set} to code-snippet ID.

http://go/runtime-effects-in-graphite

Change-Id: I9c51667aad96f850184899f3df00a8206a1fe354
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552686
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-06-27 15:27:46 +00:00
Herb Derby
3824e1db80 Create StrikeSpecs for measuring transformed masks
Change-Id: I6c6aed7de0747c4fea720fc4aa8b18ae6ad7327e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552685
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-27 14:54:09 +00:00
Herb Derby
740c4fc930 Find a maximum dimension give a list of SkGlyphIDs
In order to simplify buffer and strike handling eventually,
add a routine that will allow finding the maximum dimension of a
list of glyphs. In a future CL, I will use this to simplify
handling calculating the scale factor needed in the drawing of
last resort.

Change-Id: I8ac47328e1dfe59ea80499a83253bb166172a6b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552684
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2022-06-27 14:48:47 +00:00
Herb Derby
0fc023b05f Factor out common digest code for RemoteStrike
Change-Id: I9a27b52bb0d3f96d296d712fe36a727f8ad5ded4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552683
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-06-27 14:48:41 +00:00
Jim Van Verth
dd8090281a [graphite] Fix up token management for DrawAtlas.
Graphite only needs a single token to manage DrawAtlases, which is
incremented after DrawAtlas uploads are issued.

Bug: skia:13118
Change-Id: I0adbee2870bb30f65ac98adc43e17ff191bf224f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552681
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-06-27 14:39:08 +00:00
Jim Van Verth
a0ca6ed48f [graphite] Hook up SubRun::draw through Device.
Also removes usage of SkMatrixProvider.

Bug: skia:13118
Change-Id: I3f8a90b3de2d3adc5742c72095f33acf2e9080ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544246
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-06-27 14:25:47 +00:00
Kevin Lubick
cc91f7d709 [bazel] Fix toolchains on M1 Mac
These changes are necessary to use the toolchain on both the
M1 Mac and Intel Macs.

This adds a way to detect the host platform and choose different
compile options in the toolchain.

We cannot statically link in libc++.a from the clang zip because
it appears to be x64 only.

Finally, this fixes copts not being passed to objective c libraries.

Known issue:
 - Intel Mac building has an error about the default CC toolchain.

Change-Id: Ie8e5e83dc41513563ac684e70a8a6947b36df445
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552472
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-06-27 14:02:49 +00:00
skia-autoroll
1899c034f3 Roll vulkan-deps from 3da2aaf1f8a5 to 4e6188c82519 (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/3da2aaf1f8a5..4e6188c82519

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 borenet@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: borenet@google.com
Change-Id: I50f73f1d28e4ad76afe9be6219235a225cca6c3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553277
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-27 13:50:45 +00:00
Kevin Lubick
aded74171a [bazel] Add placeholders in skcms
See also http://cl/457044136

Change-Id: I8d6fba210a86da95bb9d39d2d03ed80b2b0f120c
Bug: b/237076898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553017
Reviewed-by: Ravi Mistry <rmistry@google.com>
2022-06-27 13:05:12 +00:00
skia-autoroll
17c186a7b0 Roll ANGLE from 919763526922 to 89e38b5799cc (10 revisions)
9197635269..89e38b5799

2022-06-27 eddiehatfield@google.com Refactor to use ANGLETest vs ANGLETestWithParam
2022-06-25 djg@apple.com Metal: Maintain BufferPool freelist constraint
2022-06-24 eddiehatfield@google.com Miscellaneous C++17 refactoring
2022-06-24 m.maiya@samsung.com Vulkan: Support EGL_ANDROID_front_buffer_auto_refresh
2022-06-24 eddiehatfield@google.com Refactor builtin symbol generation for C++17
2022-06-24 yuxinhu@google.com Do not defer clear if FBO attachment is AHB image
2022-06-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 1765af41ecf5 to 11ad77222bfe (3 revisions)
2022-06-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 19706bf6c7d2 to 7f32e27c6969 (707 revisions)
2022-06-24 syoussefi@chromium.org Translator: Fix validation of struct with same-name struct field
2022-06-24 syoussefi@chromium.org Vulkan: Don't close render pass on framebuffer fetch

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 borenet@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: borenet@google.com
Change-Id: I5ae721ee2e40b860937aac1a0a8f8b9754f160c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553237
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-27 05:53:45 +00:00
skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com
3f9d5dc80a Update SKP version
Automatic commit by the RecreateSKPs bot.

Change-Id: I3b1154f8bf000571d908c5cc3942a6419f6057d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553176
Bot-Commit: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2022-06-26 08:31:42 +00:00
skia-autoroll
d3d4f9c161 Roll vulkan-deps from 23c617d371cb to 3da2aaf1f8a5 (3 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/23c617d371cb..3da2aaf1f8a5

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools from 25b838f3a201 to 4643f73ec79d

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 ethannicholas@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: ethannicholas@google.com
Change-Id: Iccdd201dbfb7f31ca225979b7dd5318f291116c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553156
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-25 09:46:12 +00:00
skia-autoroll
57ce997fcc Roll vulkan-deps from 54dba77e8a94 to 23c617d371cb (5 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/54dba77e8a94..23c617d371cb

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from c4ed5157dc36 to 37d2396cabe5
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools from 6f57b1fa230f to 25b838f3a201

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 ethannicholas@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: ethannicholas@google.com
Change-Id: Ic95ddfd60ba83c45752bc5a528efaeb297e3e600
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552904
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-06-24 21:07:08 +00:00
John Stiles
7844cacdc7 Replace unordered_map with SkTHashMap.
unordered_map is much slower than SkTHashMap in practice, and it is
pretty straightforward in this case to replace.

Change-Id: I6d6bea6fa8c5c1ae6d23dfde05552db651975173
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553016
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-06-24 20:38:50 +00:00