Commit Graph

50243 Commits

Author SHA1 Message Date
Brian Osman
a578138567 Revert "Untangle dependency cycle in sksl dehydration"
This reverts commit a1ed0dc9f8.

Reason for revert: Bots will need some guidance to ingest this CL

Original change's description:
> Untangle dependency cycle in sksl dehydration
> 
> NOTE: If you have any out directories with skia_compile_processors
> enabled, you will likely need to run `gn clean <dir>`
> 
> Explanation: The sksl standalone compiler is used to convert the raw
> (text) SkSL pre-includes into a "dehydrated" binary format. It also
> (previously) depended on those files, as they were #included and used,
> unless a special #define was changed. This created a dependency cycle
> that we hid from GN (by lying about the outputs of the dehydrate step).
> As a result, builds would never reach steady-state, because the compiler
> would be rebuilt (due to the newer dehydrated files), and then the
> dehydrated files would be rebuilt (due to the newer compiler).
> 
> This CL changes the logic so that the standalone compiler always uses
> the textual pre-includes, and no longer depends on the dehydrated binary
> files. Thus, to make any kind of change to the dehydrated files (whether
> due to pre-include changes, or the encoding format itself), you just
> need skia_compile_processors enabled. The dependencies are now honestly
> communicated to GN, and we reach steady state after one build.
> 
> The NOTE above is because GN/ninja cache the dependencies of each
> target, and will still think that the SkSLCompiler.obj linked into the
> standalone compiler depends on the dehydrated files, at least until one
> successful build, when it will realize that's no longer true.
> 
> Bug: skia:10571
> Change-Id: I246360cec387b17d017805ed42ab6424329e32e7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308760
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: Id0f3f6e18474f7531b8531cfa481031c26b88d51
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10571
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308802
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-07 21:28:27 +00:00
Ben Wagner
fc11fd4d0b Allow CoreText axis hidden value to be CFNumber.
Parts of CoreText use 'structured' CFDictionaries to pass information.
Because of the lack of explicit structure and very dynamic types, this
requires that every entry be checked for existence and type before use.
If the existence or type does not match expectations the code generally
returns a failure or default value.

In this case kCTFontVariationAxisHiddenKey is documented to be a
CFBooleanRef, but on macOS 11 Big Sur Beta 4 it can be a CFNumberRef
instead. Handle this case when it happens.

Bug: chromium:1113444
Change-Id: Id1ae31104e674d65eaa67166d2442ab4f63989cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308764
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-07 21:13:26 +00:00
Mike Reed
375721d7bb SkPathView for ownerless (can live on stack) SkPaths
Follow-on CLs will push higher up in SkDraw, so that everywhere today
we have to cons-up (with the associated mallocs) a temp SkPath we can
replace it with a stack-based SPath...
- drawRect
- drawOval
- drawRRect
- drawLine(s)
(similar to how this CL already handled quads and triangles)

Bug: skia:10566
Change-Id: I882b4f4c60e80235ca83c86c926e905b269a7afd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307784
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-07 20:39:38 +00:00
John Stiles
24a7f071ae Fix GrImprovedPerlinNoiseEffect::onIsEqual to compare properly.
The existing code doesn't compare `octaves` at all, and the code for
checking `z` compares it against itself.

Change-Id: I987b02e17cb66d195a299110e3429c114637123f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308766
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-07 20:38:33 +00:00
Brian Osman
a1ed0dc9f8 Untangle dependency cycle in sksl dehydration
NOTE: If you have any out directories with skia_compile_processors
enabled, you will likely need to run `gn clean <dir>`

Explanation: The sksl standalone compiler is used to convert the raw
(text) SkSL pre-includes into a "dehydrated" binary format. It also
(previously) depended on those files, as they were #included and used,
unless a special #define was changed. This created a dependency cycle
that we hid from GN (by lying about the outputs of the dehydrate step).
As a result, builds would never reach steady-state, because the compiler
would be rebuilt (due to the newer dehydrated files), and then the
dehydrated files would be rebuilt (due to the newer compiler).

