Commit Graph

47452 Commits

Author SHA1 Message Date
Mike Klein
8079eb633c fix unpremul()
Just a typo.  Rewritten to make premul vs. unpremul stand out more.

Change-Id: I6db425a97a1333a6c5d2e867115c7f77f73d0482
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280378
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-30 16:16:42 +00:00
Florin Malita
0147de41c4 [skottie] Lazy adapter sync
Expand the core animator logic to return whether the computed value is
changing on each tick.  Also rename tick/onTick -> seek/onSeek to better
reflect Skottie semantics.

This information allows us to skip adapter updates for static/hold
animation segments.

This effectively hoists some of the scene graph lazy-update logic to the
Skottie model level, and culls unneeded conversions (e.g. we were
converting ShapeValue -> SkPath on every tick, even when the shape was
not changing).

TBR=
Change-Id: I1ea4e19ae8f993d659826269de6b0465fec70189
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279816
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-03-30 16:06:02 +00:00
Brian Salomon
34ed73b038 Make memcmps in GrResourceKey::op== safe.
Previously the size of one of the keys was passed to memcmp.
It was incorrectly assumed that if the size mismatched in the
first word compared then the rest of the keys would not be
accessed.

Change-Id: I9850949c6b51d0d2fb6de53ed8d4dee5192826d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280356
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-03-30 16:04:12 +00:00
Brian Osman
713ac8a9fc Remove some legacy GN defines for Flutter
Flutter's code has been updated so these can all be removed

Change-Id: Id3b778158fce175efd23b80a1d1245106c848501
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279840
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-30 15:36:12 +00:00
Mike Klein
34b93045c6 don't run clang-tidy on third_party
This doesn't usually come up because third_party/ is mostly
only C code and clang-tidy only runs on C++ code, but it's
starting to matter as we roll in Dawn.

Change-Id: I52c64cd55281989dad837d6573c38e8b380861a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280329
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-03-30 15:26:32 +00:00
Mike Klein
45c7e70b20 way more p-> inference
We can infer the builder on any method that's got at least one I32/F32
argument.  That's basically everything but splat, uniform??, and load??.

This will let us write things like

   sqrt(x*x + y*y)

instead of

   p->sqrt(x*x + y*y)

Previously we had to inherit from skvm::Builder for that...
I think we can remove all that inheritance once I fill all this out.

To make the impl. terser, give I32/F32 an operator-> for their Builder.

Open question about whether to add operator>>?  operator<< is
unambiguous, but operator>> on I32 is probably just going to be
more confusing than sticking with shr and sra.

Change-Id: Id7f1334f87e2354c8733a93d510569df38ae861e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280318
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-30 15:08:42 +00:00
Brian Salomon
c18dad25e4 Remove GrCaps::isFormatTexturableAndUploadable
Instead separately check texturability and uploadability using existing
queries.

Also remove unused renderable param from onGetDefaultBackendFormat()

Change-Id: I8751e6d62263ddabd713c850beb788620a78bf10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279996
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-30 14:20:40 +00:00
Mike Klein
d0b568b529 remove negate()
negate(x) -> -x

Change-Id: I920b1abe473325309562ca29be6384bedd7e6a42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280317
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-30 13:54:10 +00:00
Mike Klein
47737a1233 remove inv()
inv(x) -> 1-x

Change-Id: If64591f4f3ce15eb487222f052fc4bd1bac97977
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280316
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-30 13:52:30 +00:00
Mike Klein
46de36f993 simpler immediates
That last patch was too ambitious: the existing logic is error-prone,
and to fix it would require implementing a whole side algebra for
immediates.  I don't really want to have a second side system, even if
we work out how to make it correct.

If instead we just require a few more splats, we can come up with a
simple sane system that at least can't blow up on you unexpectedly.

 - Strip F32/I32 back down to a Builder pointer and Val ID,
   but create F32a/I32a for use as method arguments that
   can auto-construct from an immediate or the normal type.

 - Add method overloads using F32a/I32a.

 - Add operators using F32a/I32a and int/float primitive types,
   guaranteeing there's at least one F32/I32 to get a Builder from.

 - To keep things simple, drop all the operator forward declarations.
   They're only needed for inline methods on Builder, and there
   are few enough of them that calling methods is fine.

 - TODO: some of the inline helpers become simple enough
   when written with operators they might not need to exist,
   e.g.  inv(x) -> (1-x).

