Commit Graph

44864 Commits

Author SHA1 Message Date
Florin Malita
953efcc2a5 Color filter benchmarks
Add a bunch of color filter benches:

      3.35 !	colorfilter_matrix_runtime  gl
      2.43  	colorfilter_src_runtime     gl
      2.41 !	colorfilter_lerp_src        gl
      2.40 ?	colorfilter_compose_src     gl
      6.72  	colorfilter_matrix_hsla     gl
      3.41 ?	colorfilter_matrix_rgba     gl
      4.41 !	colorfilter_srgb_to_linear  gl
      4.31 ?	colorfilter_linear_to_srgb  gl
      2.53  	colorfilter_blend_srcover   gl
      2.43 ?	colorfilter_blend_src	    gl
      2.44 !	colorfilter_none            gl

    753.31 ?	colorfilter_matrix_runtime  8888
    257.59 ?	colorfilter_src_runtime     8888
    111.94 ?	colorfilter_lerp_src        8888
     82.35 ?	colorfilter_compose_src     8888
    600.24 !	colorfilter_matrix_hsla     8888
    304.49  	colorfilter_matrix_rgba     8888
    457.25 ?	colorfilter_srgb_to_linear  8888
    493.23 ?	colorfilter_linear_to_srgb  8888
     95.61 ?	colorfilter_blend_srcover   8888
     74.41 ?	colorfilter_blend_src	    8888
     19.15 ?	colorfilter_none            8888


Change-Id: I08dfc81b14cba098b00edf2af150b82541003139
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250260
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-10-23 21:11:08 +00:00
recipe-roller
e0cec7391a Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/efd15ecf30fa1ed2376e6a0ea3cf1b3659732f05 Avoid accessing the None json output on gclient sync failure. (gbeaty@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I58eef1b7e1c1351678b2d8181db87b556840426d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250298
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-10-23 20:44:28 +00:00
Chris Dalton
6e38ce7c08 Disable msaa on Pixel3a
Bug: b/143074513
Change-Id: I1110ee542483b07b12e808bcd2decd6ce24f0a15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-10-23 20:25:17 +00:00
Hal Canary
a255358d98 [minor] SkRemoteGlyphCache impl: add explicit
Change-Id: I3a1d97b867a66ed86e4c97bee72150b74d9dc112
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249877
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-10-23 19:45:55 +00:00
Jim Van Verth
6863bb0930 Set Metal rendertargetproxy via drawableSize
Bug: skia:
Change-Id: Idfe709836a9c0be5ce9b6fd200956ff8e284596d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249981
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-23 19:32:25 +00:00
Stephen White
dd78efd0f5 Dawn: implement unified UBOs.
This fixes the fpcoordinateoverride GM, and others.

Change-Id: I715e39201a4c77aa49395a3b9259caaf3ca0328e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249893
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-10-23 19:26:35 +00:00
Michael Ludwig
11eeb94bfe Revert "hide color filters from blitters"
This reverts commit cba64462d2.

Reason for revert: ASAN failures: https://logs.chromium.org/logs/skia/4812b6e5916f3d11/+/steps/symbolized_dm/0/stdout

Original change's description:
> hide color filters from blitters
> 
> This is all guarded by the old define we never rebaselined.
> 
> Had to make some upgrades to SkColorFilterShader to support
> replacing an SkPaint's shader and color filter with a single
> merged SkColorFilterShader.  Our pipeline's order of operations
> is
> 
>    1) shader
>    2) scale by paint alpha
>    3) color filter
> 
> but SkColorFilterShader had no way to get that paint alpha in
> the middle there, so I added one.
> 
> Change-Id: Ibc1448c1b421747086030337c1a30b8f0af4aa5e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250296
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=mtklein@google.com,reed@google.com

Change-Id: Icc3a3916ca763de979c01d65746d74c49e14544c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250261
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-10-23 19:15:06 +00:00
Mike Klein
cba64462d2 hide color filters from blitters
This is all guarded by the old define we never rebaselined.

