Commit Graph

51154 Commits

Author SHA1 Message Date
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
Ethan Nicholas
0d31ed5068 moved SkSL ForStatement data into IRNode
Change-Id: I87039ae982c7f5b6ed7a4cc236470f049606c45e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321468
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-05 19:27:38 +00:00
Ben Wagner
ae4bb98f13 Reland "Remove use of legacy display globals."
This is a reland of c1916c34fe

As it turns out, benches are not always given a canvas.

Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

Change-Id: I61a2ac058fafc99653e3304876cf4b97350dac8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322490
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-05 19:13:58 +00:00
Herb Derby
4c3486e6f1 add pixel xl to skpbench
Change-Id: I931292a74e39eb06715ce3dde6a4662474a23df6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322322
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-10-05 18:34:18 +00:00
Nigel Tao
bf4605ffc3 Have SkWuffsCodec use PIXEL_BLEND__SRC_OVER
This takes the "one pass" code path more often, using less memory, as it
does not have to allocate an intermediate width*height pixel buffer.

Wuffs v0.2 did not support SRC_OVER, only SRC, but Wuffs v0.3 does.

The gif-transparent-index.gif test file comes from the
test/data/artificial directory of the github.com/google/wuffs
repository. It was programmatically generated.

The new GifTest.cpp test passes with skia_use_wuffs true or false, with
or without the SkWuffsCodec.cpp change.

Change-Id: I46fb4c849319fbefc39f331416a8b7d3836093ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320116
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2020-10-05 18:24:48 +00:00
Brian Salomon
f165f799ae Remove unused variant of SkImage::MakeFromYUVAPixmaps
Bug: skia:10632
Change-Id: I337d79d856945071b2b68651a80013184d443267
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322480
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-10-05 18:08:28 +00:00
Ethan Nicholas
e2c4999ec3 Revert "Revert "moved SkSL Field data into IRNode""
This reverts commit 58384ad0a7.

Change-Id: I18fcf623675cd97224f99c048fd691b4799d2479
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322396
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-05 17:29:18 +00:00
John Stiles
e61500059a Use SkBitSet for the work list, instead of a set<int>.
This provides an overall ~5% speedup in sksl_medium and sksl_large.
http://screen/9d992SKbYf7DzhW

Change-Id: Ia006a0b6b9f5d3d4e5b2298c64c491a4e04464c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322436
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-05 17:23:21 +00:00
John Stiles
03aa12b668 Minor improvements to SymbolTable::addWithoutOwnership.
These changes aren't on the critical path, so this doesn't lead to a
measurable speed boost, but this code does a bit less work in the
FunctionDeclaraction/UnresolvedFunction cases, and is flattened out a
bit for easier readability.

Change-Id: I105a1a0b1d02c9ec87f6f874437ddf1a53d9be0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322456
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-05 17:20:59 +00:00
Robert Phillips
52c17c43c7 Pull blur mask key creation into its own subroutine
draw_shape_with_mask_filter needs to be pulled apart and refactored to
support sharing the result of HW-generated blur masks with DDL recording
threads.

Change-Id: I4b03d5f0cbdd0f12e9740889159d9e91d7f8a060
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322397
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-05 17:12:00 +00:00
Brian Salomon
b497568aa8 In GrVkRenderTarget reset sk_sp instead of unref'ing underlying object
Change-Id: I1ee8900abff1d0b6a42f33d02cc37b8cc3946972
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322398
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-10-05 17:08:39 +00:00
Jim Van Verth
bd0881cb58 Revert "Remove use of legacy display globals."
This reverts commit c1916c34fe.

Reason for revert: Bots unhappy

Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=djsollen@google.com,bungeman@google.com,herb@google.com,reed@google.com

Change-Id: I365d2b1d19241a90130bc1b59663651817966f63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322400
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-05 16:34:15 +00:00
Ben Wagner
c1916c34fe Remove use of legacy display globals.
In the ongoing effort to remove the display globals from Skia, allow
their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
in a normal Skia build and remove all use from Skia code.

Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-05 15:53:10 +00:00
Brian Osman
00a8b5bb4f Revert "Revert "Convert sksl_frag.sksl to an IRIntrinsicMap""
This reverts commit 2d403f203b.

Change-Id: Idbcf128f170d17c371221e57ef05a5dc5e306e3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321777
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-05 14:44:14 +00:00
John Stiles
b16b29a9fe Create TinyUnorderedMap class for small-N data storage.
Our code relies on std::unordered_map for storage of unordered data.
Unfortunately, while unordered_map is algorithmically quite efficient,
in many real-world scenarios--particularly with small amounts of data--
a simple vector with linear search runs rings around it.

This CL doubles the performance of `nanobench -m sksl_large`:
http://screen/7uGYGLCaTtaHU4j

Change-Id: Ia2f6cedfac338876c2da57642e9b34addd85b683
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322320
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-05 14:40:14 +00:00
Kevin Lubick
750261f41a [canvaskit] Update npm to 0.18.0
0.18.1 should add docs
0.19.0 should remove Sk prefix

Change-Id: I21ef6e0735186bffc215a5855d3d53f405bde0fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322318
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-05 12:19:56 +00:00
Kevin Lubick
3d00e3a3fc [canvaskit] Flesh out remaining docs for core CanvasKit.
This adds docs or stubs for everything that is on the main CanvasKit
object.

Paragraph, Particles, and Skottie will be their own CLs.

Bug: skia:10717
Change-Id: I0f5027d73b2ac7d127f3a03a8f1aaa15f694ae38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321789
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-05 11:47:40 +00:00
Kevin Lubick
166d633c89 [canvaskit] Add docs/types for Font and related.
Paragraph will be its own CL.

Bug: skia:10717
Change-Id: I5c0d0ff40b500ec8f8eb74e7a44402a9e9548f8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321519
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-05 11:47:23 +00:00
Kevin Lubick
a2535afd56 [canvaskit] Add docs/types for Path
Bug: skia:10717
Change-Id: I6096f69005fa78c3ad7e93082c088c2eb2ddd744
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321467
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-05 11:47:06 +00:00
Kevin Lubick
2fd08e651c [canvaskit] Add docs/types for Paint and Filters/Effects
This also includes matrices (which I'm reminded I want to test with
TypedArrays and make optional).

Bug: skia:10717
Change-Id: I0f6565a46b766c1f81c28dfc1229d403bff32e69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321118
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-05 11:46:38 +00:00
Kevin Lubick
97440de4b9 [canvaskit] Add docs/types for Canvas.
This is the object with the most APIs by far.

Some APIs are stubbed out temporarily and will be given more
detail in a follow-up CL.

Bug: skia:10717
Change-Id: Iff5d4269303e7102ad79de90f20640918f403ff4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320770
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-05 11:46:20 +00:00