Change-Id: I193b0e5bca5617ab564c769b916473434ad6d56d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280276
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-30 13:47:14 +00:00
skia-autoroll
e9bc857b39 Roll third_party/externals/angle2 f2bee3043a5e..1b2dd6f92a6b (18 commits)
f2bee3043a..1b2dd6f92a

git log f2bee3043a5e..1b2dd6f92a6b --date=short --first-parent --format='%ad %ae %s'
2020-03-28 timvp@google.com Vulkan: Refactor varying validation for separable programs
2020-03-28 timvp@google.com Vulkan: Move ProgramInfo/ShaderInfo to ProgramExecutableVk
2020-03-28 timvp@google.com Vulkan: Create TransformSpirvCode()
2020-03-28 timvp@google.com Vulkan: Make mVariableInfoMap a gl::ShaderMap<>
2020-03-28 timvp@google.com Vulkan: Only calculate variable locations once
2020-03-28 timvp@google.com Create the ProgramExecutableVk Class
2020-03-28 ynovikov@chromium.org Skip KHR-GLES31.core.shader_image_load_store.advanced-allMips-* tests
2020-03-27 jmadill@chromium.org Vulkan: Mask out Depth/Stencil RTs in feedback loops.
2020-03-27 timvp@google.com Vulkan: Move cached samplers/images and has*() to ProgramExecutable
2020-03-27 jmadill@chromium.org Fix feedback loop clearing detection.
2020-03-27 jmadill@chromium.org Update OWNERS information.
2020-03-27 jmadill@chromium.org Support masking out DS feedback loops in RenderTargetCache.
2020-03-27 geofflang@chromium.org D3D11: Serialize and deserialze mImage2DUniforms.
2020-03-27 timvp@google.com Create the ProgramExecutable Class
2020-03-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src acbf316040c3..cc481ef27631 (1 commits)
2020-03-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 2df8c71258de..99508c1ce389 (1 commits)
2020-03-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 443c2caa1714..55f01953d6e9 (1 commits)
2020-03-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 77090261dabc..02e15b249b12 (8 commits)

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

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/skia.primary:Build-Debian9-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: michaelludwig@google.com
Change-Id: I5335357194cb04ab024cf3d422b137196dcb6630
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280298
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-30 04:54:59 +00:00
skia-autoroll
de455de4df Roll ../src 2cb42d2f8146..af1924a67aab (483 commits)
2cb42d2f81..af1924a67a


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

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 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/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: michaelludwig@google.com
Change-Id: I8159db5dfb40d7b1fc5a9e8dd7aacbfc4928b9a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280296
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-30 04:53:29 +00:00
skia-autoroll
2af68a4c4d Roll third_party/externals/swiftshader 3ca41df3d3ba..1c29477aa06e (9 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/3ca41df3d3ba..1c29477aa06e

git log 3ca41df3d3ba..1c29477aa06e --date=short --first-parent --format='%ad %ae %s'
2020-03-29 capn@google.com Don't expose the sampling routine cache's mutex
2020-03-29 capn@google.com Create PowerVR targets if submodule already exists
2020-03-28 bclayton@google.com Regres: Generate coverage data on nightly runs
2020-03-28 bclayton@google.com Subzero Coroutines: Use ultra-low-level marl APIs
2020-03-28 bclayton@google.com Subzero: Ensure coroutines are same-thread.
2020-03-28 capn@google.com Rename constant cache to snapshot cache
2020-03-28 capn@google.com Add sampling routine documentation
2020-03-27 sugoi@google.com Fix Android.bp following the SPIRV-Tools update
2020-03-27 bclayton@google.com Regres: Switch to building with LLVM 10

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

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/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: michaelludwig@google.com
Change-Id: I6e6bc1e73065714cf4da98cea3c88aeb794fa318
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280297
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-30 04:43:29 +00:00
skia-recreate-skps
3aee4845b5 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: I1fb2acafb05c5072ec0c2500deb6695449829488
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280218
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-03-29 08:41:05 +00:00
skia-recreate-skps
611bbf4c16 Update Go Deps
Change-Id: I9775b892e1cd24994d00e82800ec096b82aba789
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280192
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-03-29 05:35:25 +00:00
Mike Klein
5b11a58c62 skvm::Builder friendliness improvements
It would be nice if we could use infix operators, and it would also be
nice if we could use literals instead of so many splats.

To make infix operators possible, we need to have each I32 / F32 struct
track its origin Builder, so that we know where to build the
corresponding operation when we encounter an infix operator.  E.g.

    struct F32 {
       Val      id      = NA;
       Builder* builder = ...;
    };

    ...

    static inline F32 operator*(F32 x, F32 y) {
        SkASSERT(x.builder == y.builder);
        return x.builder->mul(x,y);
    }

OK, that's great!  But then once we start churning out overrides to work
with literals, things get quite verbose, and it becomes easy to lose
track of which methods can take literals and which can't.  It'd be nice
to have some sort of way to automatically handle literals.

For that we notice that the F32 struct has 4 dead bytes anyway between
the Val and the Builder*... perfect space for a literal.

   struct F32 {
       Val      id      = NA;
       float    imm     = 0.0f;
       Builder* builder = nulltpr;
   };

Now we can operate under the convention that when builder == nullptr,
the F32 represents the value in `imm`, and when builder is set it is
the result of the instruction at `id`.

Then inside skvm::Builder, we'll look for F32's that are in that sort
of Builder-less imm state and resolve them to splats.  That's what id()
does, returning that `id` val.  I've renamed the field in the struct to
make sure I caught all the old uses of `.id`.

From there we make I32 and F32 much more locked down types, with three
public constructors: NA/false, immediates, and instruction values.

There's lots and lots and lots and lots and lots left to do both
removing splat()s and especially converting to infix.  I just tried
to get enough in here that proves it works.

luminance() has weird extra parens to preserve the order of evaluation,
but I don't see any reason not to drop them in a follow up.

Change-Id: If6889ec9ba1ecc23edb15361ccb2b2309be7a6b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279907
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-28 12:42:04 +00:00
skia-recreate-skps
277879e17b Update Go Deps
Change-Id: I45586c8a0c5fb56a7afb25b195a52f971bca28cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280181
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-03-28 05:35:36 +00:00
Ben Wagner
7363af8c51 Fix gcc 9 warnings.
GCC 9 warns about this pessimizing-move. It isn't clear why clang isn't
as well.

GCC 9 has a working redundant-move diagnostic. Clang has an old (C++11
style) redundant-move diagnostic which only warns when moving a
parameter. The GCC warning conflicts with Clang's
return-std-move-in-c++11, which we want to keep until we can drop
support for older compilers. So just disable redundant-move warnings
until we can remove return-std-move-in-c++11.

This change allows us to compile without warnings on gcc 9.3.0.

Change-Id: If21fcfb2944ce49e27fc84d40805752895ae68cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279958
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-03-27 23:00:54 +00:00
Brian Salomon
2f23ae6b8e Rename SkColorTypeComponentFlags to SkColorChannelFlags.
Precusor step for making this public and adding a method to
GrBackendFormat to query its channels.

Bug: skia:10078
Change-Id: I2d8fa6586721c35961bc328a15eef8e2ebd4406e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279422
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-27 21:48:41 +00:00
Mike Reed
c6b17ef292 all colorfilters but RT converted to skvm
Change-Id: I51a0b5cb9c14f44f3af9cd8748f4e1c866f3441c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280096
Auto-Submit: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-27 21:48:39 +00:00
Greg Daniel
ffa16148f6 Add GrD3DPipelineState class and setup vertex input information.
Change-Id: If918db1153f6b5bf7057e00f3d36113fc88d889d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279919
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-03-27 20:55:11 +00:00
Mike Reed
f36b37f828 onProgram for SkGaussianColorFilter, plus gm and bench
iMac Pro bench:
- RP:          167
- VM exp:      195
- VM quartics: 135

Change-Id: Ie8deb38f246b9ae7bbd35e59c3e7e66fc7c42de5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279918
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-27 20:41:20 +00:00
Chris Dalton
07e5b8f0ed Rename TessellatingPathRendererTests.cpp -> "Triangulating"
Change-Id: Ie0525d71bb8cc15da2ebe61821c92e213f8dd3c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279896
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-27 19:42:03 +00:00
skia-autoroll
edcc27ca6a Roll third_party/externals/swiftshader 02e15b249b12..3ca41df3d3ba (10 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/02e15b249b12..3ca41df3d3ba

git log 02e15b249b12..3ca41df3d3ba --date=short --first-parent --format='%ad %ae %s'
2020-03-27 bclayton@google.com Regres: Add llvm.Version.Download() to download and verify a LLVM toolchain
2020-03-27 bclayton@google.com Kokoro: Test LLVM 10 backend for ubuntu
2020-03-27 bclayton@google.com Coverage: Add 'turbo-cov': a faster reimplementation of llvm-cov
2020-03-27 capn@google.com Don't download all submodules for Kokoro tests
2020-03-27 bclayton@google.com Reactor: Disable more warnings to get LLVM 10 building
2020-03-27 bclayton@google.com LLVM 10: Add configs/common and configs/darwin.
2020-03-27 bclayton@google.com LLVM 10: Add configs/common and configs/linux.
2020-03-27 sugoi@google.com Update SPIR-V Tools to fd773eb50
2020-03-27 sugoi@google.com Update SPIR-V Headers to f8bf11a02
2020-03-27 digit@google.com Remove two minor compiler warnings/errors:

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

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 robertphillips@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-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: robertphillips@google.com
Change-Id: I52e1beb52b063e10c6f094b518024ea803453794
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279909
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-27 19:14:58 +00:00
Greg Daniel
f95a35fb70 Remove some unused 3 byte vertex attrib types.
These attrib types don't have equivalents in d3d12 and they are not used
so just deleting them.

Change-Id: Iff63525d36e0674847e07a13254f321c27aca7bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279864
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-03-27 18:18:32 +00:00
Robert Phillips
841c9a57a1 Make the distanceFieldAdjustTable a static singleton
There is little reason for the Text Ops to be carrying around a pointer to this.

Additionally, this removes creation and initialization of this table from the DDL recording text contexts.

Bug: 1056730
Change-Id: Ie28ec479c35e4d4412954aa4c0104c4eed6fca3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279837
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-27 18:03:06 +00:00
Jim Van Verth
5c693939c9 Minor fixes for D3D build.
Put static variable for GrManagedResource in its cpp file.
Properly initialize options2 struct.

Bug: skia:9935
Change-Id: I56853c8c99fe804225555b81bd796e713dd0ef05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279863
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-27 17:58:11 +00:00
Ben Wagner
bb786b6764 Fix gcc9 warning around size of memset.
GCC version 9 added a diagnostic about

‘memset’ used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]

In SkSLInterpreter.h, make it obvious to both the compiler and reader of
the code that the intention is to memset the first element of the array.

Change-Id: I9531eb220a39d3fc31e9faad3649f39204e74dc1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279861
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-03-27 17:44:01 +00:00
Chris Dalton
0a22b1e656 Rename GrGpuTessellationPathRenderer to GrTessellationPathRenderer
Change-Id: I3598ecab2e56b37a8d08b9da186c27f3cf709bfe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279245
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-27 17:37:23 +00:00
Nathaniel Nifong
32494ad12f Remove deprecated functions
MakeSkDashPathEffect, MakeLinearGradientShader, MakeRadialGradientShader, MakeTwoPointConicalGradientShader,
MakeSkCornerPathEffect, MakeSkDiscretePathEffect, Animation.seek

Change-Id: I07aad20b07bdf45f5c3ee4296a15c2b007570fa1
Docs-Preview: https://skia.org/?cl=278765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278765
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-03-27 17:13:58 +00:00
Mike Reed
ea1d105648 onProgram for overdraw-colorfilter
+ add Builder: min(I32), max(I32), gatherF()

Incidental bench timings (iMac Pro):
- RP:          350
- gatherF:     210
- unpack_8888: 187

Change-Id: I1d09f76206e89cd595a9e42c4b96bbf2f53ab86c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279736
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-27 17:02:26 +00:00
Brian Salomon
df1bd6dd0a Remove texture swizzle from GrSurfaceProxy.
Bug: skia:9556


Change-Id: I2c450c51e1a0987aacebdfcf32ef76cd31f0e80b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279656
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-27 17:01:07 +00:00
Brian Salomon
2cae3b05ea Fix TODO SkImage_GpuBase to check SkColorInfo and not a fake SkImageInfo
Change-Id: I4c495beb1c08fcb42c5ea06c3ba97dce0bdf39cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279841
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-03-27 16:46:21 +00:00
Ben Wagner
7345d88277 gn format gn/BUILD.gn
It wants a blank line before a comment, even though the comment isn't a
break.

Change-Id: I6a2988719942e5e72142b8484182c128392a4be8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279842
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
2020-03-27 15:50:09 +00:00
Brian Osman
ff0717f0a5 Re-generate source from FP files after clang-format change
Change-Id: Ifad098789fe381c15989ef0e5dd21d6b51dd8e50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279839
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-27 15:49:25 +00:00
Brian Osman
9a3ee1913a Remove arbitrary limit on number of composed color filters
This effectively reverts https://codereview.chromium.org/972153010/

Note that we have no such hard limit on SkShaders, and it's never
been a problem. Complex SkPaint objects can generate too many FPs
for us to handle, but those are rare, and better managed by just
reporting the shader compile error (which we do).

Change-Id: Iee5dc3d65ec130f2ce0a29e55fbe3c25b00dc828
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279836
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-27 15:01:32 +00:00
Brian Osman
e1bbfab135 Remove GrSRGBEffect
It was only used for the sRGB color filter, and GrColorSpaceXformEffect
works just as well.

Change-Id: I6727d2bf7cc60a876742b0dbd980d8ef40ae16fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278788
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-27 15:01:14 +00:00
Brian Osman
4132355fdc Disable BinPackParameters in .clang-format
We don't like this style, and it causes a bug (extra newline) when used
with ExperimentalAutoDetectBinPacking if named parameters have templated
types.

Change-Id: I8341591f10ed3bd2725c073b3e66a1f87713c04c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279838
Reviewed-by: Brian Osman <brianosman@google.com>
2020-03-27 14:32:40 +00:00
Ben Wagner
833313b21a Add back deprecated warnings.
Unfortunately in clang 'deprecated' is both a set of warnings (at least
one of which we don't want) and a group of warnings (most of which we do
want). Leave the top level disabled, but re-enable all the warnings in
the group.

Most of the code changes are for the deprecated-copy diagnostic. In
C++11 implementing a copy constructor xor copy assignment operator
the default implementation of the other is still required to be the
default but is deprecated (the compiler can warn against doing this).
The idea is that if there was a need for a non-default copy constructor
or copy assignment operator then both should be implemented explicitly,
since it is unlikely that the default will do what is expected.

Note that the deprecated-copy-dtor has not yet been enabled as there
will need to be a lot more work to enable this diagnostic. Similar to
deprecated-copy, in C++11 when implementing a destructor the copy
constructor and copy assignment operator are still defaulted if not
declared, but this is also deprecated. The idea here is that if some
special handling is needed to destroy the object there is probably some
need to do something non-trivial when copying the object (or copying
should be disallowed).

Also, there are still some deprecated-declarations to clean up on
Android and Mac.

Change-Id: I5fc4b62713220e6f7d3724fd7342b4c8c74a3c67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278916
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-03-27 14:18:49 +00:00
Xavier Phan
e29cdaf4c1 Add experimental support for svg text tag.
Change-Id: Ied72850ec98d5fe6d4263d91cb1dd89bd58b5ad1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274796
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-27 13:56:49 +00:00
Robert Phillips
360ec1898e Have GrFillRRectOp make use of the GrSimpleMeshDrawOpHelper
I'm not sure why this wasn't converted to using a GrSMDOH earlier.

Change-Id: Ie8b0e2ce3787dfef4459524eec671d769cacdb5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278465
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-27 12:37:35 +00:00
skia-recreate-skps
385de38b27 Update Go Deps
Change-Id: I0cb2d048cd71d1f6aea264bd990529ff5aedc3ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279762
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-03-27 05:32:57 +00:00
skia-autoroll
fb05cef3c0 Roll third_party/externals/angle2 6719f54ac7ce..f2bee3043a5e (6 commits)
6719f54ac7..f2bee3043a

git log 6719f54ac7ce..f2bee3043a5e --date=short --first-parent --format='%ad %ae %s'
2020-03-26 cnorthrop@google.com Capture/Replay: Implement more GLES entrypoints
2020-03-26 cnorthrop@google.com Roll glslang and Vulkan validation layers
2020-03-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-headers/src fb7f9c9bcd1d..0e78ffd1dcfc (1 commits)
2020-03-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src ff44f21a0178..acbf316040c3 (1 commits)
2020-03-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 540bdf92531d..77090261dabc (10 commits)
2020-03-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 1346dd5de119..fd773eb50d62 (4 commits)

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

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 robertphillips@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-Debian9-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: robertphillips@google.com
Change-Id: I972ba3f64891a0de91848e2c077efb30ac08227d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279758
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-27 04:54:07 +00:00
skia-autoroll
04bb973f68 Roll third_party/externals/swiftshader 77090261dabc..02e15b249b12 (8 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/77090261dabc..02e15b249b12

git log 77090261dabc..02e15b249b12 --date=short --first-parent --format='%ad %ae %s'
2020-03-26 bclayton@google.com third_party: Create scripts for updating spirv-[tools|headers]
2020-03-26 capn@google.com Fix taking aspect into account for image view identifiers
2020-03-26 bclayton@google.com Kokoro: Move llvm configs into 7.0 subdirectory, create 10.0 copies.
2020-03-26 bclayton@google.com Regres: Add support for generating collated coverage info
2020-03-26 bclayton@google.com CMake: Emit coverage-toolchain.txt file next to ICD json
2020-03-26 bclayton@google.com CMake: Add SWIFTSHADER_EMIT_COVERAGE option
2020-03-26 bclayton@google.com CMake: Add option for selecting LLVM version.
2020-03-26 bclayton@google.com Merge "Initial drop of LLVM 10 to third_party/llvm-10.0"

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

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 robertphillips@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-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: robertphillips@google.com
Change-Id: I52cdcc2f259157406c9293f6994b0946e7c0e651
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279756
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-27 04:50:07 +00:00
skia-autoroll
e4820e9d1c Roll ../src 16171704b6dc..2cb42d2f8146 (394 commits)
16171704b6..2cb42d2f81


Created with:
  gclient setdep -r ../src@2cb42d2f81

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 robertphillips@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: robertphillips@google.com
Change-Id: Id49d53985bdbdc7bb4a4b5733839d8fe52fc92a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279757
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-27 04:48:57 +00:00
Mike Klein
b3f96cadd7 implement matrix 0/1 todo
I figured I'd get this in while it was on my mind.

The first order pattern we're implementing here is

   return val == special_case ? p->splat(special_case)
                              : p->uniformF(uniforms->pushF(val));

which is, when we have a special case that we know skvm::Builder can
fold through, tell it about that by using splat() instead of a uniform.
That's exactly what we're doing for the bias column of the matrix;
adding zero will fold away into a no-op.

In the multiply we need to be a little more clever, because Builder will
not actually optimize x*0 into 0.  That's only true for most values, but
notably not inf/NaN.  So instead we do that folding ourselves, assuming
we won't encounter any inf/NaN color values (an untested assertion that
I trust you believe in).

smart_mad() is also a convenient place to test for 1*x+y -> x+y and
-1*x+y -> y-x.  skvm::Builder would do the first if we splatted the
1.0f, and I'm not sure about the second, but since we're optimizing
ourselves anyway, might as well handle all three in the same way.

Change-Id: I1733ef948268144df98d6f83cd455087ceab05e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279541
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-26 23:09:20 +00:00
Brian Osman
b883f7d719 Disable Processor tests on TecnoSpark3Pro
Like the Programs test, these fail randomly.

Bug: skia:9814
Change-Id: I4f3b6f2fc07db2cdc9ac580c224560bba4162788
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279616
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-26 21:47:21 +00:00
Mike Reed
97107464cd handle HSL case in HSLMatrix for skvm
Change-Id: I8316c0b813c93eb53eefd254f6e7db23295e7db5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279416
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-26 21:37:31 +00:00
Mike Reed
3e191dcfcb add bench for highcontrast-colorfilter
Change-Id: I1e8275de780c5db82a715edfa91ef3fd90228e44
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279516
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-26 20:58:40 +00:00
Florin Malita
bb7d95f0f0 [skottie] Cleanup: relocate Animator base class out of SkSG
Decouple animator semantics from the scene graph.

No functional changes, just shuffling code around.

TBR=
Change-Id: I9a4592c424d2f8eb45b1b5f3e1f4b885cfaff9f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279421
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-03-26 20:50:10 +00:00