This CL changes the logic so that the standalone compiler always uses
the textual pre-includes, and no longer depends on the dehydrated binary
files. Thus, to make any kind of change to the dehydrated files (whether
due to pre-include changes, or the encoding format itself), you just
need skia_compile_processors enabled. The dependencies are now honestly
communicated to GN, and we reach steady state after one build.

The NOTE above is because GN/ninja cache the dependencies of each
target, and will still think that the SkSLCompiler.obj linked into the
standalone compiler depends on the dehydrated files, at least until one
successful build, when it will realize that's no longer true.

Bug: skia:10571
Change-Id: I246360cec387b17d017805ed42ab6424329e32e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308760
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-07 20:34:33 +00:00
Robert Phillips
6507e63b51 Update how the GrSmallPathRenderer's cache entries are created and destroyed
The main thrust of this CL is to centralize creation and deletion
of the small path renderer's cache entries within the nascent
GrSmallPathAtlasMgr class.

It is pulled out of the omnibus CL:

https://skia-review.googlesource.com/c/skia/+/307776 (Split the small path renderer into record-time and flush-time pieces)

Change-Id: I13ccaca428e8c019540624dbcd0703540418f9a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308691
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-07 20:11:53 +00:00
Mike Klein
3f2ac36d79 split getPaint()
SkPictureData::getPaint() is now SkPictureData::optionalPaint(),
and it's got a sibling requiredPaint() that returns a const SkPaint&.

This means we don't have to remember to null check the paints,
and we can signal a bad .skp when a paint should be present but is
missing.  No way to know that for optional paints, of course; the only
part of that function I changed is its name.

Moved these methods out of line.   I never know how that interacts with
function local statics.  They're complex enough to move out anyway.

PS3 implements requiredPaint() with optionalPaint(), I think clearer.

Change-Id: If8ef479262faa80be65eb98e2aef8b769cfa8aa6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308763
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-07 20:05:33 +00:00
Ben Wagner
63a1a83098 More verbose CoreText structure checks
Parts of CoreText use 'structured' CFDictionaries to pass information.
Because of the lack of explicit structure and very dynamic types, this
requires that every entry be checked for existence and type before use.
If the existence or type does not match expectations the code generally
returns a failure or default value. This changes the code to be more
verbose in debug builds, more explcitly stating the unexpected state.
We never expect any of these messages to ever be seen; the conditions
that are reported are almost asserts but when they happen the worst that
happens is that a font looks slightly different so for not these seem to
be slightly less than asserts.

Note that ctvariation_from_skfontdata isn't modified here since it is
legacy and will only be used in relation to older skps.

Bug: chromium:1113444

Change-Id: I99f531488d2c1eec70bb5e27304356866ed36682
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308513
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-07 19:09:23 +00:00
Herb Derby
6e2c56fefc move SkArenaAlloc reset to its own class
SkArenaAlloc has three fields that are used only for reset. Make a
subclass called SkArenaAllocWithReset which has the three
fields, and has the reset functionality.

An example of a reset() that is used instead of using a better scope
is PathOpsAngleAfter in PathOpsAngleTest.cpp.

Change-Id: Ie1965d128dfb7df9e022f4d18460d3f75f33e1a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307348
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-07 18:48:53 +00:00
Mike Klein
51f2c15276 check SkPictureData::getPaint()
In this file all callers of getPaint() that require a non-null SkPaint
pointer must check it; SkPictureData::getPaint() returns nullptr in
ordinary operation to encode missing optional SkPaints.

Bug: oss-fuzz:24732
Change-Id: I8a36617955de640c015cf113404779b98ea5d78c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308657
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-07 18:46:06 +00:00
John Stiles
de240ac4dd Revert "Disable the coverage-as-alpha optimization flag for the Bicubic effect."
This reverts commit b3231b1526.

Reason for revert: rationale for disabling the optimization doesn't hold water

Original change's description:
> Disable the coverage-as-alpha optimization flag for the Bicubic effect.
> 
> As of http://review.skia.org/303026, the Bicubic effect no longer
> modulates by its input color.
> 
> Change-Id: I57d0a9fe89271cae3f28b508184190319d863373
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305783
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=brianosman@google.com,johnstiles@google.com

