Commit Graph

50259 Commits

Author SHA1 Message Date
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
skia-autoroll
d2f4008a52 Roll dawn from 076a4e58205d to fa4b74d479aa (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/076a4e58205d..fa4b74d479aa

2020-08-05 rharrison@chromium.org Remove temporary disabling of validation check
2020-08-05 tommek@google.com Fixing linear texture data validation on bytesPerRow

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: I54ce5e09580cf2a3e26d5eb53bafb43f29ff553f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308397
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:33:36 +00:00
Herb Derby
b72037527f Revert "Switch GN defs on Mac and iOS to use frameworks, take 2."
This reverts commit c5f8e7df81.

Reason for revert: This breaks CLion.

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>

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

Change-Id: I5479693596f9bb07686325489b58489e89f60c05
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308338
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-05 23:36:48 +00:00
Michael Ludwig
672c47689d Replace 'master' with 'top-level' or 'gradient'
Bug: skia:10570
Change-Id: I257380fda62d99c7c27efabf2105478d20f23c57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308336
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-08-05 22:02:06 +00:00
Mike Klein
2b8940ee5e remove SkRP-based runtime effects
The SkVM backend can draw all the existing GMs.
Image diffs look good.  Rough local perf changes:

    spiral_rt:            14.3ms ->  5.9ms w/o JIT, or 2.5ms w/JIT
    overdrawcolorfilter:   4.2       4.9*              2.6
    overdraw_canvas:      10.1       8.9               2.7
    runtimecolorfilter:    8.5       8.5               7.5

with one regression marked with a *.

Change-Id: Ib4f11422f3c2e8756960794a965385fa616ad8bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308193
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-05 21:08:05 +00:00
Mike Klein
be3ea68fee allow SkSpriteBlitter::setup() to fail
This lets us notice that an SkRasterPipelineSpriteBlitter failed to set
up its stages (e.g. an SkColorFilter it can't handle) and instead of
using a NullBlitter, give SkVMSpriteBlitter a chance, just like we do in
the non-sprite blitters.

This is arguably working around the SkSpriteBlitter helper abstract
class' limitations, and removing that intermediate to SkBlitter might
make things clearer in the end.  Notice how SkVMSpriteBlitter is an
SkBlitter directly, not an SkSpriteBlitter, and it gets all its
information at once rather than split between constructor and setup().
We could make all the sprite blitters like that.

Change-Id: I905c744fdcf7b76e8a62634e8d7eb96d9d0ed391
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308277
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-05 20:44:56 +00:00
Jim Van Verth
c5f8e7df81 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>
2020-08-05 20:38:35 +00:00
Michael Ludwig
6397e80437 Specify aa type of draw to the GrClip
Change-Id: I9ed98859814e462c63ab29b94f0365ccc57d2e9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307706
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-08-05 20:18:56 +00:00
John Stiles
3ae071e4ea Update SymbolTable::takeOwnership interface to improve type safety.
Previously, `takeOwnership` was overloaded to take Symbols or IRNodes.
However, Symbols themselves are a subclass of IRNode, so attempting to
call `takeOwnership` with any subclass of Symbol was considered
ambiguous. This was fixed by splitting the API into
`takeOwnershipOfSymbol` and `takeOwnershipOfIRNode`, letting the caller
decide explicitly rather than forcing the compiler to choose.

These APIs also returned their input back to the caller as
`const Symbol*` and `const IRNode*`, although generally the caller
actually wanted the object in its original type. This meant most uses
of the return type were immediately cast back to their actual type.
(Some callers accidentally stripped const as well, although it would be
wrong to mutate an object in the symbol table.) Added templates to
allow the input to be returned as its original type, and removed
the now-unnecessary casts.

The String `takeOwnership` call was updated to `takeOwnershipOfString`
for consistency with its peers.

Change-Id: Ib44a08097d89caec2c30deb4a25463330b7d2bf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307841
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-05 20:06:06 +00:00
Mike Klein
6d00de3ca9 allow SkRP color filters to fail
I think we decided at some point that we had implemented all existing
color filters with SkRasterPipeline, and then stopped checking for
appendStages() failure.  It's all still plumbed through, and I'd like to
start making some color filters fail to appendStage() and use
SkVMBlitter, at least some of the time.

Change-Id: I520151e7bfc01c4cf333a6ed515f27bee6cd55ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308195
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-05 19:58:25 +00:00
Brian Osman
4c97814f3a Fix SKP serialization when SK_DISABLE_EFFECT_SERIALIZATION is defined
We can still serialize things, but we have to rely on the type-name
code-path (because the factory methods don't exist).

Change-Id: I7a054b07168859154c691b9672e760e5b658ae50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308260
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-05 19:31:25 +00:00
Leon Scroggins III
f21d6b9b71 Reland "Add an SkImageGenerator that uses NDK APIs"
This reverts commit 07438b0cda.

Bug: skia:10369
Bug: skia:10371

This will allow Skia clients developing for Android 11+ to rely on
Android's NDK APIs for decoding, which will allow them to decode
without including their own decoding libraries (e.g. libjpeg-turbo).
Using these APIs also provides support for static HEIF images.

Run ImageGenSrc in kPlatform_Mode on Android to verify decoding
visually.

Add tests and a grayscale png.

Update some test bots running Android R to specify ndk_api so they will
run the new code.

Change-Id: I4ca07d832dbd6a9d8cff0faea975fd70da00718f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308185
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-08-05 18:55:30 +00:00
Jorge Betancourt
749149278c get rid of unused include
Change-Id: I4a93050696b5c474c3accf27f570664939b49552
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308196
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-08-05 18:48:47 +00:00
Robert Phillips
b7531c5c30 Simplify GrSmallPathRenderer::visitProxies
As noted at line 341, the SmallPathOp doesn't reliably know the
proxies that will be used by the atlas when visitProxies is called.
Deleting this code gives us a bit more flexibility for upcoming
refactorings.

Change-Id: I0292e750ed46c8555a75d1b5fa2710f1f616b70b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308220
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-05 18:16:26 +00:00
Mike Klein
0abd7276b8 remove overdrawcolorfilter_runtime
SkOverdrawColorFilter is already implemented in an
identical way to overdrawcolorfilter_runtime, so it's
kind of just testing two copies of the same thing.

Change-Id: I8d3b28649ae1c686633ba8e8e1017e8dc5100b3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308192
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-05 17:58:25 +00:00
Adlai Holler
2bc83187bf Remove staging API for SkImage::makeWithFilter
Chrome migration landed in CL 2335640

Bug: skia:104662
Change-Id: I787d7f469ff474bec1e7e2803cdd492e18821a6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308191
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-08-05 17:51:46 +00:00
Adlai Holler
f7129fc173 Migrate MakeFromAdoptedTexture to GrRecordingContext
This also follows up on the comments Rob left in his zombie review.

Bug: skia:104662
Change-Id: I7031f7b2832eb3f47025e5d269248b854cc912e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307780
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-08-05 17:47:25 +00:00
Mike Klein
813e8cc762 add a global may-we-JIT flag
The most interesting part of the CL is that we recheck gSkVMAllowJIT in
Program::eval() even though we've already checked it in the constructor.
This allows Viewer to toggle the JIT on and off without having to worry
about program caching. This is not something that you'd expect to come
up in practice if a program just sets gSkVMAllowJIT at the start of
main(); for real clients I think we can avoid all this with a simple
SkGraphics::allowJIT() that only lets clients opt-in, never back out.

I toyed with making '!' rotate through a tristate in Viewer, until I
realized that these really are independent bits: GMs like threshold_rt
that use both ordinary effects and SkVM-only effects demonstrate
different behavior and performance in all four modes.  So '!' continues
to toggle SkVMBlitter, and now '@' toggles the JIT.

I've left the test program default settings unchanged, with the JIT
enabled unless --nojit is passed.  Where we previously simplified the
command line by conflating --dylib with --skvm, we now conflate --dylib
with --jit.

Change-Id: If86bf524c657298c0846bcd33c706e3c3f91e788
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308184
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-05 16:35:45 +00:00
Greg Daniel
374b154d3b Don't allow transferring between special queues in vulkan in surface flush.
Incidentally this also adds the guard for the case where the request is
coming from GrContext::setBackendTextureState. I still thing the client
should be tracking what state requests go into the GrContext call so that
they are not requesting illegal transitions. However, it is easier to
make the fix here for surface that guards both then try to separate out
the two calls so that we only guard the surface version.

Bug: chromium:1108040
Change-Id: I5af0afe033eea55df19efb68f97a6a5aaa9f2da3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308178
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2020-08-05 16:16:05 +00:00
John Stiles
0e041baeaa Fix out-of-bounds array access discovered by fuzzer.
The root cause of this error is that Metal does not support upcasting
a small matrix into a larger matrix (I was unfamiliar with this GLSL
ability). Proper support in Metal for that type of cast will be added in
a followup CL. For now, this CL adds defensive bounds-checking to
placate ASAN.

Change-Id: Ieb0d6b14f9bc7ecc9ef6223364c606612dc79e43
Bug: oss-fuzz:22776
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308182
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-05 16:01:15 +00:00
Nathaniel Nifong
2000c64e2b Publish version 0.17.3
Change-Id: I08199a86f59e33ed87ee48b879b405f496d03f67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308166
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-08-05 15:23:05 +00:00
Leon Scroggins
07438b0cda Revert "Add an SkImageGenerator that uses NDK APIs"
This reverts commit cfef980939.

Reason for revert: Breaking Google3 roll

Original change's description:
> Add an SkImageGenerator that uses NDK APIs
> 
> Bug: skia:10369
> Bug: skia:10371
> 
> This will allow Skia clients developing for Android 11+ to rely on
> Android's NDK APIs for decoding, which will allow them to decode
> without including their own decoding libraries (e.g. libjpeg-turbo).
> Using these APIs also provides support for static HEIF images.
> 
> Run ImageGenSrc in kPlatform_Mode on Android to verify decoding
> visually.
> 
> Add tests and a grayscale png.
> 
> Update some test bots running Android R to specify ndk_api so they will
> run the new code.
> 
> Change-Id: Ica782339b2414d472ede0b61729a127ce41892a5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305689
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=djsollen@google.com,mtklein@google.com,scroggo@google.com,brianosman@google.com,reed@google.com

Change-Id: Ifed506a76a0ff5903d101c1bf7330d319b8376a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10369
Bug: skia:10371
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308180
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-08-05 14:42:51 +00:00
Ben Wagner
8c9830bc46 Use SkUniqueCFRef with CTTypesetterCreateLine
This is a 'Create' and returns a reference. Be sure to release the
reference.

Bug: skia:10542
Change-Id: If4ed7a37a43efe5f8f17a4a15a0f82cdae7d9276
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307795
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-08-05 14:19:29 +00:00
Leon Scroggins III
cfef980939 Add an SkImageGenerator that uses NDK APIs
Bug: skia:10369
Bug: skia:10371

This will allow Skia clients developing for Android 11+ to rely on
Android's NDK APIs for decoding, which will allow them to decode
without including their own decoding libraries (e.g. libjpeg-turbo).
Using these APIs also provides support for static HEIF images.

Run ImageGenSrc in kPlatform_Mode on Android to verify decoding
visually.

Add tests and a grayscale png.

Update some test bots running Android R to specify ndk_api so they will
run the new code.

Change-Id: Ica782339b2414d472ede0b61729a127ce41892a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305689
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-08-05 13:44:39 +00:00
skia-autoroll
e7b08e4876 Roll ANGLE from 709472c9dd0c to 6c873cfde957 (13 revisions)
709472c9dd..6c873cfde9

2020-08-05 xinyi.he@arm.com Disable RobustBufferAccessWebGL2ValidationStateChangeTest on Mali
2020-08-05 jmadill@chromium.org Vulkan: Redo Sampler Serials.
2020-08-04 jmadill@chromium.org Vulkan: Refactor ImageViewHelper serials.
2020-08-04 timvp@google.com Create empty //tools/android/md5sum/BUILD.gn
2020-08-04 ccameron@chromium.org macOS/ARM: Allow populating GPU based on AGXAccelerator
2020-08-04 syoussefi@chromium.org Vulkan: EXT_multisampled_render_to_texture2 support
2020-08-04 syoussefi@chromium.org Vulkan: Fix blit/resolve of mixed-samples framebuffers
2020-08-04 jonahr@google.com Suppress SurfacelessContext test on Android/NVIDIA
2020-08-04 cnorthrop@google.com Tests: Remove more optimizations from traces
2020-08-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 928b7b26bd73 to f881f08358b0 (2 revisions)
2020-08-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from b78f4b1518e0 to 92a71657fcba (1 revision)
2020-08-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from a0f1f5149d91 to a6d08c75d219 (1 revision)
2020-08-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 4568d8587998 to 74cc8ea2b8df (2 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC 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:1110408,chromium:1110421
Tbr: herb@google.com
Test: Test: angle_perftests --gtest_filter="TracePerfTest.Run/*nba*"Test: Test: gn gen out/Android
Change-Id: Id3c460176cb85f7fdf1959d4ffbba21b70ab1204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308057
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-05 05:08:39 +00:00
skia-autoroll
29332bf9bc Roll Chromium from be02bd1a2326 to b133b38aa4d3 (477 revisions)
be02bd1a23..b133b38aa4

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: I93013b097466de44453693e024607308ea065dd0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307954
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-05 04:41:59 +00:00
skia-autoroll
64691e3130 Roll SwiftShader from 74cc8ea2b8df to be7c55a2a8ce (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/74cc8ea2b8df..be7c55a2a8ce

2020-08-04 swiftshader.regress@gmail.com Regres: Update test lists @ 74cc8ea2
2020-08-04 dpranke@google.com Fix a Python3-compatibility issue for write_icd_json.py.

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: I684ec1216b14c7c25f71e88c52321424b47d9aa8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307955
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-05 04:37:59 +00:00
skia-autoroll
4f2d07f3c7 Roll dawn from 1ea3a22f521e to 076a4e58205d (4 revisions)
https://dawn.googlesource.com/dawn.git/+log/1ea3a22f521e..076a4e58205d

2020-08-04 rharrison@chromium.org Roll 6 dependencies and bypass changed API usage
2020-08-04 enga@chromium.org Implement depth-only/stencil-only copies on Vulkan and Metal
2020-08-04 jiawei.shao@intel.com Add tests for lazy initializing vertex and index buffers
2020-08-04 hao.x.li@intel.com Query API: Timestamp Query on D3D12

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang from 3ee5f2f1d331 to 2de6d657dde3
  https://chromium.googlesource.com/external/github.com/google/shaderc from cfacaaffd1fe to c626b912dc45

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: I8a873f9f0b081a18be3a8d95c03878122bc1c2e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308056
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-05 04:30:59 +00:00
Herb Derby
bfcf8c4832 simplify next allocation size
Since the fibonacci sequence is always multiplied by
fFirstHeapAllocationSize, change the names ofr fFib0 and
fFib1 to fNextHeapAlloc, and fYetNextHeapAlloc, and assign
both to be fFirstHeapAllocationSize. This will create the
same sequence of heap allocation sizes. Now
fFirstHeapAllocationSize is only used in reset(). This will
simplify CL/307348 which move reset to a different class.

Change-Id: I54da1980239645acd36992476915137dd68ab9da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307349
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-05 00:36:58 +00:00
Harry Terkelsen
10f019c506 [CanvasKit] Expose TypefaceFontProvider.
Change-Id: I950a3a4f45b7b4a106299576bc918531054b23f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307873
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-04 20:55:21 +00:00
Herb Derby
17d9caaf8c remove unused scale for direct masks
Using a direct mask, the pixels in the cache are in 1:1 correspondence to the device pixels.
There is no need to scale.

Change-Id: I7d3f48cfb44a51882370527401a3bd0d162d9e76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307875
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-04 20:36:58 +00:00
John Stiles
c461551ef2 Fix debug visualization for SkString.
This was broken by the addition of the sk_sp visualizer.

Change-Id: Ibf7519a8a2e0388275e543a1e5a69d942d50ed96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307867
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-04 19:52:38 +00:00
Ben Wagner
e426df96a1 Remove use of SK_IGNORE_MAC_OPSZ_FORCE
SK_IGNORE_MAC_OPSZ_FORCE should be removed since it is no longer defined
by any users.

Change-Id: Ib99082513292e55465131a42a7f676c5d1179113
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307863
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-04 19:43:38 +00:00
Julia Lavrova
093263ce45 Remove SK_PARAGRAPH_OLD_SPACE_RESOLUTION (staging changes done)
Change-Id: Ia67eb9055cb589c1ff73b5ac851a2c7b538c2575
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307790
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-08-04 19:35:38 +00:00
Brian Osman
f265afddf2 Remove bits of code related to sk_Args
AFAICT, there were two unrelated things happening here:

1) .fp files supported referencing class variables as if they existed in
   sk_Args. We never do this (they can be directly referenced).
2) When baking the values of 'in' variables into runtime SkSL, we
   generated intermediate 'Setting' objects that wrapped the literal
   values supplied by the user. Those Setting objects were named
   'sk_Args.<field_name>', even though this logic had nothing to do with
   the fake SkArgs type. In this case, the Setting objects don't appear
   to add any value, so just inject the literals directly (which is what
   constant propagation would do on the next iteration).

Change-Id: Ia54193c5282737653cf10b7aae77e38e5ab78c79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307793
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-04 18:53:03 +00:00