Commit Graph

49910 Commits

Author SHA1 Message Date
John Stiles
b61b2bc43b Add LLDB visualization support for sk_sp<>.
Change-Id: Ib783712978bea7fbae5d9e454bc3bd5e198c8504
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306939
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-07-30 20:03:34 +00:00
Brian Osman
958a3bb670 Move paint modulation after color space xform when drawing images
The paint color has already been transformed to the destination color
space, so this prevents a double-transform when doing alpha-image draws.

Bug: skia:10555
Change-Id: I9d026d231199b22d9a67bc92bfe9a615295490b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306855
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-07-30 19:36:20 +00:00
John Stiles
6f65f1a749 Clarify quickstart documentation.
When I joined the team, I had a hard time interpreting some of the
Quickstart steps. If you run them as presented, you get seven different
output directories. I've added some text to explain that you don't
actually need this many, and I've also fixed an anchor link.

I made these edits in http://cider/ for its excellent previewing
capabilities, and Cider automatically reformatted and rewrapped the
Markdown to match google3 standards. (e.g. using # and ## to denote
sections, wrapping code blocks in ```.) This doesn't affect the
generated output.

Change-Id: I118a6ed5f6848c845c102ac1670a5d16e79c71fe
No-Try: true
Docs-Preview: https://skia.org/?cl=306717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306717
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-07-30 19:09:12 +00:00
Brian Salomon
efb5f07a77 Remove virtual SkImage_Base::getPlanes
Change-Id: I5b106455cc54dad600e64b3f1bfcd02f5099b75b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306360
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-07-30 18:33:50 +00:00
John Stiles
e554301263 Enable ClangTidy guard bugprone-argument-comment.
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-argument-comment.html
-----
Checks that argument comments match parameter names.

The check understands argument comments in the form /*parameter_name=*/
that are placed right before the argument.

  void f(bool foo);

  ...

  f(/*bar=*/true);
  // warning: argument name 'bar' in comment does not match parameter
  // name 'foo'

The check tries to detect typos and suggest automated fixes for them.
-----

Change-Id: I76fa82f5338f465b8f9e5a13654195f25a618b35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306848
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-30 18:24:00 +00:00
Mike Klein
4ecc970162 jit load128/store128
Added vpinsrd to make it easy, and fixed a comment on vpinsrb's tests.

Nothing too tricky, just the naive implementations.
The hardest part was getting all the data to the right places.

No diffs!

Change-Id: Ie4c1f1e429abfa75ca80a93d108061287d5ace80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306872
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-07-30 18:16:10 +00:00
Ethan Nicholas
4fadce46b9 Added an assert to catch incorrect SkSL variable references and cleaned
up a few cases where it was being done incorrectly.

Change-Id: I261e3e8c7880aacb87d288a5936762f485526053
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306854
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-07-30 18:08:50 +00:00
John Stiles
8cc118dce8 Fix mislabeled argument comments.
Once the existing cases are fixed, we can enable bugprone-argument-
comment to allow clang-tidy to verify these for us automatically going
forward. (http://review.skia.org/306848)

Change-Id: I5c21b28bcbdebb6b74c2924cc5f19c48446ecb42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306847
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-07-30 17:49:50 +00:00
Brian Osman
de53ba533c Just use paint color as text blob color
Change-Id: I075e5929257f361c9badf0afb26cd8d30b152a20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306851
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-07-30 17:35:30 +00:00
John Stiles
5f2b2d6dc6 Enable ClangTidy guard bugprone-unused-raii.
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-unused-raii.html
-------
Finds temporaries that look like RAII objects.

The canonical example for this is a scoped lock.

{
  scoped_lock(&global_mutex);
  critical_section();
}

The destructor of the scoped_lock is called before the critical_section
is entered, leaving it unprotected.
-------

Change-Id: I40394eb84e7e4ad0564c409ecb52df2ef5af35b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306838
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-07-30 16:17:20 +00:00
John Stiles
f6b3ab2314 Remove unused ephemeral SkPathRef::Editor object.
Change-Id: I4643ba2dbdce47201c96bb08c88b12842c9e0159
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306841
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-07-30 16:08:20 +00:00
Ravi Mistry
ea66251bc3 Delete Android compile bots
Bug: skia:10553
Change-Id: I2fd1d5c309b88b0c9e3ce26392ede9fcd2aa6fba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306853
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2020-07-30 15:59:00 +00:00
John Stiles
da1abd1cae Remove unused Editor object from reverseAddPath.
Change-Id: Id6b09fd68ed3323b1d9f014011351b81fd06c573
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306852
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-30 15:56:20 +00:00
Eric Boren
ceb5549f5c [infra] Remove Win10 GT610 tasks
Bug: chromium:1109705
Change-Id: Ic306ff9a6300e55e841cabde724f192b22be731e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306840
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-07-30 15:16:13 +00:00
Mike Klein
3136789972 refactor large load/stores
This noop refactor ports the lane-immediate idea to the 64-bit loads and
to 128-bit stores, and renames to simple load64, load128, store128.

The store128 part of this change is _slightly_ sneaky in that we pack
the argument pointer index and the lane both into int immz, but there's
plenty of space there: lane needs 1 bit, and the argument pointer index
needs maybe 3 or 4 max.

Change-Id: I3fa01bf31312b8a69c7e287d649470ba15a8ea40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306810
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-07-30 14:40:53 +00:00
Mike Klein
89b3c1f3f8 add simple rgba f32 support
A brief survey showed RGBA F32 is actually used, so might as well
support it in skvm.  This borrows the ideas of the 64-bit pixel formats
for 128-bit pixels, but I got super lazy and only supported exactly RGBA
F32 for now. I left a TODO to generalize swizzles and maybe to allow
32-bit unorms, but I don't intend to do that until needed.

The new instructions are implemented serially in the interpreter,
and I've left JITing these instructions for a follow up as usual.

Compressed all the similarly structured 128-bit loads into load128_32
with a lane argument.

Change-Id: Ie031039cf4189a707add091d25395294f8fca637
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306706
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2020-07-30 14:04:03 +00:00
Brian Osman
9f4d51aaf0 Add sk_sp to Skia.natvis (bypass fPtr)
No-Try: true
Change-Id: I46b416b3353b052a203d133d33cc74c47e66520c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306839
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-07-30 13:49:59 +00:00
Ravi Mistry
071b30be25 Add Housekeeper-PerCommit-GnToBp
Bug: skia:10554
Change-Id: I27650520a5fbda0d391b597533dde14ec2bb32a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306600
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-07-30 13:43:03 +00:00
Elliot Evans
9fdddf6411 Remove non-nested usages of skvx::mad
This CL attempts to remove a subset of skvx::mad usages.
https://skia-review.googlesource.com/c/skia/+/304853 removes all usages
of skvx::mad but causes small differences in rendering, so it is not
suitable for landing.

Change-Id: Iae2619b69bccce77f1226b526343619fd8efe8a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306702
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-07-30 12:54:53 +00:00
Stephen White
e393c61a15 Dawn: update for API changes (Buffer).
CreateBufferMapped() is now CreateBuffer() with a mappedAtCreation flag.
MapReadAsync() and MapWriteAsync() are now MapAsync().

Change-Id: I98e8513ed9acf73515b7960d437c1fde5e80c03a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306536
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-07-30 12:17:03 +00:00
Eric Boren
5ba6534884 Change some instances of whitelist/blacklist
Bug: chromium:1101491
Bug: b/161896447

Change-Id: I7e3bf4ed63b2170fb08fe1ec8e7d934e7fcdca7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306644
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-07-30 10:56:03 +00:00
skia-autoroll
2d37958b2d Roll ANGLE from c20449a879c6 to fd60950e59a3 (11 revisions)
c20449a879..fd60950e59

2020-07-30 cnorthrop@google.com Samples: Fix Capture/Replay sample
2020-07-29 ianelliott@google.com Vulkan: Cache/re-use vkImageView's per max level
2020-07-29 penghuang@chromium.org Add extension EGL_ANGLE_display_semaphore_share_group
2020-07-29 cnorthrop@google.com Tests: Update gfxbench traces
2020-07-29 cnorthrop@google.com Capture/Replay: Fix GetTexImage on Luminance
2020-07-29 jmadill@chromium.org Capture/Replay: Fix missing header.
2020-07-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 171e04fac342 to c0bf676837e4 (3 revisions)
2020-07-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 3ee5f2f1d331 to 7ab4564696a7 (1 revision)
2020-07-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from 3b36fdc64014 to a4505d37ffe7 (1 revision)
2020-07-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 12c9d4ac61f2 to dc8e77f0e521 (6 revisions)
2020-07-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 150be20d4334 to f9b088fe0dbf (1 revision)

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

To 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: borenet@google.com
Test: Test: NBA 2K20Test: Test: Replay a new traceTest: Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_texture_mipmap_*_max_level_* --use-angle=vulkanTest: Test: angle_end2end_test --gtest_filter="*GetTexImage*"Test: Test: run_angle_perftests --gtest_filter="*Trace*"
Change-Id: I71b1cde273a01a3517b223d6da389aad1cf905dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306750
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-30 08:17:23 +00:00
skia-autoroll
94cefeff50 Roll SwiftShader from dc8e77f0e521 to 08a3cc4cfbaa (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/dc8e77f0e521..08a3cc4cfbaa

2020-07-29 amaiorano@google.com Add doc for testing with SWANGLE
2020-07-29 amaiorano@google.com Add doc on using ANGLE instead of SwiftShader GL
2020-07-29 swiftshader.regress@gmail.com Regres: Update test lists @ dc8e77f0

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 borenet@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: borenet@google.com
Change-Id: I445aeb36221f8abe4b80583c0eeef1ea6891a615
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306741
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-30 04:41:53 +00:00
skia-autoroll
a4bbc9d8ec Roll dawn from c11a19145f1f to 03cf7c3eaeaf (14 revisions)
https://dawn.googlesource.com/dawn.git/+log/c11a19145f1f..03cf7c3eaeaf

2020-07-29 bryan.bernhart@intel.com Enable GBV by default for correctness tests.
2020-07-29 tommek@google.com Optimizing memcpy inside Queue::WriteTexture
2020-07-29 cwallez@chromium.org dawn_wire: Implement CreateBufferMapped on top of mappedAtCreation
2020-07-29 tommek@google.com Enabling alphaToCoverage
2020-07-29 tommek@google.com Roll third_party/spirv-cross/ to enable shader-output mask in HLSL
2020-07-29 cwallez@chromium.org D3D12Info: programmatically compute the shader profiles.
2020-07-29 cwallez@chromium.org Revert "dawn_wire: Implement CreateBufferMapped on top of mappedAtCreation"
2020-07-29 tommek@google.com Enabling sampleMask usage in RenderPipelineMTL
2020-07-29 kainino@chromium.org CMake: add -framework Metal to dawn_native
2020-07-28 rharrison@chromium.org Enable WGSL support by default
2020-07-28 kainino@chromium.org Disable "all" warnings when compiling MSL code
2020-07-28 cwallez@chromium.org dawn_wire: Implement CreateBufferMapped on top of mappedAtCreation
2020-07-28 tommek@google.com Rolling shader deps
2020-07-28 cwallez@chromium.org dawn_wire: Implement MapRead/WriteAsync on top of MapAsync

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang from 9eef54b2513c to 3ee5f2f1d331
  https://chromium.googlesource.com/external/github.com/google/shaderc from 6af6e625573f to cfacaaffd1fe

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: I422a41a1dc730dd20997b4a6f6d564dfeefd8d5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306740
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-30 04:28:23 +00:00
John Stiles
398c654ce7 Enable ClangTidy 'undelegated constructor' warning.
Change-Id: I79dee7422f8a24fa0fffef33b131e96b5bf0d4ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306728
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-29 23:26:00 +00:00
John Stiles
214de11183 Fix DebugCanvas(SkIRect) constructor.
Change-Id: Ie4f24ca0f6bce03b665c8b517c0ed80cc57b0588
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306726
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-29 23:24:21 +00:00
John Stiles
994ce8cf23 Add a dev tools section about debug visualizers.
Change-Id: Ib866d7b8fa2b30bad0716ce9649fa8d9eaab1e41
No-Try: true
Docs-Preview: https://skia.org/?cl=306723
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306723
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-07-29 21:15:43 +00:00
Ben Wagner
57d859edd3 Create a gn link pool which is disabled by default.
The oss-fuzz build of Skia seems to have difficulty when it does too
many linker steps at a time. Ninja will generally not launch new build
steps if the load is too high, but the oss-fuzz builder machines are
slow enough that the load doesn't seem to rise fast enough to prevent
too many linkers from be started at a time.

By default this change does not request a linker pool at all and the
user must request one by setting the link_pool_depth. Negative values
disable the linker pool, zero sets the number to the number of cpus, and
positive values set the pool size. This should allow for some
experimentation while testing what pool size is appropriate for the fuzz
builders while not changing current default behavior.

Bug: oss-fuzz:23438,oss-fuzz:24345
Change-Id: Iba62adac3bea4d968441aa08e33918b5ae962c7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306646
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-07-29 20:28:40 +00:00
Adlai Holler
e34b282ed0 Migrate MakeFromAdoptedTexture to GrDirectContext
More recontexting for SkImage. Chrome flag in CL 2323135.
Flutter migration landed in https://github.com/flutter/engine/pull/19962

Bug: skia:104662
Change-Id: Id725eb130310639457ba90f378ecdb334dd5f3cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306182
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-07-29 20:15:00 +00:00
John Stiles
7b45c2f871 Remove constexpr workarounds for no-longer-supported compilers.
Skia has a C++17 baseline, which rules out MSVC2015 and gcc 4 as
supported platforms.

Change-Id: I3ee87d02020b0a45b6b4a59643b437941da6edd9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306603
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-07-29 19:40:08 +00:00
Jim Van Verth
1aaf41b7a7 Change GrRingBuffer::finishSubmit to be a finishedProc
Change-Id: I307669ee928152ea3616f3814716da7476a03c46
Bug: skia:10530
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305716
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-07-29 19:33:48 +00:00
Brian Osman
a40e7b77fb Add Skia.natvis to platform_tools/debugging
Includes visualizers for SkString, SkS?TArray, SkAutoTArray,
SkImageInfo, SkBitmap and SkPixmap. Includes instructions for using
Image Watch extension to view SkBitmap and SkPixmap.

Change-Id: Ic0313a725dc802e0e7e70cb11bde772a33253491
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306608
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-07-29 18:56:28 +00:00
Stephen White
5e454f8359 Fix MSVC build.
Use $shell prefix invoking python for cp.py.

Change-Id: Ic4b40337255a91fe6f9729eb58ecb6d47c559001
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306334
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-29 18:35:28 +00:00
Mike Reed
cd04356804 Can't share encoded data if we have any modifiers
Bug: skia:7752
Change-Id: I5aea653b890a203c7e3cda8102bfb3e9abfbc8a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295917
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-29 18:28:33 +00:00
Mike Klein
ef0fa43464 don't let shaders know the destination is unpremul
This refactors shaders so that their onProgram() virtuals can never be
aware of an unpremul destination, removing the temptation  to produce
unpremul.  They can now simply always produce premul, or produce colors
that "match the destination", since that will be premul or opaque.

Working with SkColorSpaceXformSteps becomes much less error-prone.

Change-Id: Ie743257a5291496a003dcd8bf808f877e0382d08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306621
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-07-29 18:20:59 +00:00
Chris Dalton
e5b6eece5c Make tessellation join type values negative
This feels more intuitive and it allows the override number of
segments to be positive.

Bug: skia:10419
Change-Id: I0a57d9b114abb4ec8472e1c405ace4385be23e42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306417
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-07-29 18:11:59 +00:00
Mike Klein
d50044129e skvm sprite blitter
Two diffs,
    - image_scale_aligned, all over
    - savelayer_coverage, in bottom-right corner

I think maybe these are both working as intended?
image_scale_aligned is now much more snapped to pixels,
and the bottom-right corner of savelayer_coverage now
looks like the top-right, where previously it looked like
the bottom-left.  Looking on Gold it seems this new image
closely matches images marked positive.

In any case, probably things that can be followed up on
later if they should be different.  I don't see any major
logical flow flaw.

Change-Id: I4cb308a8e1afffefec2464ec0b6f399dae34639b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306308
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-07-29 18:05:49 +00:00
Ravi Mistry
599eae5765 Use storage.ErrObjectNotExist in Canary-G3
Change-Id: I0bfd891b63b894aca29f7e566315a11a62768445
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306517
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2020-07-29 17:36:09 +00:00
Ben Wagner
0795361b45 SkUNREACHABLE should fail, not be UB.
The use of __builtin_unreachable() and __assume(false) are actually
injections of undefined behavior. They do not crash and they may allow
the compiler to assume that any values which could cause that location
to be reached cannot occur. They should only be used after code which
cannot return but the compiler cannot know that (such as inline assembly
which does not return and calls to functions which should have been
declared noreturn but were not).

Replace their use with __builtin_trap() and __failfast(). These are
similar to __builtin_debugtrap() or __debugbreak() but also indicate
that execution should not be resumed.

Change-Id: I46c1362f4e86944cc8e03f6f5837875ac71b69f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297024
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-07-29 17:24:29 +00:00
Robert Phillips
f8237cbafc Re-org image-cacherator-from-* GMs
Change-Id: I590b9649a409a79a8bb3e1b9d25c27995f084b47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306598
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-29 16:56:27 +00:00
John Stiles
e911e265a4 Add LLDB debugging extensions for SkAutoTArray.
Change-Id: I42cd0a6544ae74f2af46850cf229d23c8da8ee32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306596
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-07-29 16:34:26 +00:00
John Stiles
eeefbcf9ba Add LLDB debugging extensions for SkTArray and SkString.
Change-Id: I5c19099025d0e10a55485d4b8c582f010d917360
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306541
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-07-29 15:44:06 +00:00
Nathaniel Nifong
7839a2599f A puppeteer test that runs karma-like tests
Change-Id: Iedd98c03ba9d56b64390ffea23a50c945be9aff3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305557
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Elliot Evans <elliotevans@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-07-29 15:38:56 +00:00
Florin Malita
96d6c6f04d [skottie] Re-enable inval tracking in viewer
This was disabled accidentally at some point.

TBR=

Change-Id: I7d537e519aca983ce2f9b5428820ba87f8113789
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306539
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-07-29 15:21:06 +00:00
Elliot Evans
fc5bbe0a6c Fix SIMD CanvasKit build to output to the expected directory.
the BUILD_DIR in compile.sh was not being set properly prior to this
change, resulting in build output in the `skia/out/canvaskit_wasm`
directory instead of the `skia/out/canvaskit_wasm_experimental_simd`
directory.

Change-Id: Idb599d4885a16c10848e4c90954e778f63065c45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306299
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-07-29 15:04:22 +00:00
Adlai Holler
52ea577f93 Migrate MakeFromYUVATexturesCopy* to GrRecordingContext
These methods aren't used by our clients – plus we're only de-powering the
arg here so we should do fine on canaries.

Bug: skia:104662
Change-Id: I2ff5a4e06a5e82458148d555b6dc8643e7e5f60f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306336
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-07-29 15:00:36 +00:00
Jim Van Verth
3e03e117a0 Reland "Metal: Hold refs for input buffers from bindBuffer calls."
This is a reland of a75dc33a67

Original change's description:
> Metal: Hold refs for input buffers from bindBuffer calls.
> 
> Mirrors what we have in Vulkan and Direct3D.
> Also adds command buffer tracking, again like Vulkan and Direct3D.
> 
> Change-Id: I2280d92274d81830aec7950afc64a0147e38c317
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305396
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Change-Id: I26ebad195fe044c82ea9ad5684ef1ac6d03cbc37
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306537
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-07-29 14:43:06 +00:00
Corentin Wallez
4f587337c3 Roll third_party/externals/spirv-cross/ d573a95a9..7778792ae (15 commits)
d573a95a9c..7778792aec

$ git log d573a95a9..7778792ae --date=short --no-merges --format='%ad %ae %s'
2020-07-28 post GLSL: Add option to force flattening IO blocks.
2020-07-23 tommek Adding BuiltInSampleMask in HLSL
2020-07-22 tommek Enabling setting a fixed sampleMask in Metal fragment shaders.
2020-02-20 cdavis MSL: Add support for processing more than one patch per workgroup.
2020-07-22 dsinclair Roll GLSLang, SPIRV-Headers and SPIRV-Tools.
2020-07-22 cdavis MSL: Factor creating a uint type into its own method.
2020-07-22 cdavis MSL: Factor a really gnarly condition into its own method.
2020-07-11 post MSVC 2013: Fix silently broken builds.
2020-07-07 troughton MSL: Ensure OpStore source operands are marked for inclusion in function arguments
2020-07-06 dsinclair Roll deps.
2020-07-01 post MSL: Do not emit swizzled writes in packing fixups.
2020-07-01 post MSL: Workaround broken vector -> scalar access chain in MSL.
2020-07-06 post MSL: Use input attachment index directly for resource index fallback.
2020-07-06 post GLSL: Support I/O flattening with arrays as final type.
2020-07-03 post GLSL: Support multi-level struct flattening for I/O.

Created with:
  roll-dep third_party/externals/spirv-cross

Change-Id: Idcbbea05932944da3ca4ec6041030d627a325e82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306476
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-07-29 13:17:16 +00:00
Mike Reed
8c7ecc1c06 Revert "Revert "Never share pixels when we make a subset image""
This reverts commit 39d1c1ebb6.

Fix: update gm to handle failures from (bad) gpu: PreAbandonGpuContext


Change-Id: I5a8584ec3493df6c9b9bb94fb84716fda0aadccb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306378
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-29 12:42:16 +00:00
Lei Zhang
c34efe0da1 Fix use of undefined TARGET_OS_SIMULATOR for Non-Metal builds.
When skia_use_metal is set to false, there's no TargetConditionals.h
include to define TARGET_OS_SIMULATOR, as used in GrGLCaps.cpp.

Change-Id: Id6e91cfaa23d8def129a6752356f5ee49d0e5128
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306359
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-07-29 10:31:16 +00:00