Commit Graph

50212 Commits

Author SHA1 Message Date
Stephen White
5b27846491 Dawn: rewrite of uniform uploads.
Use Queue::WriteBuffer() for uniform uploads instead of the staging
manager. Utilize the fUniformsDirty mechanism in GrUniformDataMangaer
to cache and reuse the most recent BindGroup uploaded.

Doing this required moving bind group creation and setting to
GrDawnProgramDataManager::uploadUniformBuffers(), and passing the
RenderPassEncoder down to setUniformData(). setTextures() was
similarly modified (for symmetry).

Change-Id: I841a0cf710b10d5025ea895d3a109f05d2966639
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309663
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Stephen White <senorblanco@google.com>
2020-08-13 19:43:02 +00:00
Robert Phillips
3b356c5696 Update more example code to GrDirectContext/GrRecordingContext pair
Change-Id: Ic12b8292a09be097e99d2dc912d6d5188e645fbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307299
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-13 19:30:12 +00:00
Mike Klein
9e77f20864 more careful SkColorSpace hash collision detection
The new unit test SkASSERT()s a hash collision at head
(but passes in release builds) and does not SkASSERT()
with this patch to SkColorSpace.cpp.

Bug: chromium:1113865
Change-Id: Ibc05af4145a92bbd15c7d5e06ece9d269bd7a242
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310110
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-13 19:25:32 +00:00
John Stiles
8c91c93dce Refuse to inline SkSL with returns inside breakable constructs.
We do not have a good mechanism to break out of a nested for/while loop
or switch statement. Our inlining approach generates incorrect code in
those cases, and there's no apparent fix, since we don't have a
mechanism for subverting control flow like 'goto'. When we detect this
case, disable inlining for that function.

Change-Id: Ic4180b367a3895806b0cc36872155185138826e1
Bug: skia:10606
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310063
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-08-13 19:10:02 +00:00
Adlai Holler
963241f332 Prohibit gpu to raster in SkSpecialImage
Suspect this pathway isn't used, and we dont want to support it
in a future refactor requiring a GrDirectContext in getROPixels.

Bug: skia:104662
Change-Id: I9492fa7a6b85306d187c2eeab2463f305bd17dd0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309720
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-13 18:27:42 +00:00
Stephen White
61a55b010f Dawn: remove access to deprecated fields in BufferCopyView.
Change-Id: I258565e7652365993671281f4cc196e613483806
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310062
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
2020-08-13 18:26:32 +00:00
Robert Phillips
dc3697036e Handle invalid DDLRecorder case
Prior to this CL, if we failed to create the DDL Recorder's target
proxy while creating the target surface we could create an invalid
DDL.

The specific repro case involved too big of an target proxy but
many other scenarios could result in the same behavior.

Bug: 1105903
Change-Id: I519a072600c168aa590fbe920f4029d08fe29e6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309777
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-13 18:20:12 +00:00
Brian Osman
1d4b92d878 Properly clean up va_list in SkSL::OutputStream
Change-Id: I8856ab94c0f99edbdf75df36edf88d1cb196fc8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310061
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-13 17:27:12 +00:00
Florin Malita
cc01311cfc [skottie] Add audio track support to viewer
Based on SkAudioPlayer, Mac-only for now.

Change-Id: Ic4b0e2814aa341586634cbd270d7afd90e32716b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310056
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-13 17:04:12 +00:00
John Stiles
36374400b5 Add missing static qualifier to enforce internal linkage.
Change-Id: I1b387146aee612d9ffcb5aa15536f08a04cadf67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310060
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-08-13 16:54:32 +00:00
John Stiles
49a5a189d4 Add missing IR headers to the .gn file.
Change-Id: I7ba287b5d8e34571b5ca3e502413b2aafa27acc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310059
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-08-13 16:54:12 +00:00
Ben Wagner
a530e0802f Better abort in SkBitmap::allocPixels
Since the Skia SK_ABORT logging has been improved, it is noted that the
majority of release asserts are originating in SkBitmap::allocPixels. In
many of these cases there appears to be plenty of free memory reported
at the time of the assert. Log a bit more information in the assert
message to get an idea about why this is happening.

In a future CL it may be worth structuring this so that the out of
memory condition is distinguished from other possible failure modes so
that it can be marked as an out of memory condition in crash reporting.
It may be possible that the system still has memory available but it
unwilling to allocate it.

