Commit Graph

48106 Commits

Author SHA1 Message Date
Florin Malita
3facc9c886 [skottie] Non-legacy brightness effect
Includes POW intrinsic plumbing.

Change-Id: Ida961718e28822c8559f17f97003f67082dd44cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287156
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-05-04 14:04:24 +00:00
Michael Ludwig
3d919c5301 Fix uninitialized read in simplifyRect()
Bug: oss-fuzz:21976
Change-Id: I635b9092bc4a30bb6a23ddcf1430a3ec06b9d598
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287377
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-04 14:01:19 +00:00
Robert Phillips
2329db1171 Switch to using the gpu-ddl sink(s) to generate the DDL images
The previous settings used the ddl-via - which doesn't use threads as effectively.

Change-Id: I82a0632d99c772421afc645f53bb749420275460
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285812
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-05-04 13:59:19 +00:00
skia-autoroll
cdf23dd9f1 Roll third_party/externals/dawn 303a3daf0dec..ccc40f6ffaa6 (1 commits)
https://dawn.googlesource.com/dawn.git/+log/303a3daf0dec..ccc40f6ffaa6

git log 303a3daf0dec..ccc40f6ffaa6 --date=short --first-parent --format='%ad %ae %s'
2020-05-04 yunchao.he@intel.com Fix a bug in ResourceUsageTrackingTests

Also rolling transitive DEPS:
  https://chromium.googlesource.com/chromium/src/third_party/markupsafe 8f45f5cfa000..8f45f5cfa000
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang 39281fb710c3..39281fb710c3
  https://chromium.googlesource.com/external/github.com/google/shaderc 41f271e6139c..41f271e6139c
  https://chromium.googlesource.com/chromium/src/third_party/jinja2 b41863e42637..b41863e42637

Created with:
  gclient setdep -r third_party/externals/dawn@ccc40f6ffaa6

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/+/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I70cf6bd9934a13a099fc81e693e7f86237a393eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287278
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-04 06:10:58 +00:00
skia-recreate-skps
a1184aca58 Update Go Deps
Change-Id: I1cf3e926e95318d15840159639b1b3279a9125c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287256
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-05-04 05:35:23 +00:00
skia-autoroll
bd87bf432d Roll third_party/externals/angle2 df31624eaf3d..040e4f6fcf54 (14 commits)
df31624eaf..040e4f6fcf

