Commit Graph

50243 Commits

Author SHA1 Message Date
Robert Phillips
6bf11254fb Fix bug(s) in combining and chaining GrTextureOps
The repro case for this bug is where we have ~700 non-AA texture ops
with a few coverage-AA texture ops sprinkled throughout. In the old
system this could result in the quad limits being exceeded bc the
AA type for the entire run was believed to be non-AA during the creation
phase only to find that it was actually coverage-AA at execution time.
This problem manifested in both the bulk creation method and the
1-by-1/chaining creation method.

Note: in the original repro case every texture op has its own separate
texture so the problem manifests in the chaining case.

Bug: 1108475
Change-Id: I8f08fa4d5db5dbfe4a28145737895b655a145b08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306605
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-07-31 17:02:23 +00:00
Brian Osman
ae94033137 Always write binary (eg, UNIX line endings) to sksl .c.inc files
Prevents spurious diffs when rebuilding on Windows

Change-Id: Id5320e2ef492e7856fe10500ee8a3d19f6726219
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307196
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-07-31 17:00:03 +00:00
Jorge Betancourt
c7950237e0 configure attributes for SkottieView to be initialized from XML layout
Change-Id: I9eb1702ed11f23873ffe7fbc60d9f9d885d3073c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301716
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-07-31 16:43:53 +00:00
John Stiles
2d01ed9460 Replace manually-implemented lerp with mix().
Change-Id: I6bf3cac6df654a0b23ced250df90716f6856ed29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307197
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-07-31 16:31:53 +00:00
Mike Klein
cec3a60426 remove SkDescriptor API fuzzer
SkDescriptor's programatic API is neither
exposed for untrusted use nor harded for it.
Why are we fuzzing it?

Do we need a change in oss-fuzz before deleting this?

Bug: oss-fuzz:19648
Bug: oss-fuzz:24417
Change-Id: Id8d075938d831ec8cad4014c8fe6efaef46edb55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307177
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-07-31 16:28:53 +00:00
Jim Van Verth
1e95010518 Use staging buffers for Metal uploads
Change-Id: I82f9bffc73dcc4c07050199c755120cc964b7198
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304858
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-07-31 16:17:49 +00:00
Brian Osman
d7c4f9d064 Add missing <memory> include
Change-Id: I518dd97f0a7cf521f2484f9ef3afbc6a7f24c112
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307138
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-07-31 15:04:55 +00:00
Brian Salomon
17dc63f01d Don't define SK_GL when no other GPU backends are enabled
SK_GL must explicitly be defined to enable the GL backend,
e.g. by setting skia_use_gl in gn args.

Change-Id: I61008b5422f4690e6f012609b239cd74e63d9f92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306732
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-07-31 14:14:35 +00:00
skia-autoroll
4470ba1491 Roll skcms from 8da4cb002cb4 to b1f9041ffe31 (1 revision)
https://skia.googlesource.com/skcms.git/+log/8da4cb002cb4..b1f9041ffe31

2020-07-31 mtklein@google.com allow Gray and RGB profiles to be equal

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skcms-skia-autoroll
Please CC mtklein@google.com,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

Change-Id: I52534519ef7c092b313ea83ceb5faa59d1af47b6
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Tbr: mtklein@google.com,borenet@google.com
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307166
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-31 13:54:35 +00:00
Ethan Nicholas
c18bb51735 SkSL include files are now stored in a binary format
This speeds up compiler construction, because we no longer have to parse
and process a bunch of SkSL source code during startup.

Change-Id: I6d6bd9b5ce78b1661be691708ab84bf399c6df8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305717
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-07-31 13:48:25 +00:00
Brian Salomon
6db78b8638 Add option to LazyYUVImage to build mip maps
Fixes unexpected image changes to ducky_yuv_blend after
https://skia-review.googlesource.com/c/skia/+/306360

Change-Id: Ic517075883b301c3645059005c6f5d7417872c48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307016
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2020-07-31 13:33:25 +00:00
Joe Gregorio
fc8ba49c06 Upgrade the version of CockroachDB we test against.
Change-Id: I0eb3cf5e7803b9cc281fd07dbc7fcb73498b05fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307018
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2020-07-31 12:45:55 +00:00
skia-autoroll
2ebb6ba900 Roll ANGLE from fd60950e59a3 to cbd5bee81dc6 (14 revisions)
fd60950e59..cbd5bee81d