Change-Id: I83cbe4e8f34ad573ab730223e5b411f6578bb25d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308756
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-08-07 18:41:24 +00:00
Brian Osman
3e8fae7193 Revert "Add inline threshold to SkSL::Program::Settings"
This reverts commit ad3db40d78.

Reason for revert: Chrome doesn't like static initializers.

Original change's description:
> Add inline threshold to SkSL::Program::Settings
> 
> Keep the same default value, but add a (private) API to change it when
> compiling SkRuntimeEffect code.
> 
> Use the new API to improve fuzzer coverage, by fuzzing with inlining
> disabled and (enthusiastically) enabled.
> 
> Change-Id: I36424bac95144aeb727cfb949754fbe998d5d7de
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308181
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

TBR=kjlubick@google.com,brianosman@google.com,ethannicholas@google.com

Change-Id: Ic233203f3728a7285a1958c53567d915e56023af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308757
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-07 18:09:49 +00:00
John Stiles
ec9b4aab87 Enable ClangTidy check readability-const-return-type.
https://clang.llvm.org/extra/clang-tidy/checks/readability-const-return-type.html

`const` on a non-pointer/reference return type typically doesn't add
value and can have negative side effects. (i.e., returning a
`const std::string` isn't meaningfully different from returning a
`std::string`, but can sometimes inhibit move-related optimizations.)

In Skia's case, the priv() functions are a notable exception where const
return types are intentional and valuable. These calls have been marked
with NOLINT to exclude them from the check.

This check does not affect pointer and reference returns, where
constness is important.

Change-Id: I86cab92332f164e5ab710b4127182eec99831d7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308564
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-07 17:42:38 +00:00
John Stiles
3977088e23 Enable ClangTidy check readability-static-accessed-through-instance.
Our codebase generally tends to avoid this pattern naturally, and this
can catch real mistakes, e.g. http://review.skia.org/308659

https://clang.llvm.org/extra/clang-tidy/checks/readability-static-accessed-through-instance.html

Change-Id: I3b37ab6242bcca310bbbec718facdd8687f9c4ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308658
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-07 16:57:17 +00:00
John Stiles
efc17ce2ca Fix bug in SkMipmapCache::AddAndRef factory selection.
Discovered via ClangTidy `readability-static-accessed-through-instance`.

Change-Id: I646e3293853e65b5cc2419c8687c035aab4b669a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308659
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-07 16:42:37 +00:00
Brian Osman
871aa74797 Add support for children to runtime color filters
Like shaders, sampling a null child will return the input color (in
this case, the output of the skia shader stage). This gives us a path
to removing the implicit input color passed to main, which is the real
goal. Using this to create more interesting color filters is also
possible, although we need to add the versions of sample() that take a
color to really unlock the potential.

Change-Id: I6a7506055120756497d7583f14d6f928180825fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308515
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-08-07 14:50:36 +00:00
Florin Malita
8bfe39160d [skottie] Add animation in/out point getters
We already expose frame-index-based seek methods, makes sense to also
allow querying the in/out points.

Change-Id: I3b805f6df3484c8bdc7cd6c81e54b5073710e222
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308598
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-07 14:47:26 +00:00
Brian Osman
ad3db40d78 Add inline threshold to SkSL::Program::Settings
Keep the same default value, but add a (private) API to change it when
compiling SkRuntimeEffect code.

Use the new API to improve fuzzer coverage, by fuzzing with inlining
disabled and (enthusiastically) enabled.

Change-Id: I36424bac95144aeb727cfb949754fbe998d5d7de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308181
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-08-07 14:45:06 +00:00
Mike Klein
3b08f35fd1 deserialize SkFilterQuality safely
We've got a bespoke method just for this!
How convenient is that?

Bug: oss-fuzz:24723
Change-Id: Iec7ddad3bdf1b9eaf29aeb26699e1f2a41087491
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308563
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-07 13:47:45 +00:00
Mike Klein
045adb564e Revert "Reland "Switch GN defs on Mac and iOS to use frameworks, take 2.""
This reverts commit 943463f60e.