Had to make some upgrades to SkColorFilterShader to support
replacing an SkPaint's shader and color filter with a single
merged SkColorFilterShader.  Our pipeline's order of operations
is

   1) shader
   2) scale by paint alpha
   3) color filter

but SkColorFilterShader had no way to get that paint alpha in
the middle there, so I added one.

Change-Id: Ibc1448c1b421747086030337c1a30b8f0af4aa5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250296
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-10-23 18:14:03 +00:00
Brian Salomon
5918e8313b Rewrite ReadPixels_Gpu test to be more exhaustive and share code.
Implementation is shared with with AsyncReadPixels.

Change-Id: If40705e96cc7fb073ab6024ab59819784c8be0ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244717
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-10-23 18:06:03 +00:00
Robert Phillips
e9462dd2da Rename *worstCase* to backingStore* in GrSurfaceProxy
These names are more appropriate after:

https://skia-review.googlesource.com/c/skia/+/241356 (Always create an approx-size texture for approx-fit proxies))

Note that this CL does have one substantive change in GrCoordTransform::hasSameEffectAs where we use our knowledge of the size at which the backing stores will be allocated to remove a sly usage of GrSurfaceProxy::underlyingUniqueID.

Change-Id: Ibbb8cb23c4503f267abbdf4794610f3262a6f515
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250257
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-10-23 17:15:01 +00:00
Florin Malita
36031207dc GPU support for SkColorFilters::HSLAMatrix
Change-Id: I5b762811b44861fcedd2fa5c0e48a82718458605
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232398
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-23 16:10:27 +00:00
Robert Phillips
32803ff744 Add PrePreparedDesc to GrTextureOp
This centralizes the information we are preparing and reduces duplicate computation (e.g., of the VertexSpec).

Change-Id: Iac2c4d0890389e641ee9a7453dace31c0a4ca965
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249983
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-10-23 13:37:07 +00:00
Robert Phillips
40b815db97 Revert "Rename gl_SampleMask to sk_SampleMask"
This reverts commit 23716d42f7.

Reason for revert: red bots and GMs

Original change's description:
> Rename gl_SampleMask to sk_SampleMask
> 
> Change-Id: I3924c6f76edf310a984e4fd89478b00eeec69722
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249931
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=egdaniel@google.com,csmartdalton@google.com,ethannicholas@google.com

Change-Id: I74848e95972cf2c41cc28887e26214136ce79e08
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250180
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-23 12:28:48 +00:00
Robert Phillips
d9ddd07554 Revert "Rename sampleVariablesSupport() to sampleMaskSupport()"
This reverts commit 766b4c9c21.

Reason for revert: GMs and bots

Original change's description:
> Rename sampleVariablesSupport() to sampleMaskSupport()
> 
> We have only implemented support for the sample mask. Renaming the cap
> to reflect that.
> 
> Change-Id: I10b5923c7464093187336016963a8ac51ebd54f5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249932
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

TBR=egdaniel@google.com,csmartdalton@google.com,ethannicholas@google.com

Change-Id: I712169e86ee479bffd71d6665710f731d6c0e042
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250179
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-23 12:27:08 +00:00
Stephen White
8e3e431dad Dawn: fix compile.
Change-Id: Ibbba2824224f5c4b9ed0a68cafe58e0e91c22a31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250097
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-10-23 12:22:27 +00:00
Kevin Lubick
a12f6cbff3 [fuzzing] Fix skdescriptor deserialize compile
Change-Id: I03cf0b61099845ed1a931b30662830ffb883fa05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250177
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-23 11:54:14 +00:00
skia-autoroll
184a300a24 Roll third_party/externals/angle2 5335faaece2a..d4affcdd2ac9 (9 commits)
5335faaece..d4affcdd2a

