Commit Graph

51124 Commits

Author SHA1 Message Date
Kevin Lubick
54c1b3dd43 [canvaskit] Remove Sk from nearly all function/type names.
This is a massive breaking change for all existing users of CanvasKit.

It will be (one of the only) changes in 0.19.0 to make the transition
easier.

Suggested reviewing order:
 - index.d.ts (to see type changes). Notice SkPicture still has Sk
   prefix, but no other types do (this felt "right" since Sk is
   part of the name of the type, but I can be swayed on this).
 - canvaskit-wasm-tests.ts
 - tests/*.spec.js
 - interface.js and helper.js
 - html examples
 - markdown files

Change-Id: I3b3d3815df2078f986893df3c70101d6248c117d
Docs-Preview: https://skia.org/?cl=322617
Bug: skia:10717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322617
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-07 21:01:32 +00:00
Michael Ludwig
99afada1ca Use SkIRect for desired output in skif::getInputBounds
In practice, callers of getInputBounds already have an output pixel
region they need covered by the image filter, so DeviceSpace<SkIRect>
is more appropriate than DeviceSpace<SkRect>

Change-Id: Ica062b59257966d12240201b7d942cbaed56adb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323598
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-07 20:38:12 +00:00
Sylvain Defresne
8d921a16f8 build: Remove no-op calls to set_sources_assignment_filter
Chromiun no longer use set_sources_assignment_filter() anywhere in the
build, so these are no longer needed.

Bug: chromium:1018739
Change-Id: I0e460922947430ed357838ff4196516d19c382a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323636
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-07 19:43:32 +00:00
Greg Daniel
8ade5e8aa6 Remove special handling of stencil formats and just use GrBackendFormts.
Before this change each backend had its own special stencil format
struct that contained information like the actual format, stencil bits,
etc. This change removes all of that and instead reliess on static
helper functions that can return all this information based on the
backend format.

Besides being cleaner, this change helps move towards being able to
combine all surface attachment classes into a unified class.

Bug: skia:10727
Change-Id: I26003e44f55ce32293e9092bafce5baef6f938d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322958
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-07 19:33:34 +00:00
Greg Daniel
a7f69c2906 Add stencil formats to all the backends.
Currently there is nothing using these formats, but this change just adds
them along with a quaries about their properties. They will be used in a
follow up change.

Bug: skia:10727
Change-Id: Iaaf13baf372799d47c65bd974fd204a32be57617
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322622
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-07 17:58:31 +00:00
Brian Osman
c021360a88 Only include one variable per declaration statement
This removes VarDeclarationsStatement entirely. VarDeclaration instances
appear directly as statements in Programs. SkSL that declares multiple
variables in a single declaration is transformed to represent that as a
series of VarDeclaration statements.

Similarly, global variable declarations are represented by
GlobalVarDeclaration program elements, one per variable.

Bug: skia:10806
Change-Id: Idd8a2d971a8217733ed57f0dd2249d62f2f0e9c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323102
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-07 17:27:01 +00:00
John Stiles
f41762a5da Remove accidentally repeated bit-index expression.
Also, remove unused #include of SkBitSet.

Change-Id: Ib1b903f78e835a75c8ba88ac35bfa270df7bc0e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322681
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-07 17:20:01 +00:00
Mike Klein
989f5bfb8f refactor HashAndEncode
Encode as PNG to an SkWStream instead of a path.
It's just as natural at the call sites, if not more so,
and is more flexible for environments without a filesystem.

While here, tweak the method names and add some comments.

Change-Id: I8ce9869471fc7e1a0955d51ecb621e76c2e1d4d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323509
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-07 16:13:13 +00:00
Robert Phillips
b1807129a6 Centralize CreateLazyView helper in GrThreadSafeUniquelyKeyedProxyViewCache
We'll also be needing this helper for HW-generated blur mask caching

Bug: 1108408
Change-Id: I60d91ae8864239f0cf68830d0a5b4266d27545d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323109
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-07 15:09:20 +00:00
Michael Ludwig
6c2f976a10 Update AutoLayerForImageFilter to use SkTCopyOnFirstWrite
Change-Id: Id3ee43fb72408f5bd0287f8b57b4a83109109aae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321778
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-07 15:02:10 +00:00
John Stiles
bb2e070d2e Rename ChunkBits to kChunkBits.
go/skiastyle: "Variables declared constexpr or const, and whose value is
fixed for the duration of the program, are named with a leading "k" and
then camel-capped."

Change-Id: Id9cf292a923d6b4db760975ffb7bc1a04c516e87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322440
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-07 14:55:00 +00:00
Jim Van Verth
8ffd4d750f Revert "Add a 2d cross product intrinsic to sksl"
This reverts commit 57c37ad0e4.

Reason for revert: Breaking the Mali400 bots.

Original change's description:
> Add a 2d cross product intrinsic to sksl
>
> Change-Id: Iebaf4616665547d6ca4900e1247d5b68e0f3512a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321790
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com,csmartdalton@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I3e1aa251e883e3d2a1170b0fc6cdc84ea06e784a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323556
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-07 14:35:51 +00:00
Robert Phillips
6e17ffe829 Add customData capability to the thread-safe proxy cache ...
and begin using it for cached SW-generated blur masks.

This is needed to begin mixing and matching HW & SW-generated blur
masks since they have different draw-rects.

It will also be useful if/when we add support for triangulated paths
to the thread-safe cache.

Bug: 1108408
Change-Id: I085ad1127dc2deb98b35d704b06e50b27c72fd1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322657
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-07 14:18:00 +00:00
John Stiles
8354e9b8f6 Fix data() method and add unit test.
I wrote code that called SkAutoTArray::data() and discovered that it
was broken, but not generating compile errors because it's part of a
template and never instantiated anywhere else. I fixed the
implementation and added it to our container unit test to prevent later
regression. This revealed another issue, that "containers in
SkTemplates.h [should] all have a consistent api", according to
test_container_apis. However, data() was never added to the non-array
container APIs. So I added data() to the other containers as well.

Change-Id: I52532c91fdab3fc8c4539053ba8420815b7b0ee5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323276
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-07 13:46:50 +00:00
Kevin Lubick
df47abcbb9 [canvaskit] Add make rule to check types
I don't think we need the extra bin folder; we should be
able to declare our types all in index.d.ts.

This also checks in the package-lock.json, now that we
have devDependencies to run those type checks.

`make typecheck` runs the typecheck tests.

The tsconfig.json and tslint.json were created following
the instructions at https://github.com/microsoft/dtslint
and using the DefinitelyTyped rules.

Bug: skia:10717
Change-Id: I7f943e9cfa264496e0d8932018ab1749702ab2c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322957
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-07 11:53:59 +00:00
Chris Dalton
57c37ad0e4 Add a 2d cross product intrinsic to sksl
Change-Id: Iebaf4616665547d6ca4900e1247d5b68e0f3512a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321790
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-07 08:38:59 +00:00
skia-autoroll
439af79f26 Roll SwiftShader from afe6ca45b6da to 635de036d766 (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/afe6ca45b6da..635de036d766

2020-10-06 srisser@google.com Replace WARN with a LOG_TRAP
2020-10-06 srisser@google.com Reflect VK_KHR_create_renderpass2 being core
2020-10-06 zzyiwei@google.com Update Vulkan headers to version 1.2.156

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC jvanverth@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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jvanverth@google.com
Change-Id: I818260981a3162fdc432720dec6e3bed8148c694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323206
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-07 04:55:38 +00:00
skia-autoroll
c90e776661 Roll ANGLE from 77e3d0ae97b6 to 3df629c55d89 (20 revisions)
77e3d0ae97..3df629c55d

2020-10-06 ynovikov@chromium.org Fix a crash in FormatStringIntoVector
2020-10-06 lexa.knyazev@gmail.com Vulkan: Implement OES_draw_buffers_indexed
2020-10-06 jmadill@chromium.org Capture/Replay: Don't capture deleted shaders.
2020-10-06 jmadill@chromium.org Test Utils: Read available stream data on posix.
2020-10-06 courtneygo@google.com Vulkan: Move CommandBatch for threading support
2020-10-06 jmadill@chromium.org Capture/Replay: Complete RasterizerState capture.
2020-10-06 jmadill@chromium.org Add a --no-finish option to the perf tests.
2020-10-06 jmadill@chromium.org Capture/Replay: Fix temp shader ID.
2020-10-06 m.maiya@samsung.com Vulkan: Add OES_sample_shading extension support
2020-10-06 jmadill@chromium.org Perf Tests: Run at least 1 step.
2020-10-06 ianelliott@google.com Vulkan: Plumb OpenGL ES commands to AGI/debuggers
2020-10-06 lexa.knyazev@gmail.com Add BlendIntegerTest.MRT
2020-10-06 liaoyuke@chromium.org Rename ui/ozone/ozone.gni to build/config/ozone.gni
2020-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from f15133788010 to 63cc22d645ba (4 revisions)
2020-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from b588cd4df419 to c7d7610581df (4 revisions)
2020-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from b3c1e71eb1cb to afe6ca45b6da (4 revisions)
2020-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 7c07085ad1cc to 3610ce9fa2d8 (1 revision)
2020-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 78d150eb2790 to edbb6564c87b (486 revisions)
2020-10-06 ianelliott@google.com Work-around test runner & DebugAnnotator
2020-10-06 jmadill@chromium.org Test Runner: More docs.

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 jvanverth@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: jvanverth@google.com
Test: Test: *debug_negative_coverage*
Change-Id: Iee551de01a1d5f75a2e70e9924115f2a8c501734
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323336
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-07 04:53:28 +00:00
skia-autoroll
3a10ae10dc Roll Chromium from 4259b6b6cb0f to 3c77521707c0 (463 revisions)
4259b6b6cb..3c77521707

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC jvanverth@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:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: jvanverth@google.com
Change-Id: Ife4d55858258078fb3442124230624df0904aae9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323316
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-07 04:49:38 +00:00
skia-autoroll
b81fdbee92 Roll Dawn from 326e14f34bb5 to 7e22b1c44fb0 (6 revisions)
https://dawn.googlesource.com/dawn.git/+log/326e14f34bb5..7e22b1c44fb0

2020-10-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 90ee6c436017 to 488d7a9346ff (2 revisions)
2020-10-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from d3f75ca0e8be to 90ee6c436017 (56 revisions)
2020-10-06 enga@chromium.org Reland "Add a per-thread proc table using thread local storage"
2020-10-06 tandrii@google.com infra: Remove no longer used refs.cfg.
2020-10-06 vadimsh@chromium.org infra: Stop statically enforcing Xcode version.
2020-10-06 enrico.galli@intel.com Add support for depthBias, depthBiasSlope, and depthBiasClamp

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC kainino@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-Debug-Dawn
Bug: None
Tbr: kainino@google.com
Change-Id: I130ec098cfb5e6662bc1b6839148cdac6d97cb6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323205
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-07 04:37:08 +00:00
Mike Klein
56a6120b0f retry³ absl
This merges the two CLs we've been considering,

    1) the first attempt,
       https://skia-review.googlesource.com/c/skia/+/286070;
    2) the roll to latest Abseil LTS branch,
       https://skia-review.googlesource.com/c/skia/+/323076.

(See also the second attempt,
https://skia-review.googlesource.com/c/skia/+/322976.)

We'll need this working in Google3 or punt like we have for Android.

Bug: skia:10165
Cq-Include-Trybots: luci.skia.skia.primary:Canary-G3
Change-Id: Ifb42c1bb2c5e70848208d17b841cdb67bd36e182
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323158
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-07 01:36:15 +00:00
John Stiles
49a547f7e2 Separate out SymbolTable aliases from regular Symbols.
SymbolTable::addAlias can be used to create a Symbol that's an alias for
an existing symbol, but uses a different name. (e.g. in Runtime Effects,
a `fragmentProcessor` is a `shader` and `float4` is also `vec4`.)

SymbolTable::addWithoutOwnership will now assert if an attempt is made
to add a Symbol with the wrong name. In a followup CL, the name argument
will be removed entirely and it will simply use the Symbol's name.

Change-Id: I9aee7717e2600a6d84ebe4c3ab7fca40229faa5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323106
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-06 21:00:04 +00:00
Brian Salomon
107114dd1d Fix debugger bindings after SkSurface::flushAndSubmit change.
Also rm extra space in CK binding.

Change-Id: I3ec50d24cf77ed7773bd0f9c7a6a141221ecd063
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323104
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-06 19:41:31 +00:00
Adlai Holler
0ce2c54094 Reland "Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext""
This reverts commit cf43fc6768.

Reason for revert: Fixed g3

Original change's description:
> Revert "Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext""
>
> This reverts commit ff13ffbeac.
>
> Reason for revert: Blink in g3
>
> Original change's description:
> > Reland "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
> >
> > This reverts commit 89bdc90ac8.
> >
> > Reason for revert: Fix metal
> >
> > Original change's description:
> > > Revert "Take GrContext private, GrDDLContext inherit from GrRecordingContext"
> > >
> > > This reverts commit d2daa94ede.
> > >
> > > Reason for revert: Metaru
> > >
> > > Original change's description:
> > > > Take GrContext private, GrDDLContext inherit from GrRecordingContext
> > > >
> > > > Woo!
> > > >
> > > > Change-Id: I8d201b709343dc18cad31ea740575285dd035f35
> > > > Docs-Preview: https://skia.org/?cl=317436
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317436
> > > > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Adlai Holler <adlai@google.com>
> > >
> > > TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
> > >
> > > Change-Id: I9b58dee285fbdc49ebc8e76df5da0fe224cf9787
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318758
> > > Reviewed-by: Adlai Holler <adlai@google.com>
> > > Commit-Queue: Adlai Holler <adlai@google.com>
> >
> > TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
> >
> >
> > Change-Id: Id4b10795193a904cd4ed8c36e60e74abe3b6702a
> > Docs-Preview: https://skia.org/?cl=318759
> > Cq-Include-Trybots: luci.skia.skia.primary:Build-Mac10.15.5-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-x86_64-Debug-Metal
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/318759
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Adlai Holler <adlai@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
>
> Change-Id: Ib20fe933120d56b72efaec73a0bedec60bc28def
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319184
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com


Change-Id: I4f01291f4b3bfbb8fd7dd8cf2bf8415430c3392e
Docs-Preview: https://skia.org/?cl=322437
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322437
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-10-06 18:59:11 +00:00
John Stiles
88f3b68ec2 Improve error reporting from SkSL include files.
Rather than showing a generic `assert(!fErrorCount)` message, this will
put the actual error message in the IDE error log.

Example: http://screen/7hPTTFronJV3ssb

Change-Id: Ic05f354281275d2aca3e006035b01efae29302e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323098
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>
2020-10-06 18:24:31 +00:00
Mike Klein
3c70f0bf12 Revert "retry retry absl"
This reverts commit 33b42e12ab.

Reason for revert: Google3 roll

Original change's description:
> retry retry absl
>
> Identical to https://skia-review.googlesource.com/c/skia/+/286070.
>
> Bug: skia:10165
> Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-arm-Debug-Chromebook_GLES;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-CPU-AVX2-x86_64-Release-All-TSAN,Build-Debian10-Clang-arm64-Debug-Android_ASAN
> Change-Id: I0ec9d5f6875768e665f444e1ada211d3da537678
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322976
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

TBR=mtklein@google.com,brianosman@google.com,johnstiles@google.com

Change-Id: I4186e85ede18caebfac59b784700e69bf9401901
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10165
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-arm-Debug-Chromebook_GLES;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-CPU-AVX2-x86_64-Release-All-TSAN
Cq-Include-Trybots: Build-Debian10-Clang-arm64-Debug-Android_ASAN
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323156
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-06 17:57:47 +00:00
Herb Derby
bbfc015802 turn on using new for op pools
Change-Id: I308dda52c259e1a23d14395d9a632fe2eafab19f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323016
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-10-06 17:40:51 +00:00
Mike Klein
33b42e12ab retry retry absl
Identical to https://skia-review.googlesource.com/c/skia/+/286070.

Bug: skia:10165
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-arm-Debug-Chromebook_GLES;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-CPU-AVX2-x86_64-Release-All-TSAN,Build-Debian10-Clang-arm64-Debug-Android_ASAN
Change-Id: I0ec9d5f6875768e665f444e1ada211d3da537678
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322976
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-06 16:52:31 +00:00
Brian Salomon
72c7b98ae3 Start removal of tool usage of SkSurface::MakeFromBackendTextureAsRenderTarget.
Adds a new helper that creates a GrBackendRenderTarget using
GrGpu and then wraps it in a SkSurface. Uses the SkSurface
release proc to delete the BERT using GrGpu.

Upgrades GrGpu::createTestingOnlyBackendRenderTarget to create MSAA
buffers.

Updates many tests/tool to call sites to use the helper instead of
SkSurface::MakeFromBackendTextureAsRenderTarget.

Adds syncToCpu bool to SkSurface:: and GrContext::flushAndSubmit.

Bug: skia:9832

Change-Id: I73a8f0ce09dc6523729af0814464c6b6657fda06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293683
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-06 16:32:11 +00:00
Mike Klein
2e09693964 find cxxabi headers in Android ASAN builds
This fixes includes like <cxxabi.h> in Android ASAN builds.

Bug: skia:10165
Change-Id: Ieeff45b29cd527dd0a60ed21422378f5aa610cc7
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-arm64-Debug-Android_ASAN,Build-Debian10-Clang-arm-Debug-Android_ASAN
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322906
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-06 16:17:41 +00:00
Ben Wagner
59637dd6f9 Add SkTypeface::getPostScriptName.
Bug: skia:10234
Change-Id: Idfa1261e36174a4b4223b8eb62c872448fc58b14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322680
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-06 15:35:06 +00:00
Herb Derby
d6cfe72549 Add flag to switch op allocation to new
Added a flag to switch from using the memory pool to
using new and delete for GrOp allocation.

Just add the following to your gn args.
extra_cflags = [
    "-DGR_OP_ALLOCATE_USE_NEW",
]

Change-Id: Icea4a6df047cff2cd5e50032f0bd4b714a5740d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322625
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-06 15:19:06 +00:00
Brian Salomon
8e5cf44114 SkImage_GpuYUVA doesn't take origin
When flattening we always flatten to kTopLeft.

Rename some origin params to SkImage factories to make it clearer
that they refer to input texture origins.

Only preserve the origin in the variants that immediately flatten
to RGBA as part of contract (make SkImage_Gpu not SkImage_GpuYUVA).

Bug: skia:10632
Change-Id: I0ed9d693758086c4050f983b579d0d77daefc3d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322486
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-06 15:08:35 +00:00
Robert Phillips
c3bdd1c597 Separate mask creation from drawing in draw_shape_with_mask_filter
This starts pulling apart draw_shape_with_mask_filter so we can
share HW-generated blur masks with DDL recording threads.

Change-Id: I2ff3ed8557e979dce342f4dd0156112d47f8a6a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322479
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-06 13:14:27 +00:00
Kevin Lubick
98ce8ae8ea [canvaskit] Update to 0.18.1 (including typescript types/docs).
Bug: skia:10717
Change-Id: I97b03b3ceea6ad0a66c6c2471782c9b7ebf274fa
Docs-Preview: https://skia.org/?cl=322577
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322577
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-06 13:10:21 +00:00
Kevin Lubick
aaa2bbe84c [canvaskit] Add docs/types for Skottie and Particles
This should be it. Caught up with 0.18.0

Change-Id: Ibe846d756601e42e315ab510807abd4bbd9cf30d
Bug: skia:10717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322323
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-06 12:35:36 +00:00
Kevin Lubick
c488fd3d01 [canvaskit] Add docs/types for paragraph
The docs on the C++ side are not complete in some areas, so
these docs are incomplete as well.

Bug: skia:10717
Change-Id: I1cbb559ab5c8b3973686b85f420ccd9752eaa24d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322321
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-06 12:33:46 +00:00
Kevin Lubick
e2c6940c36 [canvaskit] Add docs/types for remaining core functionality
Change-Id: Ib9f1f1eb942e83683af4c4d7b127de90b440c765
Bug: skia:10717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321938
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-06 12:15:08 +00:00
skia-autoroll
00dc0bcb4d Roll ANGLE from 500704812409 to 77e3d0ae97b6 (22 revisions)
5007048124..77e3d0ae97

2020-10-06 cclao@google.com Vulkan: Defer the depthStencil buffer layout change to endRenderPass
2020-10-06 ianelliott@google.com Plumb EntryPoint & Context to DebugAnnotator/EVENT()
2020-10-06 cclao@google.com Vulkan: Add plumbing to render pass when ImageHelper gets deleted
2020-10-06 kainino@chromium.org Revert "Work-around test runner & DebugAnnotator"
2020-10-06 jmadill@chromium.org Change shader compile failures into an info message.
2020-10-06 jmadill@chromium.org Test Runner: Pass dEQP args to child processes.
2020-10-06 jmadill@chromium.org Test Runner: More misc improvements.
2020-10-06 ianelliott@google.com Work-around test runner & DebugAnnotator
2020-10-05 jmadill@chromium.org KHR_debug: Fix off-by-one message length.
2020-10-05 jmadill@chromium.org Suppress failing Mac GL dEQP-GLES3 tests.
2020-10-05 vantablack@google.com Replaced allow_list with files_to_check
2020-10-05 jmadill@chromium.org Improve capture replay tests.
2020-10-05 jmadill@chromium.org Capture/Replay: Don't capture XFB 0 in MEC.
2020-10-05 jmadill@chromium.org Suppress failing Mac GL dEQP tests.
2020-10-05 cnorthrop@google.com Tests: Update two traces, remove one
2020-10-05 jmadill@chromium.org Capture/Replay: Split very large replay function.
2020-10-05 jmadill@chromium.org Capture/Replay: Generalize function splitting.
2020-10-05 cnorthrop@google.com FrameCapture: More fixes for app updates
2020-10-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 375fee944c76 to b3c1e71eb1cb (2 revisions)
2020-10-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from d91afd8de27a to f15133788010 (3 revisions)
2020-10-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from e1ba543c6789 to 94ff600cc862 (1 revision)
2020-10-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 7b91afe96128 to 78d150eb2790 (541 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 jvanverth@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: jvanverth@google.com
Test: Test: Temple Run on multiple systemsTest: Test: angle_perftests --gtest_filter="*Trace*"
Change-Id: I52840f2b8bf38b5f5d1477550fafc7f341c13988
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322705
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-06 04:53:07 +00:00
skia-autoroll
99aa6bc744 Roll SwiftShader from b3c1e71eb1cb to afe6ca45b6da (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b3c1e71eb1cb..afe6ca45b6da

2020-10-05 bclayton@google.com Merge changes I48e99f11,I1a914ff6
2020-10-05 capn@google.com Regres: limit the number of GL tests opening X connections
2020-10-05 bclayton@google.com CMake: Add flag for controlling the logging level
2020-10-05 bclayton@google.com third_party/cppdap: Roll forward to 1fd23dda

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC jvanverth@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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jvanverth@google.com
Change-Id: I43a5de0e556b74dc2e8e9030aa67258c15d8678e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322704
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-06 04:53:07 +00:00
skia-autoroll
ddcf46bdfb Roll Chromium from 2cd17d78c985 to 4259b6b6cb0f (463 revisions)
2cd17d78c9..4259b6b6cb

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC jvanverth@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:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: jvanverth@google.com
Change-Id: I806e033a2dac41cb4bd3c619ac1807e1a9ca28a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322703
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-06 04:43:16 +00:00
skia-autoroll
fa5ff7d234 Roll Dawn from ed3a93f690de to 326e14f34bb5 (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/ed3a93f690de..326e14f34bb5

2020-10-05 kainino@chromium.org Revert "Add a per-thread proc table using thread local storage"
2020-10-05 enga@chromium.org Add a per-thread proc table using thread local storage
2020-10-05 cwallez@chromium.org wire::client: Make Buffer::MapAsync surface server-side errors.

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC kainino@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-Debug-Dawn
Bug: None
Tbr: kainino@google.com
Change-Id: I2328783fc77a409a60633fe0bd8f383079b28fe5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322756
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-06 04:39:57 +00:00
Brian Osman
347e5dc371 In VarDeclarations, align constructor parameter type with storage
This moves the type juggling to the callers, but means that we don't
have to allocate a second vector in the constructor and copy things
over.

Change-Id: If017a7d6fe4eaa678679b1506f6c0c241d72a381
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322626
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-06 02:17:56 +00:00
Kevin Lubick
05162812fd [canvaskit] remove accidentally included API
Change-Id: I4c1117b6e6309b1165588702526a2e2327ac1b66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322492
Reviewed-by: Harry Terkelsen <het@google.com>
2020-10-06 00:55:04 +00:00
Brian Osman
41d906752d Allow use of SkTHash* in skslc
hash_fn was the only missing piece. I tried to avoid the duplicated code
(eg, by compiling SkOpts.cpp in skslc), but that triggers a chain of
dependencies that was hard to break. (SkColor, SkImageInfo, ...).

Change-Id: Iddf4291b4038c95930ef512328a0e9e67efe3944
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322493
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-05 21:34:26 +00:00
John Stiles
765c9d3a9c Update message on SkBitSet static assertion.
Change-Id: I4d71b1cab2812b43de61cf066568e15c05f9dc24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322439
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-05 20:56:16 +00:00
Michael Ludwig
d30e9efdab Use preservesAxisAlignment instead of scaleTranslate for clip simplification
This lets more matrix types pre-convert rects and rrects to device space.
Since the clip geometry isn't itself shaded, we can apply the matrix
without worrying about preserving local vs. device coordinates.

Bug: skia:10730
Change-Id: I61ae3e13eec66f0e5eb83a6504dcb8004620b151
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320222
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-05 20:43:20 +00:00
Ethan Nicholas
0dec9927af moved SkSL FunctionCall data into IRNode
Change-Id: Iefa82eccbba518cbd741b4415ea6340c66eabd9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321465
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-05 20:41:26 +00:00
John Stiles
7a7bec371a Capitalize static class methods.
go/skiastyle: "Externed functions or static class functions are camel-
capped with an initial cap."

Change-Id: Id86de2b8477eaee2319effad7319061982e78957
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322476
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-05 19:42:08 +00:00
Ethan Nicholas
31acd98b2d fixed Google3 build failure
We had an #ifdef DEBUG (rather than the intended SK_DEBUG) which was
never actually compiled due to DEBUG not being defined. Apparently G3
defines DEBUG, and this code started failing.

Change-Id: I4c3695440ddae91c90605f742791eabc51b2fe6a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322616
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-05 19:39:58 +00:00