git log df31624eaf3d..040e4f6fcf54 --date=short --first-parent --format='%ad %ae %s'
2020-05-01 tobine@google.com Vulkan: Minor command buffer refactor
2020-05-01 ianelliott@google.com Vulkan: Improve viewport and scissor for pre-rotation
2020-05-01 jmadill@chromium.org Work around strange git cl format issue.
2020-05-01 geofflang@google.com Handle 3D texture entire-mip initialization for FBO attachments
2020-05-01 cnorthrop@google.com Capture/Replay: Refactor default uniform handling for arrays
2020-05-01 tobine@google.com Vulkan: Migrate trace events and occlusion queries
2020-05-01 ynovikov@chromium.org doc: fix link to pre-commit try waterfall
2020-05-01 jmadill@chromium.org Capture/Replay: Use BindAttribLocation to force MEC compat.
2020-05-01 jmadill@chromium.org Validation: Fix some function types.
2020-05-01 jmadill@chromium.org Revert "Add type for attribute locations."
2020-05-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 39281fb710c3..2c53baedbb64 (2 commits)
2020-05-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 49ca250b44c6..2e1d208ed9de (3 commits)
2020-05-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 70eeffc7ca3d..b179a50e9c9c (8 commits)
2020-05-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 98d2cab108ce..694e21400ee5 (5 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@040e4f6fcf54

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 bsalomon@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/+/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: bsalomon@google.com
Change-Id: Idb9e07df50cd93543c2c61ffa1b715e36aeecde5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287198
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-04 04:50:29 +00:00
skia-autoroll
48eaa24e4d Roll ../src b39ec968b468..06a27cbea2e5 (419 commits)
b39ec968b4..06a27cbea2


Created with:
  gclient setdep -r ../src@06a27cbea2

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 bsalomon@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/+/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
Bug: None
Tbr: bsalomon@google.com
Change-Id: I8083ec91c1f9ddd3bdfbda303aa9a73fc3f17a65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287196
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-04 04:41:28 +00:00
skia-autoroll
a92362484c Roll third_party/externals/swiftshader 694e21400ee5..b798cfa374eb (9 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/694e21400ee5..b798cfa374eb

git log 694e21400ee5..b798cfa374eb --date=short --first-parent --format='%ad %ae %s'
2020-05-02 capn@google.com Enable the shaderStorageImageArrayDynamicIndexing feature
2020-05-02 capn@google.com Enable the shaderStorageBufferArrayDynamicIndexing feature
2020-05-02 capn@google.com Enable the shaderSampledImageArrayDynamicIndexing feature
2020-05-02 capn@google.com Enable the shaderUniformBufferArrayDynamicIndexing feature
2020-05-02 capn@google.com Implement dynamic descriptor array indexing
2020-05-02 capn@google.com Skip image sampling if no SIMD lanes are active
2020-05-01 capn@google.com Move the OFFSET() macro to Reactor
2020-05-01 amaiorano@google.com Regres: use Subzero backend by default
2020-04-30 bclayton@google.com Update Marl to 3c643dd4c

Created with:
  gclient setdep -r third_party/externals/swiftshader@b798cfa374eb

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 bsalomon@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: bsalomon@google.com
Change-Id: I6be990f565bdf65c94a68cba2e462ccbe762b2ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287197
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-04 04:37:23 +00:00
skia-recreate-skps
05c1e1c474 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Ib98f93a3263114dc3aaa0603cc15c881a77bacda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287150
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-05-03 08:43:56 +00:00
skia-recreate-skps
57f289d742 Update Go Deps
Change-Id: Ica0c5f35093bae2ca388cc539df14dc5018ef33b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287146
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-05-03 05:41:16 +00:00
skia-recreate-skps
80cab81409 Update Go Deps
Change-Id: I860add063c9c11c1b2e5fb9126bc9e336e6a653e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287085
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-05-02 05:33:57 +00:00
Chris Dalton
64964bb115 Update GrTriangulator to use SkPathPriv::Iterate
Change-Id: I0998f22e3ce958fd651c359c930a2e48af27ce73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285985
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-01 22:35:28 +00:00
Ben Wagner
c19459bf1e Don't trust glyph runs in XPS.
In XPS if a glyph is out of range, ignore it. Also resolve the default
font in the new way, removing the last user of SkTypefacePriv.

In PDF handle fonts with zero glyphs correctly.

Rewrite SkBitSet to keep track of its size, move properly, and make it
more obvious when certain checks are actually made instead of relying on
undefined behavior.

Add a test in a GM to ensure we don't draw anything when a glyph is
out of range on all backends.

Fix the DirectWrite SkScalerContext to pass this new test for
consistency.

Bug: chromium:1071311
Change-Id: I2583970bf1425f59d0d64e3dd7d28109991f9ea9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286776
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-05-01 22:17:17 +00:00
Mike Klein
33951266c5 improve QOL of local fm_driver runs
The default Task Driver logging gets in the way on the console, so I've
sent it to /dev/null for local runs.  We control the horizontal and the
vertical.

Instead, print out each isolated failure and how to reproduce it:

    out/fm -i resources -b cpu -s ducky_yuv_blend #failed:
    	Resource "resources/images/ducky.jpg" not found.
    	../tools/fm/fm.cpp:573: fatal error: "Image(s) failed to load."

    	Signal 5:
    	_sigtramp (+0x1d)
    	sk_abort_no_print() (+0x5)
    	std::__1::__function::__func<...
    	_GLOBAL__sub_I_fm.cpp (+0x0)
    	main (+0x12d5)

    out/fm -i resources -b cpu --skvm true -s ducky_yuv_blend #failed:
    	Resource "resources/images/ducky.jpg" not found.
    	../tools/fm/fm.cpp:573: fatal error: "Image(s) failed to load."

    	Signal 5:
    	_sigtramp (+0x1d)
    	sk_abort_no_print() (+0x5)
    	std::__1::__function::__func<...
    	_GLOBAL__sub_I_fm.cpp (+0x0)
    	main (+0x12d5)

    2 runs of out/fm failed after retries.
    exit status 1

Bot runs still look ok,
https://task-driver.skia.org/td/TEaSLB6jtmRq5XDBUIwS?ifNotFound=https%3A%2F%2Fchromium-swarm.appspot.com%2Ftask%3Fid%3D4bea6af25506c010

Change-Id: I56adacdaeed5545785a3096a4e495eb524db442f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287017
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-05-01 21:54:47 +00:00
Brian Salomon
f1c9eaed95 Allow multiple closed observers on GrOpsTask.
Bug: skia:10188

Change-Id: Ibed96f10c07feddbbf1e78d014c8ea346c91e53c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287002
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-05-01 21:40:47 +00:00
Chris Dalton
c259202113 Remove SkPathVerb::kDone
This was meant as a "stop" verb for the old iterators. With the new
iterator, it simply leads to more SkUNREACHABLEs and SkASSERTs.

Change-Id: I9edd0cefaf4aff782f753560aebd528ed7f4ec04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287043
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-05-01 21:27:18 +00:00
Mike Klein
962020fe39 simplify binary ops too
Rename apply() to unary(), then add binary().

Fix unary to calculate N=base-inst+1.

Convert to simpler `auto&& fn` mode by renaming
approx_atan(y,x) to approx_atan2.  Now we can pass
functions, lambdas, non-lambda functors, whatever.

Change-Id: I17a6aa137f224edc0accd0509c5023a30980fe39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286900
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-05-01 20:43:09 +00:00
Adlai Holler
6f994a880d Add benchmarks for large kernel matrix convolutions
Change-Id: I999881aae3666fa92d83a9cb23582d8fa3f5cf81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286998
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-05-01 20:40:04 +00:00
skia-autoroll
54d269dd0b Roll third_party/externals/angle2 957417438089..df31624eaf3d (13 commits)
9574174380..df31624eaf

git log 957417438089..df31624eaf3d --date=short --first-parent --format='%ad %ae %s'
2020-05-01 cclao@google.com Vulkan: Reduce the onBufferRead/onBufferWrite API verbosity a bit
2020-05-01 tobine@google.com Vulkan: Fix dbg util label bug
2020-05-01 jmadill@chromium.org Tweaks to presubmit script.
2020-05-01 jiajia.qin@intel.com GL: Implement EGL_EXT_image_dma_buf_import
2020-05-01 jiajia.qin@intel.com Enable GL_BGRA_EXT for es backend
2020-04-30 jmadill@chromium.org Capture/Replay: Fix tool after parameter change.
2020-04-30 timvp@google.com Detect non-ascii characters during presubmit
2020-04-30 jmadill@chromium.org Add type for attribute locations.
2020-04-30 cnorthrop@google.com Capture/Replay: Disable default uniform updates for arrays
2020-04-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 941293d512fe..98d2cab108ce (2 commits)
2020-04-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src f03cb290ac10..39281fb710c3 (1 commits)
2020-04-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src f0f3d8b75af9..70eeffc7ca3d (10 commits)
2020-04-30 cclao@google.com Vulkan: use fine grain stage for buffer barriers

Created with:
  gclient setdep -r third_party/externals/angle2@df31624eaf3d

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 ethannicholas@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/+/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: ethannicholas@google.com
Change-Id: I3139eab741ec61d5527ced1750c97bb8b17847cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286859
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-01 20:38:06 +00:00
Robert Phillips
d58a2705bd Add path bounds to SW path mask key
This was a potential issue before but DDLs greatly exacerbate
the situation. If the same path is rasterized multiple times
w/ a slightly different offset or w/ slightly different floating
point math, the actual size of the mask can change slightly.
This causes problems when the mask is cached since, if a prior
differently sized version is found in the cache, the fulfillment
code will assert.

Since our DDL test harness renders using tiles, this problem
arises more often in that configuration especially when
CCPR is unavailable.

Change-Id: Ie344b031cb49fedd9527f66b17ff610afa4a2f12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286902
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-05-01 20:33:05 +00:00
Xianzhu Wang
a91e478ceb Restore SkCanvas::kPreserveLCDText_SaveLayerFlag
Will use this in Chrome to support LCDText in saveLayer/restore with
opacity.

This partly reverts https://skia-review.googlesource.com/c/skia/+/181841.

Bug: 1076019
Change-Id: Id870fb1dcc95c9b319797e936725b4447a97d1d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285956
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Auto-Submit: Xianzhu Wang <wangxianzhu@chromium.org>
2020-05-01 20:33:04 +00:00
Greg Daniel
cba4ee23c4 Fill in d3d program desc with d3d specifics.
This desc will allow us to add a pipeline state cache for d3d.

Change-Id: I0cdf4166e7253df1c184f81a883878e707b77f36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286956
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-05-01 20:28:00 +00:00
Brian Salomon
24dcd207ea Revert "Put top level FPs into their own functions"
This reverts commit 4e7ee6e0af.

Bug: chromium: 1073106

Change-Id: Ifb02fef97560d2eaf3070b6d0daf130c8bff11a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285105
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-05-01 20:27:59 +00:00
skia-recreate-skps
bf85984306 Update Go Deps
Change-Id: Icae34f6600b8896d6ef0fe2524eca94739cca1f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286860
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-05-01 20:22:54 +00:00
Jim Van Verth
a1c140afed Remove linear filter from Metal layer.
Metal layer was using linear filter which was introducing blur.
Changed to nearest filter.

Bug: skia:10172
Change-Id: Ia69d6c9a56f9a2f69b5e98fd9941be52ec01b7d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286616
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-05-01 20:22:53 +00:00
skia-autoroll
82e2a84247 Roll third_party/externals/dawn 754c161fd366..303a3daf0dec (6 commits)
https://dawn.googlesource.com/dawn.git/+log/754c161fd366..303a3daf0dec

git log 754c161fd366..303a3daf0dec --date=short --first-parent --format='%ad %ae %s'
2020-04-30 bryan.bernhart@intel.com D3D12: Decouple descriptor heap allocations.
2020-04-30 yunchao.he@intel.com Add tests for resource tracking in compute - 1
2020-04-30 enga@chromium.org Suppress MSVC warnings about invalid switch values
2020-04-30 cwallez@chromium.org Enable -Wno-language-extension-token except on Windows
2020-04-30 cwallez@chromium.org Fix and enable -Wgnu-anonymous-struct
2020-04-30 cwallez@chromium.org Fix and enable -Wnested-anon-types

Also rolling transitive DEPS:
  https://chromium.googlesource.com/chromium/src/third_party/jinja2 b41863e42637..b41863e42637
  https://chromium.googlesource.com/chromium/src/third_party/markupsafe 8f45f5cfa000..8f45f5cfa000
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang 39281fb710c3..39281fb710c3
  https://chromium.googlesource.com/external/github.com/google/shaderc 41f271e6139c..41f271e6139c

Created with:
  gclient setdep -r third_party/externals/dawn@303a3daf0dec

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/+/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I387aa4e45352d3caa648fd9d37eb485e24561cb1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286857
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-01 20:17:50 +00:00
Jim Van Verth
5ce94405e4 Add RenderTargetViews to D3D render targets
Change-Id: I352cc4db7fc1353992b4c127d8e2104a46d88ded
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286936
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-05-01 20:17:48 +00:00
Julia Lavrova
8335ab694d Hide more of leftToRight checks
Moving some code down from paragraph to line.

Change-Id: I9408951fe8d05a5956e4bbe4b50c9ef3f3dc1f9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285838
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-05-01 20:12:44 +00:00
Brian Osman
b32d66b296 Add layout(srgb_unpremul) to SkSL
For 3 and 4 channel float uniforms, this states that the data supplied
is unpremul sRGB, and transforms that data to the destination color
space (still unpremul) automatically.

Change-Id: I1b420d2fd10640963fa8e6736af3747cfc6e7d5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286656
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-05-01 20:12:43 +00:00
Mike Klein
45be07785d length()
- add length() as a special intrinsic
 - style refactoring I wrote to help debug the CL
 - impl dup2,3,4 in program_fn
 - (better) fix dup2,3,4 in byte code interpreter

Change-Id: I7cd94a4bc03efc6af2053e9e6ae18b4da94363ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286896
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-05-01 20:07:40 +00:00
skia-autoroll
cd7732b05a Roll ../src c4c6cbc6102b..b39ec968b468 (449 commits)
c4c6cbc610..b39ec968b4


Created with:
  gclient setdep -r ../src@b39ec968b4

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 ethannicholas@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/+/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
Bug: None
Tbr: ethannicholas@google.com
Change-Id: I44e139e1356baf5181bcb6f405e8f7c8114710b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286858
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-01 20:07:38 +00:00
Brian Osman
d9bde07f1e Add SkRuntimeShaderBuilder, clean up SkRuntimeEffect API a bit
Utility class for getting named access to uniforms and children of an
SkRuntimeEffect (also functions as an example of using the
SkRuntimeEffect public API).

Moved several internal SkRuntimeEffect functions to private, and added
findInput/findChild helpers.

Change-Id: I8c2e7745ea81670a49b7ab2f51ce44a8d8169278
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286516
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-01 20:02:35 +00:00
skia-autoroll
f30454180f Roll third_party/externals/swiftshader 7d6b5913c98c..694e21400ee5 (6 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/7d6b5913c98c..694e21400ee5

git log 7d6b5913c98c..694e21400ee5 --date=short --first-parent --format='%ad %ae %s'
2020-04-30 bclayton@google.com Vulkan/Debug: Don't step for column updates
2020-04-30 bclayton@google.com Vulkan/Debug: Fix build with clang-10.
2020-04-30 bclayton@google.com Device: Use std::unique_ptr instead of raw pointers
2020-04-30 amaiorano@google.com CMake: add graphviz generation scripts
2020-04-30 jrprice@google.com Fix null dereference in OFFSET macro
2020-04-30 capn@google.com Fix JIT on separate thread

Created with:
  gclient setdep -r third_party/externals/swiftshader@694e21400ee5

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 ethannicholas@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: ethannicholas@google.com
Change-Id: I70f080b8b0c64eb205ebd99a470196987054db10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286856
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-01 20:02:34 +00:00
Chris Dalton
f7a3307a22 Update tessellation to use SkPathPriv::Iterate
Change-Id: I7133b3e4de246bab08c503084e1b46f20de26b91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285753
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-01 20:00:19 +00:00
Kevin Lubick
5443bb32a2 [canvaskit] Start a generic puppeteer perfing system.
IMPORTANT LESSON: when bringing in node (and possibly other
executables) via CIPD, add them to the path in gen_tasks_logic
so the parent executable (the task driver itself) has the right
PATH set. Otherwise, the subprocesses it spawns might grab the
wrong version because of how golang handles environments of
subprocesses.

This is starting as a fork of Skottie WASM. I hope to have a more unified
system for creating and running benchmarks.

Overall overview:
gen_tasks_logic.go creates a task in task.json that compiles
CanvasKit and the task drivers and then executes our task
(i.e. perf_puppeteer.go)

perf_puppeteer runs a node program (perf-with-puppeteer.js)
that uses puppeteer to execute benchmarking code on an
html page (canvaskit-skottie-frames-load.html).

I needed to update the node package so npm could be updated from
3.x to 6.14.4 so it knew about `npm ci`. This may not have been
entirely necessary, given the problems of executing the correct
npm (see important lesson above), but it hasn't broken things
further, so more up-to-date is probably a good thing.

Suggested Review Order:
 - canvaskit-skottie-frames-load.html (note it is similar to
   skottie-wasm-perf.html, but it waits for a button click
   to start animating and records times from the main JS thread
   itself)
 - perf-with-puppeteer.js (similar to skottie-wasm-perf.js, but
   has some things made optional [e.g. tracing])
 - perf_puppeteer_test.go (shows the inputs/outputs of various steps)
 - perf_puppeteer.go
 - Everything else.


Change-Id: I380e81b825f36682c257664d488267edaf36369e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285783
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-05-01 19:23:08 +00:00
Florin Malita
e55e56038c Hoist pixel geometry adjustments out of SkBaseDevice::CreateInfo()
We only call CreateInfo() from internalSaveLayer(), and always pass
kNever_TileUsage.  Move the related pixel geo override to
internalSaveLayer, and remove CreateInfo::AdjustPixelGeometry().

(also swap the args order to "prove" we're covering all callers)

NOTREECHECKS=true
Change-Id: Ie11c3f501d262f070cf97797cb549d3afa87d679
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286876
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-05-01 16:35:32 +00:00
Robert Phillips
ef41d500cc Disable MTLPixelFormatBGR10A2Unorm on iOS
This is a bit overkill. Support for BGR10_A2 was added in iOS 11 but we support iOS 9 and up.

Bug: skia:10195
Bug: 1068416
Change-Id: I0b66c3ac676ef14d5bc2c7fcf194047b51017e83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286878
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-05-01 14:47:55 +00:00
Michael Ludwig
6a6de65fd9 Retry drawing the simplified shape
Previously, functions like GrRTC::drawRect or drawRRect would check
for common cases and then fallback to creating a GrStyledShape and
calling drawShapeWithPathRenderer. This would always use path rendering,
even if the analysis that GrStyledShape did was able to change the style.

This adds one additional retry to go through drawShape() before the
settling on path rendering.

Change-Id: I1dcf218f9bf83d40dad992352bcd4a6e74b01fad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285720
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-01 00:48:59 +00:00
Florin Malita
672c7a698a [skottie] More accurate contrast effect option
(disabled by default)

  nojit: 12 -> 15 (ms)
    jit:  5 ->  6 (ms)

Change-Id: I24a1b05d13327be93b5d9c374b2b765b0e198b0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286658
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-05-01 00:21:59 +00:00
Mike Klein
5cf3c9c1db another round of work on fm_driver
- Simplify command line to match fm_bot better.
 - Support all sources, not just GMS.
 - Isolate failures with retries, propagating only
   isolated failures to the root.

Example failures:
    https://task-driver.skia.org/td/XzxO7p58FfDJGOvHxIhJ?ifNotFound=https%3A%2F%2Fchromium-swarm.appspot.com%2Ftask%3Fid%3D4be5e88a3f7a3110

Change-Id: Ic1c5f05042cd86487cc8d0c992a6101b0e50dd33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286644
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-30 23:05:26 +00:00
Mike Reed
60cb7e3679 [sksl,skvm] handle more 1,2,3,4 variants
Change-Id: Iede34bdb38e2d9b3eaeea21efaa3e14ca47d55a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286556
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-30 21:54:03 +00:00
Jim Van Verth
2ba8ba26f9 Add GrD3DDescriptorHeap.
Adds a wrapper around ID3D12DescriptorHeap, which manages allocations
of descriptors from the heap.

Change-Id: Idc3bdb43640639114de5d0520c339f9e0173e26f
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286338
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-04-30 21:34:56 +00:00
Herb Derby
3c873afcd7 Const all the things in GrAtlasTextOp
Move GrAtlasTextOp initialization code from GrTextBlob
to GrAtlasTextOp. Make many fields const.

Change-Id: I8a1c1992b43c8ad9db7d6762ef7cbd109888ac18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286176
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-04-30 21:14:23 +00:00
Ethan Nicholas
b67d056c30 SkSL parser now limits recursion on comma operator as well
Bug: oss-fuzz:19994
Change-Id: I16c434509a83f2dcd19b2fe7650218f28bfaa3cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286617
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-04-30 20:45:53 +00:00
Ben Wagner
666622968c Add Preview to list of possible MSVC versions.
Needed to test a Preview version of MSVC and adding it to the list here
makes it a bit easier and the list more complete.

Change-Id: I419636722303816f0cd961408229fcef0773e8e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286496
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-04-30 19:54:33 +00:00
Michael Ludwig
f38b711222 Reland "Refactor geometry union capabilities out of GrStyledShape"
This reverts commit af312c9d40.

Reason for revert: improved performance, updated empty point cap behavior
to make chrome happy.

Because of the performance regression in the original CL, this is a bit
more to it than just updating cap behavior. Summary of changes for perf:
1. In asPath(), only call reset() if the type isn't a path or arc.
   Otherwise it was just a wasted realloc of an empty path ref.
2. Rewrote the GrShape::simplify() to not progress through every shape
   type in order, it just jumps to the appropriate type.
3. Have simplify() return whether or not the shape started out closed,
   so we don't have to call GrShape::closed(), which is costly when the
   shape is a path.
4. Expose the GrShape's type enum so GrStyledShape's key writing can use
   switches instead of a giant block of ifs (where path happened to be
   last)

The regressions showed up most heavily on desk_mapsvg and desk_chalkboard
SKPs on the Android skpbench marks. On my system, I was able to
reproduce a similar %-regression from ToT and the original CL on the
chalkboard (but not mapsvg).

Master ranged between 5.1 and 5.3ms, original CL ranged from 5.6-5.8
and after the changes listed above, I got it down to 5.3-5.5. It's not
ideal but I haven't been able to figure out anything more substantial
that it could be. At this point it may just be code layout and/or the
fact that it's now split into two types.


Original change's description:
> Revert "Refactor geometry union capabilities out of GrStyledShape"
>
> This reverts commit 2becdde074.
>
> Reason for revert: likely breaking cc unit test due to empty shape cap change.
>
> Original change's description:
> > Refactor geometry union capabilities out of GrStyledShape
> >
> > The geometry union part of GrStyledShape is now held in GrShape. For the
> > most part, GrShape is entirely style agnostic and focuses on storing
> > the various types of geometry, and destructing them gracefully. It also
> > provides a public API that unifies functionality across all shape types,
> > such as contains() and bounds().
> >
> > GrStyledShape now just owns a GrShape and a GrStyle, and handles the
> > additional simplification logic that relies on knowing the effects of
> > the style on the draw. This is where GrShape makes some allowances for
> > style. Its simplify() function accepts flags that enable/disable various
> > simplification optimizations. Currently these are designed around
> > what is needed to respect path effects and stroking behaviors in
> > GrStyledShape. The main other user of GrShape (the new clip stack) will
> > always provide all flags since it treats every shape as if it were
> > simply filled.
> >
> > Several other related refactorings were taken at the same time:
> > 1. The implementations for asNestedRects, asRRect, etc. were moved out
> >    of the header and into the cpp file for GrStyledShape.
> > 2. GrRenderTargetContext relies on GrStyledShape for its stroke rect
> >    fallbacks.
> > 3. GrShape can hold points, lines, and rects explicitly. This let me
> >    simplify the stroke reasoning.
> >
> > Change-Id: I9fe75613fee51c30b4049b2b5a422daf80a1a86e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284803
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Chris Dalton <csmartdalton@google.com>
>
> TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com
>
> Change-Id: I2af5782e072e0ccb4a87f903bb88cbe335b9613f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286039
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

Change-Id: I8c614573582084f2e9ee0d73f93812e0a7c13983
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286396
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-04-30 19:36:43 +00:00
Robert Phillips
cbc9667025 Add some missed BGRA_1010102 testing tidbits
A follow up to:
https://skia-review.googlesource.com/c/skia/+/285356 (Add BGR_10A2 support to Ganesh)

Change-Id: If19e234bf80d4affd515d6168f1faeec13f4fcf8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285856
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-30 18:31:37 +00:00
Brian Osman
84aa92e428 Enforce C-style identifier rules for matrix markers everywhere
Change-Id: I3cc189a77ce5001a828cdc4e73ea9c80c91554b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286438
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-04-30 18:16:33 +00:00
Sean Gilhuly
a4dd44a3b4 Dawn: Use shared copy encoder to create backend texture
In onCreateBackendTexture(), a new CommandEncoder was being created to
copy from the staging buffer to the result texture. Following the
staging manager rewrite, this copy encoder was being submitted before
the staging buffer was flushed, causing texture uploads to fail.

Use fCopyEncoder to ensure the staging buffer is unmapped before the
commands are run.

Bug: chromium:1071073
Change-Id: I3e8a77f3356671411f01dbb8017a7997e7c9349b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286394
Commit-Queue: Sean Gilhuly <sgilhuly@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-04-30 17:59:22 +00:00
Chris Dalton
c120be4bbf Add a faster, cleaner path iterator
Adds a zero-copy "RangeIter" class and rewrites the guts of
SkPath::RawIter to use RangeIter instead. Adds functionality to
SkPathPriv to enable iteration with a standard range-for loop:

 for (auto [verb, pts, weights] : SkPathPriv::Iterate(skPath)) {
     ...
 }

Once the usage cases of RawIter are updated, this iterator will be moved
to SkPathPriv.

Using this instead of the copy-heavy SkPath::Iter nearly doubles
performance on GrTessellatePathOp::prepareOuterCubics. The resulting
code is also more neat and keeps the iteration variables
(verb, pts, weights) scoped strictly inside the for-loop.

Change-Id: I64b929d7015a349dd2c64744dc48132a286778b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285751
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-04-30 17:21:42 +00:00