git log 5335faaece2a..d4affcdd2ac9 --date=short --no-merges --format='%ad %ae %s'
2019-10-23 jmadill@chromium.org Vulkan: Roll validation layers.
2019-10-23 jmadill@chromium.org Vulkan: Fix sampler object lifetime.
2019-10-23 jie.a.chen@intel.com Remove forceNonZeroScissor workaround
2019-10-23 jie.a.chen@intel.com Add SH_REMOVE_DYNAMIC_INDEXING_OF_SWIZZLED_VECTOR
2019-10-22 geofflang@chromium.org GL: Emulate primitive restart when PRIMITIVE_RESTART_FIXED_INDEX is unavailable.
2019-10-22 tobine@google.com Vulkan: Enable VK_EXT_line_rasterization
2019-10-22 mihu@microsoft.com Fix EXT_multisample_render_to_texture perf regression
2019-10-22 jmadill@chromium.org Metal: Move ldflags to Metal backend config.
2019-10-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 834ee546f93d..5e634c8999e6 (3 commits)

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

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 michaelludwig@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.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=michaelludwig@google.com
Change-Id: I92b833fb4898433e58b5d7ed05f6a95aa171a2b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250157
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-10-23 06:09:06 +00:00
skia-recreate-skps
b7950c00e9 Update Go deps
Change-Id: I0d8d8650b564c7d3382d97a4b51bd3691b8d8588
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250165
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2019-10-23 05:26:06 +00:00
recipe-roller
d327d3eb6b Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/b1ae481f7fe335d11f579854e2a2fefd07d7623d git-cl: Remove hack to ask for random mirrors when querying Gerrit. (ehmaldonado@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Iab3ecb9fceaae817dc1447299c393dc2845ab02e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250164
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-10-23 05:21:06 +00:00
skia-autoroll
220caa898c Roll third_party/externals/swiftshader 23f9c25f60ee..7738ed713e7b (3 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/23f9c25f60ee..7738ed713e7b

git log 23f9c25f60ee..7738ed713e7b --date=short --no-merges --format='%ad %ae %s'
2019-10-22 amaiorano@google.com Fix sRGB conversion not applying generally
2019-10-22 bclayton@google.com regres: Automatically build dEQP based on new config file
2019-10-22 amaiorano@google.com Fix unary minus warnings

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

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 michaelludwig@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.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
TBR=michaelludwig@google.com
Change-Id: I88c74f6c46864b62ade02d82631dfc5abf7d46f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250156
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-10-23 04:34:46 +00:00
recipe-roller
65456999ca Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/401b25c878da7821eda5d3f60b0970d799666659 presubmit: Convert literals to strings before setting env variables. (ehmaldonado@google.com)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I58436d0b9f28de3c2847a4d54d182402e93ce8fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250129
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-10-23 04:11:06 +00:00
recipe-roller
4d727acb24 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/db1e79c1c5deb122aa3b05de8a83179dfae37446 Fix gclient crash with unicode strings in .gclient files. (dpranke@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I5040dfb486b03e87ed6fea3369df3cebeaf94ba0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250121
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-10-23 02:23:06 +00:00
Florin Malita
3d5ccfd9d7 Skip unneeded reallocs in SkTDArray::shrinkToFit()
Change-Id: I885eb1769ffa639026929dc7aa68312e0dbf91b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250037
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-23 02:06:36 +00:00
Heather Miller
cc13acbffe Fix up release notes file
Bug: skia:
Change-Id: I124abbb54f13e70e5d9c6a71f43cea5adf0ce49a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250038
Auto-Submit: Heather Miller <hcm@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-10-23 01:49:36 +00:00
recipe-roller
1ab27a2b5c Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/53f9e0979a583470e6504e73a1789b23ff0b0464 Roll led to latest version (martiniss@google.com)
  https://crrev.com/67fccdf0c90e11031f9e6f3043b7d0f6cc7c664f gerrit_util: Add tests for CookiesAuthenticator (ehmaldonado@chromium.org)
  https://crrev.com/bb1354e256e82c084e3d6af0de6cf23f1c515ea6 depot_tools: Remove oauth2client. (ehmaldonado@chromium.org)
  https://crrev.com/a834f39e213247945fad24605839e2d3c65b0070 presubmit_support: Fix tests on Python 3. (ehmaldonado@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I7b1ab848aa90f26facf130d1d7bacf6455413dd1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250073
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-10-22 22:54:25 +00:00
Mike Klein
d48488b5ea reorder to minimize register pressure
Rewrite program instructions so that each value becomes available as
late as possible, just before it's used by another instruction.  This
reorders blocks of instructions to reduce them number of temporary
registers in flight.

Take this example of the sort of program that we naturally write,
noting the registers needed as we progress down the right:

    src = load32 ...          (1)
    sr = extract src ...      (2)
    sg = extract src ...      (3)
    sb = extract src ...      (4)
    sa = extract src ...      (4, src dies)

    dst = load32 ...          (5)
    dr = extract dst ...      (6)
    dg = extract dst ...      (7)
    db = extract dst ...      (8)
    da = extract dst ...      (8, dst dies)

    r = add sr dr             (7, sr and dr die)
    g = add sg dg             (6, sg and dg die)
    b = add sb db             (5, sb and db die)
    a = add sa da             (4, sa and da die)

    rg   = pack r g ...       (3, r and g die)
    ba   = pack b a ...       (2, b and a die)
    rgba = pack rg ba ...     (1, rg and ba die)
    store32 rgba ...          (0, rgba dies)

That original ordering of the code needs 8 registers (perhaps with a
temporary 9th, but we'll ignore that here).  This CL will rewrite the
program to something more like this by recursively issuing inputs only
once needed:

    src = load32 ...       (1)
    sr  = extract src ...  (2)
    dst = load32 ...       (3)
    dr  = extract dst ...  (4)
     r  = add sr dr        (3, sr and dr die)

    sg  = extract src ...  (4)
    dg  = extract dst ...  (5)
     g  = add sg dg        (4, sg and dg die)

    rg  = pack r g         (3, r and g die)

    sb  = extract src ...  (4)
    db  = extract dst ...  (5)
     b  = add sb db        (4, sb and db die)

    sa  = extract src ...  (4, src dies)
    da  = extract dst ...  (4, dst dies)
     a  = add sa da        (3, sa and da die)

    ba  = pack b a         (2, b and a die)

    rgba = pack rg ba ...  (1, rg and ba die)
    store32 rgba  ...      (0)

That trims 3 registers off the example, just by reordering!
I've added the real version of this example to SkVMTest.cpp.
(Its 6th register comes from holding the 0xff byte mask used
by extract, in case you're curious).

I'll admit it's not exactly easy to work out how this reordering works
without a pen and paper or trial and error.  I've tried to make the
implementation preserve the original program's order as much as makes
sense (i.e. when order is an otherwise arbitrary choice) to keep it
somewhat sane to follow.

This reordering naturally skips dead code, so pour one out for ☠️ .
We lose our cute dead code emoji marker, but on the other hand all code
downstream of Builder::done() can assume every instruction is live.

Change-Id: Iceffcd10fd7465eae51a39ef8eec7a7189766ba2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-10-22 21:49:05 +00:00
Chris Dalton
766b4c9c21 Rename sampleVariablesSupport() to sampleMaskSupport()
We have only implemented support for the sample mask. Renaming the cap
to reflect that.

Change-Id: I10b5923c7464093187336016963a8ac51ebd54f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249932
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-10-22 21:08:55 +00:00
Florin Malita
c1b501c352 [skottie] Shift Channels effect support
(https://helpx.adobe.com/after-effects/using/channel-effects.html#shift_channels_effect)

Limitations: no HSL sources for now.

Change-Id: Iffd63f2bbfc8c5f1de00846412be26847e822420
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250036
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-10-22 20:36:01 +00:00
Chris Dalton
23716d42f7 Rename gl_SampleMask to sk_SampleMask
Change-Id: I3924c6f76edf310a984e4fd89478b00eeec69722
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249931
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-10-22 20:36:00 +00:00
Herb Derby
266598ae71 Reland "Use common fallback code for drawing an SkGlyphRun"
This is a reland of b09131f476

Original change's description:
> Use common fallback code for drawing an SkGlyphRun
> 
> This reorganizes the code so that Mask, SDFT and Paths
> share calling the fallback code. It also orders the
> different drawing methods from most frequent to least.
> 
> Change-Id: I1bbfc92765682c6a20d59da34734f127a6d017cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249558
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Change-Id: I6977a4d03831329a85c2a8563c15382d7b9dd387
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249979
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-10-22 20:30:57 +00:00
Eric Boren
a715ff5043 Use urllib_request instead of urllib2 in PRESUBMIT.
urllib_request was introduced in crrev.com/c/1866170 to add
python 3 compatibility.

Bug: 1009814
Change-Id: Iecc246d4f251983051bd0cf812903831ea7e0c2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249588
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2019-10-22 20:30:56 +00:00
Michael Ludwig
915b779f9c Revert "Track device coordinate space as matrix"
This reverts commit b74d5548a4.

Reason for revert: see if this fixes the android roll

Original change's description:
> Track device coordinate space as matrix
> 
> This is a required step to be able to cleanly draw image filtered
> device layers with arbitrary matrices, instead of relying on
> SkMatrixImageFilter to apply the transformation.
> 
> Bug: skia:9545
> Change-Id: I8d84679a281538875cf4a1b73565294fb7f89c86
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249076
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com

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

Bug: skia:9545
Change-Id: Ie374a7500cfbff35cb0782beb863086e118a005a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249986
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-10-22 18:09:36 +00:00
Brian Salomon
2638f3d44b rename atlassize->atlasdimensions
Change-Id: I0262ed26f0b3523302bbb4e94dfca94d120fc70c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249980
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-22 16:57:01 +00:00
Robert Phillips
61fc799759 Add creation-time POD memory pool for GrOps
This CL begins pulling some of the work forward into onPrePrepare.

Change-Id: If049e0662db51b465b8b82aafebeef2323bddfd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249802
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-22 16:35:41 +00:00
Kevin Lubick
6dbc4ed880 [canvaskit] Expose various canvas features
clipRRect and drawColor

Change-Id: I6e947b4a30646a96935c74e0cd334f1624c41065
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249892
Reviewed-by: Mike Reed <reed@google.com>
2019-10-22 16:09:27 +00:00
Michael Ludwig
6387dc19f6 Revert "Enable Programs (formerly GLPrograms) test for other APIs"
This reverts commit 598741667a.

Reason for revert: segfaults on Pixel bots

Original change's description:
> Enable Programs (formerly GLPrograms) test for other APIs
> 
> Bug: skia:9365
> Change-Id: I2eeac4e628425411b0a8f9ffa94ad61d58254b77
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249806
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Eric Boren <borenet@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=borenet@google.com,jvanverth@google.com,robertphillips@google.com

Change-Id: I286c637490bb8a21c0020a8935ce4c850b98f6b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9365
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249978
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-10-22 15:39:49 +00:00
Brian Salomon
9f2b86c54d More SkISizification in GPU code.
Uses SkISize instead of separate width/height variables in many places.

No functional change.

Change-Id: If87b2c57e43d810f0820c4e3c9ef8e6b8ebd10ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249886
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-22 15:04:07 +00:00
Herb Derby
3c5b68efb7 Revert "Use common fallback code for drawing an SkGlyphRun"
This reverts commit b09131f476.

Reason for revert: May break android

Original change's description:
> Use common fallback code for drawing an SkGlyphRun
> 
> This reorganizes the code so that Mask, SDFT and Paths
> share calling the fallback code. It also orders the
> different drawing methods from most frequent to least.
> 
> Change-Id: I1bbfc92765682c6a20d59da34734f127a6d017cb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249558
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

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

Change-Id: Id56187503b0eb8a9bc666fbd5c8e0f07e1510c46
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249977
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-10-22 14:56:09 +00:00
Greg Daniel
901b98ec55 Add SurfaceProxyView support to Surface/TextureContext.
Bug: skia:9556
Change-Id: I8dfe0a053690acdfdc487cf478e20ea9595d0121
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249880
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-10-22 14:54:07 +00:00
Jim Van Verth
598741667a Enable Programs (formerly GLPrograms) test for other APIs
Bug: skia:9365
Change-Id: I2eeac4e628425411b0a8f9ffa94ad61d58254b77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249806
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-22 14:36:09 +00:00
Florin Malita
c7d1972686 [skottie] Site update
- add a 3D sample (https://skottie.skia.org/c16eee287f2cea44102b6670c66e60ab?h=500&w=500)
 - tweak the Skottie page title

No-Try: true
Docs-Preview: https://skia.org/?cl=249894
Change-Id: I0905d9144d367c4a58a06541ea213ba60140ffad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249894
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-22 14:27:47 +00:00
Florin Malita
587f7365d5 [skottie] Expose native frame rate and seekFrame() in WASM
Change-Id: I003ed90170abf287451a5df51a9aa54285236e63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249891
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-22 14:13:37 +00:00
Greg Daniel
a83de58450 Add GrSurfaceProxyView and add support for it on GrRenderTargetContext.
Bug: skia:9556
Change-Id: I681c364cef6867feb0ae06a53cd7d264d7163e35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249879
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-10-22 13:58:17 +00:00
Kevin Lubick
e25df6cf78 [canvaskit] Expose Malloc to save copies in some places
By adding in the check to copy1dArray, some places get the benefit
for free.

Change-Id: I12e230465737dc6276feb02ddb37e3c417777055
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249878
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-22 13:41:28 +00:00
skia-autoroll
f3f8ac37e4 Roll third_party/externals/angle2 4a80ba25e67b..5335faaece2a (2 commits)
4a80ba25e6..5335faaece

git log 4a80ba25e67b..5335faaece2a --date=short --no-merges --format='%ad %ae %s'
2019-10-22 jonahr@google.com Robust validate_step_info in generate_stats.py
2019-10-21 courtneygo@google.com Treat Pixel 2 XL and Pixel 2 the same

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

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 michaelludwig@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.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=michaelludwig@google.com
Change-Id: Id231105dc0055599ffadd65ed03c23b09ba60e62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249936
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-10-22 05:57:16 +00:00
skia-recreate-skps
4a152d340f Update Go deps
Change-Id: I99768a4e3cd11395a351c73e6a81cb66db6cc562
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249941
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2019-10-22 05:24:36 +00:00
skia-autoroll
618d7e7feb Roll third_party/externals/swiftshader 26c6c4a5eb83..23f9c25f60ee (2 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/26c6c4a5eb83..23f9c25f60ee

git log 26c6c4a5eb83..23f9c25f60ee --date=short --no-merges --format='%ad %ae %s'
2019-10-21 sugoi@google.com Enable support for Bresenham lines
2019-10-21 sugoi@google.com Fix queries with arrays containing other structures

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

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 michaelludwig@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.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
TBR=michaelludwig@google.com
Change-Id: Id59cecbb2340bf9fd03587c82fdee71c17d188af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249935
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-10-22 04:31:36 +00:00
recipe-roller
81e8d3b296 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/202c559cac64a2c85a7f5e2a20088766d56b9c41 depot_tools: Include httplib2 using vpython. (ehmaldonado@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I918bf2a1068bcc725cc0d4e1f0a8882b00e34356
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249922
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-10-21 23:21:20 +00:00
recipe-roller
8b03a6366e Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/62b68fec1b2c0dbe0e15a5d699790c2a5204956b Pin mac_toolchain to 9a1adc55bf4a1173784da3ba2f8cb06421606748 (lindsayw@google.com)
  https://crrev.com/75c59424e3f11c3e3741d7d574ade51df369a7af [fetch] use py3 for fetch (apolito@google.com)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I22ed19cb20734dfdd4692e05f0c0d27faee16d67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249887
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-10-21 22:20:30 +00:00
Florin Malita
94e1a52686 [skottie] fix clangtidy warning
TBR=
Change-Id: I4db02978edbf7d60693b18a7c661640a4ab05bf0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249885
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-21 21:27:40 +00:00