2020-07-31 lehoangq@gmail.com Disable shader's pre-rotation code on Metal & non-Android.
2020-07-31 kbr@chromium.org Allow GetSystemInfo to return false in CGL and EAGL backends.
2020-07-30 jmadill@chromium.org Add a custom trace tests loader.
2020-07-30 nguyenmh@google.com Batch-compile and batch-run-replay multiple tests
2020-07-30 jmadill@chromium.org Update inaccurate error string.
2020-07-30 cnorthrop@google.com Tests: Add NBA2K20 trace
2020-07-30 cnorthrop@google.com Capture/Replay: Limit string lengths in capture
2020-07-30 tobine@google.com Vulkan: ATrace marker fix-ups
2020-07-30 syoussefi@chromium.org Vulkan: Implement GL_EXT_multisampled_render_to_texture
2020-07-30 penghuang@chromium.org Support EGL_ANGLE_display_semaphore_share_group for DisplayNULL
2020-07-30 syoussefi@chromium.org Vulkan: Remove unnecessary endRenderPass calls.
2020-07-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from dc8e77f0e521 to 08a3cc4cfbaa (3 revisions)
2020-07-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from c0bf676837e4 to 4400cab64b22 (7 revisions)
2020-07-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from f9b088fe0dbf to c6e6597c4f51 (5 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 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: Compile NBA2K20 MEC with MSVCTest: Test: angle_perftests --gtest_filter="TracePerfTest.Run/*nba*"
Change-Id: I970bf7cb265c64a11ecc368b2caf3faf56b9472a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307063
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-31 09:00:52 +00:00
skia-autoroll
c3794dd527 Roll SwiftShader from 08a3cc4cfbaa to aa5bd7657e6c (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/08a3cc4cfbaa..aa5bd7657e6c

2020-07-30 swiftshader.regress@gmail.com Regres: Update test lists @ 08a3cc4c
2020-07-30 capn@google.com Use more inclusive terms
2020-07-30 srisser@google.com Enable occlusionQueryPrecise

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: I78f7f89b4f07ae1697f37f955f11026982cb3dc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307082
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-31 04:56:52 +00:00
skia-autoroll
747a820a7d Roll dawn from 03cf7c3eaeaf to fada50119020 (7 revisions)
https://dawn.googlesource.com/dawn.git/+log/03cf7c3eaeaf..fada50119020

2020-07-31 jiawei.shao@intel.com Metal: Add shader compilation error message to DAWN_VALIDATION_ERROR
2020-07-30 bryan.bernhart@intel.com D3D12: Dynamic shader-visible heap allocation.
2020-07-30 kainino@chromium.org Niceify formatting in webgpu_cpp
2020-07-30 enga@chromium.org Add texture aspect to texture copy view and validation tests
2020-07-30 enga@chromium.org Rephrase Format::aspect enum as an enum class mask
2020-07-30 kainino@chromium.org Make shim headers at <webgpu/*> that point to <dawn/*>
2020-07-30 jiawei.shao@intel.com Support lazy initialization on the buffers bound into a bind group

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: If785712bfb9016654f371eb3c090831dcdf850ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307081
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-07-31 04:31:32 +00:00
John Stiles
f8869a24e7 Remove SK_REQUIRE_LOCAL_VAR macro.
The ClangTidy check `bugprone-unused-raii` has been enabled at
review.skia.org/306838; this check provides equivalent protection.

Change-Id: I9f3858bfd2bede107d509a5a206a08293d5f914c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306953
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-07-31 02:32:01 +00:00
Chris Dalton
078f875477 Rename GrTessellateStroke* -> GrStrokeTessellate* and friends
Almost half the files in src/gpu/tessellate were beginning with
"GrTessellat*". This CL reorders the camel case words for more
efficient tab completion and better grouping of related files.

Bug: skia:10419
Change-Id: I3df0ddbb2367cdbd880807a8aef2dd88ec12f830
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306659
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-07-31 02:24:05 +00:00
Mike Reed
d5b51a0b97 Switch over to SkPathBuilder
Bug: skia:9000
Change-Id: If7192dfb8df01db9acb83a3c331fbbde981e5e2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307017
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-31 02:21:51 +00:00
John Stiles
bfbe71252a Enable ClangTidy check performance-for-range-copy.
This will prevent us from writing range-based for loops that copy the
loop variable when a const& would suffice.

https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html
-----
Finds C++11 for ranges where the loop variable is copied in each
iteration but it would suffice to obtain it by const reference.

The check is only applied to loop variables of types that are expensive
to copy which means they are not trivially copyable or have a
non-trivial copy constructor or destructor.

Change-Id: Ic26bff7e9c48b4d1a9ad9c0606199920ea7a0af8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306945
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-31 01:42:51 +00:00
Chris Dalton
128ed7b4df Add view matrix support to tessellated stroking
To bootstrap tessellated stroking, we started out by converting stroke
paths to device space. This CL removes that conversion and adds two
transformations to the stroking pipeline:

  1) A "matrixScale" that scales the control points before
     tessellation. This scalar's job is to make sure we tessellate
     into the right amount of triangles.

  2) A "skewMatrix" that transforms the post-tessellation triangles.
     This matrix's job is to apply any skews or translations from the
     view matrix, without expanding the geometry in any direction.

Bug: skia:10419
Change-Id: Ib98fc3bd66e1f2bff9fa0e1186294ba8da51e8da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306419
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-07-31 01:33:01 +00:00
John Stiles
bd3ffa43d2 Fix range-based for loops which copy the loop variable unnecessarily.
This will allow us to enable the ClangTidy check
performance-for-range-copy.

Change-Id: I11f152ffe458f5f353da8715ffd2fd47cf4e71a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306946
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-31 01:02:21 +00:00
Brian Salomon
bcde9eec20 Fix ducky_yuv_blend in preabandoned context mode
TBR:robertphillips@google.com

Change-Id: I605cff35d5559597aab9129ebc83b9df81cb62ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306952
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-07-31 00:57:51 +00:00
Ben Wagner
66fb075ad0 Fix UB in SkString::equal(nullptr) when empty.
It is undefined behavior to memcmp with a nullptr. It is possible to
get into such a state if the SkString is itself empty and compared
against nullptr using SkString::equal.

Change-Id: I7a55d7beb5ed454c73a56f47c3729f3790a5fd78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306951
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-30 23:42:11 +00:00
Florin Malita
ef666fa83d [skottie] Avoid image data duplication when pre-decoding
The MultiFrameImageAsset helper can be flagged to decode lazy images
upfront (to avoid run-time decoding and resource cache interactions).

But when pre-decoding is enabled, MultiFrameImageAsset yields a
different SkImage for every request - *even for static images*.

This means that e.g. each image layer precomp instance gets its own
copy of the data.  Bad bad bad.

Update MultiFrameImageAsset to cache the last frame, and reuse when
backed by a static image.

Change-Id: I65431e7ccf4a64f0055f935f9823c33402d1bb2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306938
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-07-30 22:09:41 +00:00
Mike Reed
dab30349d7 mark SkPathBuilder as SK_API
Bug: skia:9000
Change-Id: I9c557460bc9cfbfa6c0506219452ae149b43546c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306950
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-30 22:06:21 +00:00
Jim Van Verth
7e829b2c28 Hoist up uniform GrRingBuffer to GrGpu
Change-Id: Ib829c883c260ef8ff4a3f5326922d66476b7306f
Bug: skia:10530
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306949
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-07-30 21:37:21 +00:00
Jim Van Verth
f02c0489c9 Update command buffer and finishProc processing in Metal
* Restructure GrMtlGpu::submitCommandBuffer() to handle empty
command buffers better and ensure that finishedCallbacks are invoked.
* Move finishedCallbacks from GrMtlGpu to GrMtlCommandBuffer to ensure
they're really invoked on completion/deletion.

Bug: skia:10530
Change-Id: I9f642342f03f540e46fad62a311c4195be87eab8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306936
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-07-30 21:09:30 +00:00
Ethan Nicholas
ebae17d815 Fixed build error blocking Android roll
Change-Id: Ib3dc98192fcfca2af933cc0aa196b3cd47558593
TBR=brianosman@google.com, stani@google.com
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306942
Reviewed-by: Stan Iliev <stani@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-07-30 20:48:00 +00:00
Shawn Guo
284190b108 Check vendor and render string for Freedreno driver
There are quite a few GL context capability tracking for Qualcomm
Adreno device in GrGLCaps.cpp.  The vendor/render detecting functions
currently only check strings for Qualcomm vendor KGSL driver.  Let's
add check for Freedreno driver as well, so that those GL context
capability handling applies to both KGSL and Freedreno driver.  This
fixes some rendering corruption and performance issue on an A405 device
running Freedreno driver on Android.

Change-Id: I98744725490d9941465238434a6574c03dc66963
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306746
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-07-30 20:46:15 +00:00
Leon Scroggins III
75306394f4 Rename "master context" to "primary context"
Bug: chromium:1101491
Bug: b/161896447

Use more inclusive language.

Change-Id: I32b312b7ccffc1a4aab88450595bec09a2fa031b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306943
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-07-30 20:42:20 +00:00
Elliot Evans
6b2602ed2d Remove remaining usages of skvx::mad
This CL attempts to remove the remaining 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.

https://skia-review.googlesource.com/c/skia/+/306702/ removes all
non-nested usages of skvx::mad

Change-Id: Iab5d4cfd0feb856c38b3ebbfe3bf3ed5aad20fe6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306722
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Elliot Evans <elliotevans@google.com>
2020-07-30 20:41:09 +00:00
Leon Scroggins III
73a8cc5712 Remove unused SkCoverageModePriv code
Bug: chromium:1101491
Bug: b/161896447

The main goal is to replace "master" with more inclusive language.
Rather than updating the comment in this old, unused code, just delete
it.

Change-Id: I7fdc71ab8ee9ce7fc30bfb6929599d9ba05a82d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306940
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
2020-07-30 20:36:00 +00:00
John Stiles
4ad701a27c Update doc comments.
I neglected to update the doc comments when adding new types earlier.

Change-Id: Ia8d7ecea3129cebe748c897c2a43f86ff89ab5a7
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306944
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-07-30 20:17:42 +00:00
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