Reason for revert: Flutter

Original change's description:
> Reland "Switch GN defs on Mac and iOS to use frameworks, take 2."
> 
> This is a reland of c5f8e7df81
> 
> Original change's description:
> > Switch GN defs on Mac and iOS to use frameworks, take 2.
> > 
> > GN will be removing support for frameworks in the libs variable, so
> > might as well get ahead of it.
> > 
> > Change-Id: I990ffdb945c85a9868883d0cab1c2bdcdbdf545c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308189
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> 
> Change-Id: Ie93c4b6a5e82bd61738367c68c2a2bac7bdf23f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308199
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=mtklein@google.com,jvanverth@google.com,herb@google.com,senorblanco@google.com

Change-Id: Iee06d5e787643643b0f2b206a7cfa2643de25f8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308597
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-07 12:26:27 +00:00
skia-autoroll
2cc251fd9b Roll ANGLE from bedac4f06b5c to 3831ac2043e4 (14 revisions)
bedac4f06b..3831ac2043

2020-08-07 syoussefi@chromium.org Remove suppressions for passing tests
2020-08-07 geofflang@google.com Supress VVL error about multi-instance heaps.
2020-08-07 jmadill@chromium.org Vulkan: Rename CommandBuffer get method.
2020-08-07 jmadill@chromium.org Vulkan: Remove redundant vk prefixes in vk_helpers.
2020-08-07 syoussefi@chromium.org Fix an OOB access bug with RewriteRowMajorMatrices
2020-08-06 jmadill@chromium.org Vulkan: Add Image serial.
2020-08-06 jmadill@chromium.org Vulkan: Accumulate Buffer barriers.
2020-08-06 jmadill@chromium.org Vulkan: Add command buffer performance counter.
2020-08-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 4b40207be32d to b2be8f165978 (32 revisions)
2020-08-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from bfe4f378aee6 to ef36eedb0d09 (1 revision)
2020-08-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 8bc27a1cfbc1 to 5fd92a7e0c84 (5 revisions)
2020-08-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from a4505d37ffe7 to a1c21580f50b (1 revision)
2020-08-06 timvp@google.com Get storage buffers/images from ProgramExecutable
2020-08-06 syoussefi@chromium.org Vulkan: Fix ImageHelper's move constructor

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 herb@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
Tbr: herb@google.com
Test: Test: SimpleStateChangeTestES31.InvalidateThenStorageWriteThenBlendPpoTest: Test: VertexAttributeTestES31.UsePpoComputeShaderToUpdateVertexBuffer
Change-Id: I40cd3b9f52286aeb23abf31c007a688d5e785eec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308582
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-07 06:35:04 +00:00
skia-autoroll
30edd32029 Roll Chromium from 69b685d4bfd2 to 2acf87cc82a2 (445 revisions)
69b685d4bf..2acf87cc82

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 herb@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary: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
Tbr: herb@google.com
Change-Id: I34f5e4abadaa8bca0eeba403068fc1f638d3f1af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308579
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-07 04:58:54 +00:00
skia-autoroll
3e0d34a75b Roll SwiftShader from be7c55a2a8ce to a202c209bc91 (6 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/be7c55a2a8ce..a202c209bc91

2020-08-06 capn@google.com Refactor discerning image view types
2020-08-06 capn@google.com Don't use 2D coordinates for 1D sampling
2020-08-06 capn@google.com Specialize 1D sampling LOD calculation
2020-08-06 capn@google.com Treat the array coordinate separately
2020-08-06 capn@google.com Refactor sampling code
2020-08-06 capn@google.com Zero out texel index after sample and layer offset

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 herb@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: herb@google.com
Change-Id: Iddd886bc3bcc54dd6a233b2ce81016d82589298e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308580
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-07 04:36:54 +00:00
skia-autoroll
ea70694da8 Roll dawn from fa4b74d479aa to 2cf5a08cfc1b (1 revision)
https://dawn.googlesource.com/dawn.git/+log/fa4b74d479aa..2cf5a08cfc1b

2020-08-06 enga@chromium.org Track depth/stencil aspects independently

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

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: Ie55c41ca717b68521e2b89f7b286ff1db48a87fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308581
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-07 04:29:34 +00:00
John Stiles
b35c3b8bcd Replace unimpl comments with = delete.
A handful of `unimpl`ed copy constructors were actually supplied as
{} instead of being left unimplemented, but they were not actually used.

Change-Id: I9b88173aeb0cc87f793ee40dfba1b5e5a06d7497
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308565
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-07 00:40:12 +00:00
John Stiles
b3231b1526 Disable the coverage-as-alpha optimization flag for the Bicubic effect.
As of http://review.skia.org/303026, the Bicubic effect no longer
modulates by its input color.

Change-Id: I57d0a9fe89271cae3f28b508184190319d863373
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305783
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-08-06 21:48:12 +00:00
Brian Osman
c262a12453 Fix IWYU error in metal-code generator, re-gen dither effect
Change-Id: I3b8c59000a1c3cdc37f0c1d40dcc5304b8a5fc98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308557
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-06 21:34:02 +00:00
Nathaniel Nifong
2c4a07d925 allow external files in canvas_perf.js tests
Change-Id: Id4d143605bfa73672130c839cf54eec2b23217d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308233
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-06 20:27:32 +00:00
Robert Phillips
155436861b Fix parameter evaluation order bug in DDLPromiseImageHelper
Change-Id: Ib509a55c488bab1df49e24e662c56fd2343bd64b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308427
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-06 20:20:02 +00:00
John Stiles
9b01c9c53f Update the DitherEffect @test to ensure non-zero dithering.
If the dither amount is zero, Make() returns the input FP, which might
be null. This change ensures we always actually get a dither effect FP
back.

Also updated dumpInfo() to report the FP's name if the subclass doesn't
override it, since most don't.

Change-Id: Ia1d22edceb111c33a803f1f90ab04d072c24370d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308511
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-06 19:59:17 +00:00
Jim Van Verth
5e9659579e Fix unaligned pointer warning on iOS.
Splits the array of ColorRec structs into two separate arrays.

Change-Id: I6ec5e691b4535f3900ccb7e53eca84626ae7949f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308187
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-06 19:49:31 +00:00
John Stiles
fcf8cb2078 Implement matrix casting in Metal.
Unlike GLSL/SkSL, Metal does not natively support casting an array from
one size to another; we need to synthesize a helper function which will
assemble a new matrix from the values in the old matrix and the
identity.

Previously, our matrix-conversion helpers understood how to glom
together an arbitrary collection of scalars/vectors/matrices into a
matrix containing a matching number of scalars, but it would fail when
given a matrix of unequal size.

Change-Id: I35eb161ed7c17b982b00ecceb7b525cbfb8f3bcb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308190
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-06 19:22:51 +00:00
Ethan Nicholas
b33fa3f7d2 simplified SkSL REHYDRATE=0
Change-Id: I653716df5e93dc5c520309729712a78e750a2790
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307696
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-08-06 19:14:21 +00:00
John Stiles
a6841be235 Enable ClangTidy check llvm-namespace-comment.
This fixes a large number of SkSL namespaces which were labeled as if
they were anonymous, and also a handful of other mislabeled namespaces.
Missing namespace-end comments have been added throughout.
A number of diffs are just indentation-related (adjusting 1- or 3-
space indents to 2-space).

Change-Id: I6c62052a0d3aea4ae12ca07e0c2a8587b2fce4ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308503
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-06 19:07:52 +00:00
Brian Osman
269b21c501 SkRuntimeEffect: Apply uniform transforms in color filters, too
We were only respecting this feature in runtime shaders. Note that use
of any tagged matrices will cause color filter creation to fail, but
color transformation is a totally sensible thing to want in a color
filter.

Change-Id: I482226b287ab794cb341367fce453381cb581966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308507
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-06 18:46:17 +00:00
Weston Tracey
19c3850508 [infra] iPad 13.6
Change-Id: I9bdd06efaac72b2354ba4335b5a81e4a38e8889d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308179
Commit-Queue: Weston Tracey <westont@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-08-06 18:41:27 +00:00
Weston Tracey
9dd293ca5f [infra] Add new provisioning profile including 4 new ipad UIDs.
TBR=jcgregorio

Change-Id: I37cf58d29ec45b6c64bc2c224ba1263aae498980
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308502
Reviewed-by: Weston Tracey <westont@google.com>
Commit-Queue: Weston Tracey <westont@google.com>
Auto-Submit: Weston Tracey <westont@google.com>
2020-08-06 17:46:57 +00:00
Adlai Holler
74b83a4ea9 Revert "Migrate SkImage::MakeFromTexture to GrRecordingContext"
This reverts commit daa9e7455d.

Reason for revert: Broke Build-Debian9-Clang-arm-Release-Flutter_Android_Docker

Original change's description:
> Migrate SkImage::MakeFromTexture to GrRecordingContext
> 
> Android migration landed in Android CL 12234077
> Chrome migration is landing in Chrome CL 2335812
> 
> Note: makeFromCompressedTexture is not used by Chrome.
> 
> Bug: skia:104662
> Change-Id: Ibbe6d412cf22e87188926383d10b21f780208e48
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305102
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Auto-Submit: Adlai Holler <adlai@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com

Change-Id: I570945521c6cd78dfeea81e492b7e2b31dd0e6f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:104662
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308505
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-08-06 17:25:09 +00:00
Adlai Holler
ae04cc9099 Revert "Migrate MakeCrossContextFromPixmap to GrDirectContext"
This reverts commit 066f7d6b1a.

Reason for revert: Cant land until flutter PR 20235 reaches g3

Original change's description:
> Migrate MakeCrossContextFromPixmap to GrDirectContext
> 
> This function isn't used by Chrome so we migrate directly.
> Flutter migration is at https://github.com/flutter/engine/pull/20235
> 
> Bug: skia:104662
> Change-Id: I9d875acdbd162f50a6d86b3a4cae3f400e4dd38f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305180
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com

Change-Id: I100a87075ffdf5c0cda78c95f1cfe3310f97630e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:104662
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308501
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-08-06 16:17:28 +00:00
Brian Osman
92aac1e1b3 Disallow runtime effect color filters that depend on position
Some of these checks are currently redundant (we don't allow color
filters to have children right now). But the next CL will re-add that
capability, and the unit tests here will ensure we don't re-break things
by allowing child-sampling to violate the color filter invariant.

Change-Id: I54c10d8b1d1e376c13347296765185d42b9f644a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308285
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-06 16:06:47 +00:00
Herb Derby
70df33d24e use a single point as DirectMaskSubRun's vertex data
For direct masks, the rectangle passed through the SubRun and the rectangle in the atlas have
the same dimensions. This information is redundant. Instead of passing the glyph origin in pos,
pass the top left corner of the glyph. In onPrepare, use the dimension information to produce the
entire glyph bounding box.

Change-Id: I135d4a144366b39560742797572641e96fe482df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307842
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-06 15:08:57 +00:00
Robert Phillips
76e7a7f7c5 Begin wrapping GrSmallPathRenderer atlas accesses
Eventually the small path renderer will have an atlas manager it
can only access through the flushState.

This is heading towards:
https://skia-review.googlesource.com/c/skia/+/307776 (Split the small path renderer into record-time and flush-time pieces)

Change-Id: Ie8ad7d421575548294c78dcb4623cb465952a07e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308281
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-06 14:58:47 +00:00
Jim Van Verth
943463f60e Reland "Switch GN defs on Mac and iOS to use frameworks, take 2."
This is a reland of c5f8e7df81

Original change's description:
> Switch GN defs on Mac and iOS to use frameworks, take 2.
> 
> GN will be removing support for frameworks in the libs variable, so
> might as well get ahead of it.
> 
> Change-Id: I990ffdb945c85a9868883d0cab1c2bdcdbdf545c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308189
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Change-Id: Ie93c4b6a5e82bd61738367c68c2a2bac7bdf23f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308199
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-08-06 14:56:36 +00:00
Mike Klein
81b276ea98 add SkGraphics::AllowJIT()
Change-Id: I82aeea670c19e08e51ddc094f66f41244e4f5ec8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308497
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-06 14:38:26 +00:00
Adlai Holler
daa9e7455d Migrate SkImage::MakeFromTexture to GrRecordingContext
Android migration landed in Android CL 12234077
Chrome migration is landing in Chrome CL 2335812

Note: makeFromCompressedTexture is not used by Chrome.

Bug: skia:104662
Change-Id: Ibbe6d412cf22e87188926383d10b21f780208e48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305102
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-08-06 14:02:56 +00:00
Adlai Holler
066f7d6b1a Migrate MakeCrossContextFromPixmap to GrDirectContext
This function isn't used by Chrome so we migrate directly.
Flutter migration is at https://github.com/flutter/engine/pull/20235

Bug: skia:104662
Change-Id: I9d875acdbd162f50a6d86b3a4cae3f400e4dd38f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305180
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-06 14:00:57 +00:00
Mike Klein
0d6f81593b iwyu fixes for VS 16.7's STL
This lets us build with the STL from the new Visual Studio 16.7 release,
https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes#16.7.0

Specifically, I think this is from STL updates,
https://github.com/microsoft/STL/wiki/Changelog#vs-2019-167

Probably this one,

    <array> no longer includes <algorithm>, <iterator>, and <tuple>; this is
    a source-breaking change for projects that weren't strict about
    including what they use. #482

Change-Id: Id95a7966c636b70b56522bc80e6daa626749e916
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308496
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-06 13:45:07 +00:00
Robert Phillips
34949e35f0 Pull ShapeData into its own header file and rename to GrSmallPathShapeData
This is just a mechanical cut & paste.

When the atlasing is separate from the small path renderer both the
atlas manager and the path renderer need to share these objects.

This is pulled out of the omnibus CL:

https://skia-review.googlesource.com/c/skia/+/307776 (Split the small path renderer into record-time and flush-time pieces)

Change-Id: Ibae9d785fa8a3934fa81f9e98d7e1027d48dc5a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308276
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-06 12:12:16 +00:00
skia-autoroll
7a171cca0c Roll ANGLE from 6c873cfde957 to bedac4f06b5c (13 revisions)
6c873cfde9..bedac4f06b

2020-08-06 syoussefi@chromium.org Move EXT_external_objects validation to validationESEXT.cpp
2020-08-05 timvp@google.com Vulkan: Don't always end the render pass when updating the scissor
2020-08-05 ynovikov@chromium.org Make roll_chromium_deps executable
2020-08-05 ynovikov@chromium.org Rename roll_deps to roll_chromium_deps
2020-08-05 syoussefi@chromium.org Vulkan: Support ANGLE_external_objects_flags
2020-08-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 74cc8ea2b8df to be7c55a2a8ce (2 revisions)
2020-08-05 syoussefi@chromium.org Add back glslang include check
2020-08-05 syoussefi@chromium.org Entry points for ANGLE_external_objects_flags
2020-08-05 syoussefi@chromium.org Spec language for ANGLE_external_objects_flags
2020-08-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 92a71657fcba to 8bc27a1cfbc1 (3 revisions)
2020-08-05 timvp@google.com Roll chromium_revision fb6cbaf6e5..ed7912a248 (790363:794870)
2020-08-05 jmadill@chromium.org Vulkan: Squash Texture+ImageView Serial and improve caching.
2020-08-05 nguyenmh@google.com Batch capture run + change how results are logged

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 herb@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: chromium:1104516
Tbr: herb@google.com
Test: Test: CQ
Change-Id: I0fffe515042cf25559ac2222d2554eb8419c305a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308417
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-06 05:58:56 +00:00
skia-autoroll
1362c1eac4 Roll Chromium from b133b38aa4d3 to 69b685d4bfd2 (479 revisions)
b133b38aa4..69b685d4bf

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 herb@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary: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
Tbr: herb@google.com
Change-Id: Icdce962e689df01bc014194a6102d1761c290695
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308396
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-06 04:47:26 +00:00