Change-Id: Ib2ed92e869000a3713556e17675c53245629a233
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309884
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-08-13 15:58:11 +00:00
John Stiles
af36652766 Move non-gencode onDumpInfo methods to private section.
`onXxxxx` methods in Skia are generally intended to be non-public.

Change-Id: I26b6bdcee653f41a22c91f79d01b20a274210747
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309981
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-13 15:34:21 +00:00
Leon Scroggins III
326b98981e Add platform image encoder for using NDK APIs
Bug: skia:10369

Add SkEncodeImageWithNDK, mirroring the CG and WIC versions, for
encoding with the NDK APIs added to R.

Rename SK_ENABLE_NDK_DECODING to SK_ENABLE_NDK_IMAGES and use it for
both encoding and decoding.

Move code for converting to/from NDK types into a common location.

Update encode_platform.cpp to use NDK encoding APIs when available and
to use both types of webp (lossy and lossless). Add tests specifically
for the new implementation.

Update NdkDecodeTest to use ToolUtils::equal_pixels for comparing
pixels.

Change-Id: Ic62f89af27372ccce90b8e028e01c388a135a68c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308800
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-13 15:21:41 +00:00
Mike Reed
8a8be22597 audio player (for mac)
Change-Id: I491df748d22dfa566000c265a61f62f81755e5a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309792
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-13 15:09:32 +00:00
Mike Klein
984d49667a deserialize SkCanvas::SrcRectConstraint safely
Bug: oss-fuzz:24764
Change-Id: I86b935850158780d5f65be025ffd16f704984806
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309695
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-13 14:56:41 +00:00
Leon Scroggins III
53ff19c852 Remove unnecessary pointer increment
These variables are about to go out of scope anyway, and will be
re-declared with the proper value on the next iteration of the loop.

Change-Id: I2d3cfa1c888057b98125c83854f6af817225d0b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309958
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-13 14:55:01 +00:00
John Stiles
776c2841f8 Move onDumpInfo calls in gencode to the private section.
`onXxxxx` methods in Skia generally appear to be non-public, which I did
not realize until after originally implementing this task.

Followup CLs will update the non-gencode `onDumpInfo` methods to be
private as well.

Change-Id: I807eee132b080f72f6b040e1ca7f687be25dff11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309883
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-13 14:48:51 +00:00
John Stiles
8dd1e22f41 Update GrOp subclasses to use onDumpInfo for info dumping.
This is meant to parallel the changes in http://review.skia.org/309793,
but for GrOps. The base-class info is automatically appended without
subclasses manually calling `append(INHERITED::dumpInfo())`.

Change-Id: Ic815305feeeca07385687af5703f0dd88a008f9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309879
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-13 13:06:59 +00:00
John Stiles
1e0136ecdb Remove more dump-info utility methods when GR_TEST_UTILS is off.
`GrRenderTask::dump` is now enabled by GR_TEST_UTILS, not SK_DEBUG.
`GrOpsTask::dump` is now enabled by GR_TEST_UTILS, not SK_DEBUG.
`GrOp::dumpInfo` no longer exists when GR_TEST_UTILS is off.

Various GrRenderTask subclasses' `name` methods are now enabled by
GR_TEST_UTILS, not SK_DEBUG. (`name` is only referenced by `dump`.)

Note that GR_TEST_UTILS can be enabled with SK_DEBUG turned off, which
makes a lot of these ripple-effect changes unavoidable.

Change-Id: Ie0fafed6f05c7d4083e769cd2f058db9ecc01d5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309882
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-08-13 13:05:09 +00:00
John Stiles
df9ed89229 Fix logic error in GrProcessorSet::dumpProcessors.
I broke this during the refactor, at http://review.skia.org/304857

Change-Id: I9f16acd05fbb3767eed59810a1b1a8a110ce29d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309878
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-13 12:52:19 +00:00
skia-autoroll
fec8e60ea3 Roll ANGLE from d667ad2f0127 to cc958e0e8703 (4 revisions)
d667ad2f01..cc958e0e87

2020-08-12 jmadill@chromium.org Remove D3D9 configs from perf tests.
2020-08-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 8e1380996d6a to 13a65b1aee42 (4 revisions)
2020-08-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from fcfe5a3b19d5 to e930c45863c6 (7 revisions)
2020-08-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 59b4828f293e to 13f04d59c727 (3 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 fmalita@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
Bug: None
Tbr: fmalita@google.com
Change-Id: Id076e22ef39f75172d95efd99f7e0907b15e648d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309867
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-13 05:05:48 +00:00
skia-autoroll
83b9b3d0ef Roll Chromium from 7a75987d261a to ffe842956061 (455 revisions)
7a75987d26..ffe8429560

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 fmalita@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: fmalita@google.com
Change-Id: Id4f51ad9044d492c96bbab789fa96012a0ffd0b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309864
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-13 04:50:48 +00:00
skia-autoroll
246c528e39 Roll SwiftShader from 13f04d59c727 to cda86eff6461 (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/13f04d59c727..cda86eff6461

2020-08-13 capn@google.com Implement shaderStorageImageMultisample support
2020-08-12 sugoi@google.com Fix copying cubemap textures out of bounds
2020-08-12 swiftshader.regress@gmail.com Regres: Update test lists @ 13f04d59
2020-08-12 sugoi@google.com Fix decorations bleeding to following block members

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 fmalita@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: fmalita@google.com
Change-Id: I333a334baf3d01ae6ba8034ba486b715250c6f4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309865
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-13 04:38:19 +00:00
skia-autoroll
025843fad0 Roll dawn from 37f547456cc6 to 4a486be696b4 (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/37f547456cc6..4a486be696b4

2020-08-12 enga@chromium.org Roll third_party/tint/ bc80805c4..5e7ef27ca (9 commits)
2020-08-12 cwallez@chromium.org Update tests to use new mapping APIs
2020-08-12 cwallez@chromium.org Small nits for the implementation of WriteTexture in D3D12

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 cwallez@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: cwallez@google.com
Change-Id: I18ec2bf6a913c91550c78af6ece54658f852faf9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309866
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-13 04:34:09 +00:00
Brian Salomon
652124c372 sk_gpu_test::MakeTextureProxyFromData -> MakeTextureProxyViewFromData
Change-Id: Ie55a147566ef68a64e3b03d8cab701e54dbf1f0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309780
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-12 20:43:41 +00:00
John Stiles
cab588677b Add GrProcessor::onDumpInfo for subclass info dumps.
This CL also marks `GrProcessor::dumpInfo` as final. This prevents a
subclass from mistakenly overriding `dumpInfo` instead of `onDumpInfo`.

`onDumpInfo` is responsible for providing the same data as `dumpInfo`,
except that the FP name is automatically prepended.

Change-Id: I2b44c30a01bc65e9d88321cc21651a94e20074c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309793
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-12 20:20:51 +00:00
John Stiles
8d9bf6467b Reland "Guard dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG."
and
"Guard gencode dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG"
and
"Remove dumpInfo() entirely when GR_TEST_UTILS is off."

This is a reland of 26900788ef
and b5e8a2533a
and d7b09c4c3a
and unit tests are now fixed.

Original change's description:
> Guard dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG.
>
> (One exception: the `dumpInfo` in GrVkCommandPool is wrapped with
> SK_TRACE_MANAGED_RESOURCES to match its peers in GrVkManagedResource.)
>
> Change-Id: I6cf55fa2bb5687f79a2cc0c2a9c02a629bfd4f8e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309556
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Change-Id: I16e6606082a814b4fa5ef58d1096fc915f5ac704
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309721
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-12 19:46:41 +00:00
Brian Osman
e12939f0d8 Unit tests for runtime effect SkSL errors found later in compilation
Forgot to add these when I fixed the bug. Verified that these tests
failed without the fix.

Bug: skia:10593
Change-Id: Ia20fad3cd8e5b0f63ca19946b8314eed49bec2bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309716
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-12 19:40:21 +00:00
Adlai Holler
c95b589112 Reland "Migrate GrSurfaceContext readPixels to take direct context"
This reverts commit cf0d08e149.

Reason for revert: fix codegen

Original change's description:
> Revert "Migrate GrSurfaceContext readPixels to take direct context"
>
> This reverts commit d169e1915c.
>
> Reason for revert: broke chrome via code generator
>
> Original change's description:
> > Migrate GrSurfaceContext readPixels to take direct context
> >
> > After this lands we'll proceed up the stack and add the direct
> > context requirement to the public API and SkImage.
> >
> > Bug: skia:104662
> > Change-Id: I4b2d779a7fcd65eec68e631757821ac8e136ddba
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309044
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,adlai@google.com
>
> Change-Id: I6126f2dca4bc902c903512ac486e22841cc472e5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:104662
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309281
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

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


Bug: skia:104662
Change-Id: If899edab54d031a3619a4bbab90d13738679c037
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309319
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-08-12 19:24:02 +00:00
Brian Osman
5240e18fff SkRuntimeEffect: Handle different main() signatures on CPU
Bug: skia:10603
Change-Id: Ib4d2b36c09c30a9a112f5a2d2d7060c09009671b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309782
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-12 19:21:01 +00:00
Robert Phillips
089b7c96ca Fix bug in op chaining
I created this problem with my fix to crbug.com/1108475

Bug: 1112259

Change-Id: Ieb001fa61bd9ed68dcae43e7d511b4581f16ef0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308638
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-12 19:07:01 +00:00
Mike Klein
9b7f30c7d1 more careful rrect deserialization
These radii are treacherous.
Added a regression test derived from the path found by the fuzzer.

Bug: chromium:1111169
Change-Id: I92fde0c31057ea8adc864336438c0af2869b0374
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309306
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-12 18:39:31 +00:00
Adlai Holler
14dc791bc4 Reland "Migrate SkImage::MakeFromTexture to GrRecordingContext"
This reverts commit 74b83a4ea9.

Reason for revert: Flutter is updated

Original change's description:
> Revert "Migrate SkImage::MakeFromTexture to GrRecordingContext"
> 
> This reverts commit daa9e7455d.
> 
> Reason for revert: Broke Build-Debian9-Clang-arm-Release-Flutter_Android_Docker
> 
> Original change's description:
> > Migrate SkImage::MakeFromTexture to GrRecordingContext
> > 
> > Android migration landed in Android CL 12234077
> > Chrome migration is landing in Chrome CL 2335812
> > 
> > Note: makeFromCompressedTexture is not used by Chrome.
> > 
> > Bug: skia:104662
> > Change-Id: Ibbe6d412cf22e87188926383d10b21f780208e48
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305102
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Auto-Submit: Adlai Holler <adlai@google.com>
> 
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
> 
> Change-Id: I570945521c6cd78dfeea81e492b7e2b31dd0e6f5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:104662
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308505
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:104662
Change-Id: Ie1d7fd9e597e6e6e5bd91bec086e83a8c1f45a37
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309321
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-08-12 18:35:51 +00:00
Mike Klein
ebafbb164b fix a SkRRect::readFromMemory() fuzzer bug
SkRRect::computeType() can fail to produce an isValid() SkRRect,
with the regression test added here.

We can...
   - land something like this that forces a good rect value,
   - drop the assert,
   - or maybe explore deeper and fix this?

Change-Id: I6d7402a0a4af2141ce45e82d287bfb4806aeb0ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309379
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-12 18:31:01 +00:00
Mike Klein
a465e2e308 add SKPath::readFromMemory() fuzzer
just like the rrect one

Change-Id: I35efeefd7ce5088f7769e0583c8364ad0aaf6517
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309712
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-12 17:40:16 +00:00
Robert Phillips
34298650dd Reenable the small path renderer on the DDL1 bots
The DDL3 bots are now using the small path renderer. This updates
the DDL1 bots to match so we can compare apples to apples.

Change-Id: Ib41dfb0cddcb480c2b9c445444c2ceea4a85a4df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309736
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-12 17:14:06 +00:00
Jim Van Verth
ef820beade Switch GN defs on Mac and iOS to use frameworks, take 3
Change-Id: I5b06691d4f0383957b4031b3fd3e96bdfad94521
Cq-Include-Trybots: luci.skia.skia.primary:Canary-Flutter
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309665
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-12 17:03:47 +00:00
Ben Wagner
cc8b690b9e Avoid copy of SkImageInfo in HeapAllocator::allocPixelRef
SkBitmap::info() returns and SkMallocPixelRef::MakeAllocate takes
const SkImageInfo& to avoid making copies. Add the '&' to make it
obvious that a copy is not required here, just the reference.

Change-Id: I972ec92abe86451f34ade2a717c052da7d367f9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309723
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-08-12 16:51:36 +00:00
Brian Osman
de7d927db3 Reland "Add inline threshold to SkSL::Program::Settings"
Keep the same default value, but add a (private) API to change it when
compiling SkRuntimeEffect code.

Use the new API to improve fuzzer coverage, by fuzzing with inlining
disabled and (enthusiastically) enabled.

This reverts commit 3e8fae7193, reworked
to avoid the static initializer.

Change-Id: I7e6cd39d4af2daa4b1be41f1c7d99f32df7a51ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309664
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-12 16:49:46 +00:00
John Stiles
46d175877a Fix AutoDisableInline to avoid re-enabling inlining.
Change-Id: I3d796581ab8bb0f6c1b6932e4469fb006e55e228
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309722
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-08-12 16:45:26 +00:00
Robert Phillips
b3f26441d1 Allow small path renderer usage in DDL recordings
Bug: 1108408
Change-Id: I6b9dca94e820bfb613afc2fa3e547c2ccd182224
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309683
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-12 15:46:16 +00:00
John Stiles
c556d6faf0 Revert "Guard dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG."
This reverts commit 26900788ef.

Reason for revert: tree on fire

Original change's description:
> Guard dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG.
> 
> (One exception: the `dumpInfo` in GrVkCommandPool is wrapped with
> SK_TRACE_MANAGED_RESOURCES to match its peers in GrVkManagedResource.)
> 
> Change-Id: I6cf55fa2bb5687f79a2cc0c2a9c02a629bfd4f8e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309556
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,johnstiles@google.com

Change-Id: Iacc621d186acfe953a31a6ef2a44e65fba422b50
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309719
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-08-12 15:43:16 +00:00
John Stiles
7161df0c0e Revert "Remove dumpInfo() entirely when GR_TEST_UTILS is off."
This reverts commit b5e8a2533a.

Reason for revert: tree on fire

Original change's description:
> Remove dumpInfo() entirely when GR_TEST_UTILS is off.
> 
> Change-Id: Ibb2b4df7788715784236adaf215d5d13e6380672
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309661
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=bsalomon@google.com,johnstiles@google.com

Change-Id: Ica07181c3bd84fb4aba126f350a9676778e4f8c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309718
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-08-12 15:40:27 +00:00
John Stiles
e0709e9256 Revert "Guard gencode dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG."
This reverts commit d7b09c4c3a.

Reason for revert: tree on fire

Original change's description:
> Guard gencode dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG.
> 
> Change-Id: I8d2688b804e18a3a1a440fc1d2fa1631816f3f1b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309667
> Reviewed-by: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

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

Change-Id: Ic0f9285d8397717fe1fd1dacc06c95ef394d0d42
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309717
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-08-12 15:40:09 +00:00
John Stiles
d7b09c4c3a Guard gencode dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG.
Change-Id: I8d2688b804e18a3a1a440fc1d2fa1631816f3f1b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309667
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-12 15:29:58 +00:00
Jorge Betancourt
82ac2ddc00 implement and test basic playback features for SkottieView
Change-Id: I46a673b2070d523cd9952179c56461fa61c4c5b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302036
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-08-12 14:50:28 +00:00
John Stiles
b5e8a2533a Remove dumpInfo() entirely when GR_TEST_UTILS is off.
Change-Id: Ibb2b4df7788715784236adaf215d5d13e6380672
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309661
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-12 14:32:36 +00:00
John Stiles
26900788ef Guard dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG.
(One exception: the `dumpInfo` in GrVkCommandPool is wrapped with
SK_TRACE_MANAGED_RESOURCES to match its peers in GrVkManagedResource.)

Change-Id: I6cf55fa2bb5687f79a2cc0c2a9c02a629bfd4f8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309556
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-12 14:27:36 +00:00
John Stiles
47b4e22303 Reland "Implement dumpInfo for .fp files."
This is a reland of a1df23c8b7

Original change's description:
> Implement `dumpInfo` for .fp files.
>
> Change-Id: I40f6c1a02e194f090e67a0e3f2d7d83cd2317efd
> Bug: skia:8434
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309139
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

Bug: skia:8434
Change-Id: If485635440b800f8a282c871a1c5f2801608d3c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309660
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-08-12 14:26:36 +00:00