Commit Graph

44980 Commits

Author SHA1 Message Date
Brian Osman
7df14d0557 YUV Cleanup: Trim comments, derive Cr/Cb from Kr/Kb
The conversion math for a given space can be fully derived
from the Kr and Kb terms (plus the headroom/footroom), so
avoid redundant values that can be wrong.

And, no need to list every possible value of an enum param,
especially when the generated doxygen links to the type's
documentation, which has all the values listed.

Change-Id: I64ce8cfd5ec7ff74dc3b878202b13d0d483e1db6
Bug: skia:9543
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251764
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-10-30 17:19:16 +00:00
Herb Derby
7820da3db5 Use shifts for all fields in SkPackedGlyphID
This should allow the bit field positions to be moved
around in the SkPackedGlyphID.

Change-Id: I85390f594a017b9df779f0a12e1f24c4d9e077dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251761
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-10-30 16:26:16 +00:00
Chris Dalton
8a64a44244 Rename sampleVariablesSupport() to sampleMaskSupport()
We have only implemented support for the sample mask. This CL renames
the cap to reflect that.

It also replaces sampleVariablesStencilSupport() with the more aptly
named canOnlyUseSampleMaskWithStencil(), to make it more clear that
this is a driver workaround.

Change-Id: Ibf54092c63181232fb3b94cad7ddb16e3a15e3d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251580
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-10-30 16:20:47 +00:00
Herb Derby
a9ac8a51fd Change uses of code to glyphID
Change-Id: I596bf0be9bf479a26f7bd00bea3c431b534164ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251758
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-10-30 15:19:16 +00:00
Stephen White
3cc8d4fb7f Dawn: s/dawn::/wgpu::/g.
The new webgpu_cpp.h hotness for native apps brings with it a new
namespace: wgpu. This is a straight substitution.

Note: no Skia API changes.
Change-Id: I12b26417e76838cd8fa2b39b8161cbaa2cd8fa78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251660
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-10-30 14:29:46 +00:00
Stephen White
d2baa3d0f8 Dawn: roll to ToT.
Change-Id: Iaf6b4ba01ae208b28167cafbd19a5d0958b30aaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251659
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-10-30 14:29:26 +00:00
Robert Phillips
bbd459d82c Allocate all vertex data in one go w/in GrTextureOp
This will hopefully reduce the overhead of prePreparing the vertex data (i.e., only one memcpy to use the precomputed data) and set us up for using the full extent of the index buffers.

Note this CL also contains a refactoring to share more code between onPrePrepareDraws and onPrepareDraws (i.e., the FillInData method).

Change-Id: Ia0e482332c8108e24b82743b82fdf53840c9b009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250800
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-30 14:18:16 +00:00
Jim Van Verth
7da048b5e8 Use texture for shadow falloff
Bug: b/142333639
Change-Id: I5c5bf4da0e2bb5f1b4233681dee305cf381c3e2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250096
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-10-30 13:40:16 +00:00
skia-autoroll
ebdae11449 Roll third_party/externals/angle2 95a736bd3347..bb35bb4e5379 (18 commits)
95a736bd33..bb35bb4e53

git log 95a736bd3347..bb35bb4e5379 --date=short --no-merges --format='%ad %ae %s'
2019-10-29 jmadill@chromium.org Vulkan: Implement simple case ANGLE_get_image.
2019-10-29 tobine@google.com Fix Renderbuffer support for unsized DS formats
2019-10-29 courtneygo@google.com Update docs for recent dEQP / VK-GL-CTS update
2019-10-29 courtneygo@google.com Print the testConfig in dEQP tests.
2019-10-29 ianelliott@google.com Vulkan Android: Remove support for EGLConfig's with GL_RGB10_A2 & GL_RGBA16F
2019-10-29 courtneygo@google.com Roll dEQP to VK-GL-CTS
2019-10-29 timvp@google.com Vulkan: Enable forceOldRewriteStructSamplers for all Android ICDs
2019-10-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src ec12de913124..42f885238114 (3 commits)
2019-10-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 1737a30e3e34..f8f6103eb89f (2 commits)
2019-10-29 jmadill@chromium.org Vulkan: Clean up redundant vk:: prefixes.
2019-10-29 jmadill@chromium.org Vulkan: Move readPixels logic to ImageHelper.
2019-10-28 mmynttinen@mozilla.com Fix MinGW include: s/VersionHelpers.h/versionhelpers.h/
2019-10-28 jmadill@chromium.org Plumb more logic for ANGLE_get_image.
2019-10-28 jmadill@chromium.org GN: Don't expose glslang when unused.
2019-10-28 jmadill@chromium.org Don't cc angle-team on Chromium DEPS rolls.
2019-10-28 jmadill@chromium.org Fixups to ANGLE_get_image boilerplate.
2019-10-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader f44f7c066a67..1737a30e3e34 (1 commits)
2019-10-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src b34fa731931b..ec12de913124 (2 commits)

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

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

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

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

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=jcgregorio@google.com
Change-Id: Ie8376bffd08230b7b45c6d84013407042a66fea3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251619
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-10-30 06:07:48 +00:00
skia-autoroll
c3a51a5e47 Roll third_party/externals/swiftshader f8f6103eb89f..e1cda3916cee (2 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/f8f6103eb89f..e1cda3916cee

git log f8f6103eb89f..e1cda3916cee --date=short --no-merges --format='%ad %ae %s'
2019-10-29 sugoi@google.com vkGetPhysicalDeviceFeatures2 fix
2019-10-29 sugoi@google.com Provoking vertex fixes

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

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

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

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

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
TBR=jcgregorio@google.com
Change-Id: I37e7b90f352e8c6444808b70452d645cf8ecabfe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251618
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-10-30 04:37:48 +00:00
Chris Dalton
1ae54bc22f Add sampleVariablesStencilSupport to sksl standalone caps
TBR=ethannicholas@google.com

Change-Id: I53c2896470fd202f01f51c5aaddf3087b2cbb5ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251556
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-10-29 23:12:13 +00:00
Mike Klein
07c6c6668c work around x11/X.h #define pollution
Some nerve those folks have to #define None 0L.

Cq-Include-Trybots: skia.primary:Build-Debian9-Clang-x86_64-Debug-SwiftShader
Change-Id: I0c84f78ec72672648d1c0bde69b6e05433b80d56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251516
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-10-29 22:52:23 +00:00
Hal Canary
014f540f70 BotsCfg/Perf/RemoteGlyphCache: bots to download and use traces
This runs the following benches in Perf-Android-*-CPU-* bots:
  - SkDiffBench-amazon
  - SkDiffBench-espn
  - SkDiffBench-googlecat
  - SkDiffBench-qq
  - SkDiffBench-taobao
  - SkDiffBench-wikicat
  - SkDiffBench-yahoo
  - SkDiffBench-youtube

CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Android-Clang-NVIDIA_Shield-CPU-TegraX1-arm64-Release-All-Android

Change-Id: If8b51bd09cfb0bfcc04258bc68a94e1e4e24de90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251205
Commit-Queue: Hal Canary <halcanary@skia.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-29 22:24:54 +00:00
Nigel Tao
2777cd37bf Have SkWuffsCodec use two Wuffs decoders
This allows onGetFrameCount to advance the stream (and return a higher
frame count), even when in the middle of a onIncrementalDecode sequence.

Such behavior is expected by Chromium's
TestResumePartialDecodeAfterClearFrameBufferCache:

https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/image-decoders/image_decoder_test_helpers.cc?l=365&rcl=23787ba147959ebf4ad168c595d5ec87919fdbd2

Bug: skia:8235
Change-Id: Iba7267468b02ce73455b362e50d8878f53b0ff88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250937
Commit-Queue: Nigel Tao <nigeltao@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2019-10-29 22:17:43 +00:00
Stephen White
e662695654 Roll to ToT Dawn.
Change-Id: Iff890f62f8ecae29ce7024f2bba206a2770c2600
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251365
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-10-29 22:06:23 +00:00
Mike Klein
f6a89fde46 hold a ref on Key effects
This ensures we never confuse a dead effect pointer in our cache for a
different live effect that happens to be allocated at the same address
as the old one.  Never seen it happen yet, but it's possible.

Change-Id: If8aff141fb6d0a4e10f13a153b154bb14f5a8c1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251442
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-10-29 21:59:33 +00:00
Mike Klein
e4522dcf9a rough sketch of shaders in SkVMBlitter
Change-Id: I5f96475a6dec26dde0bdf883153a1fd7c7e3b148
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251409
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-10-29 21:41:53 +00:00
Mike Klein
bfdab5f027 support 3D masks in SkVMBlitter
Nothing too tricky, all spun off the other CL.

Diffs on the new emboss GM look good.

Change-Id: Ia46f106491e92c0cee4020200474ea5de2ca270d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251440
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-10-29 21:17:52 +00:00
Mike Klein
278615afb4 add a paint-color string to gm/emboss
I'm not hitting SkVMBlitter with a 3D mask
without also implementing support for SkColorShader.

Adding this green "World" tests that path with
a paint color, and should let me test and land 3D
mask support before adding shader support.

Change-Id: I9020a14a8a77dd2946c094308e5ad04beea20068
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251439
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-10-29 21:12:22 +00:00
Chris Dalton
b0fd4b12a1 Reland "Revert "Revert "Rename gl_SampleMask to sk_SampleMask"""
This is a reland of 4ac37632a8

Original change's description:
> Revert "Revert "Rename gl_SampleMask to sk_SampleMask""
> 
> This reverts commit 40b815db97.
> 
> Bug: skia:
> Change-Id: I454d3e86219276996d0b4f9e7fcf177bb6dc45e7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251004
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

Bug: skia:
Change-Id: Ia343e9e1008ca2354e1d300030e763f3c578d71c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251441
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-10-29 21:01:52 +00:00
Stephen White
ebe2ac5f95 Dawn: workaround X11 #defines for Always, Success, None.
Dawn uses symbols in its API which Xlib.h #defines, which causes
compile-time conflicts. However, they do need to work in Chrome, so we
work around them the way Chrome does: by redefining them as static
constants (see https://cs.chromium.org/chromium/src/ui/gfx/x/x11.h).

Change-Id: Ibef0fd9976503cd606aa0fa646998df54675efb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250998
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-10-29 20:20:37 +00:00
Nigel Tao
a1cc9f6b84 Test Codec::getFrameCount updates with more data
This mimics Chromium's
TestResumePartialDecodeAfterClearFrameBufferCache, which expects the
frame count to increase as more data comes in, even if the decoder is in
the middle of an incremental decode:

https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/image-decoders/image_decoder_test_helpers.cc?l=365&rcl=23787ba147959ebf4ad168c595d5ec87919fdbd2

Bug: skia:8235
Change-Id: Icc19ebea6d77f6b6fb62e3b2ff0c2ffb1ef0950d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250476
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2019-10-29 20:15:36 +00:00
Jim Van Verth
352f4f7800 If drawing an image as tiled fails, fallback to other methods.
When rendering cross-context images, we can end up with a situation
where the image thinks it should be tiled because it won't fit in the
cache, but we can't tile it because getROPixels fails. In this case,
the image should be backed by the client, so we should be able to
render it through a TextureProducer.

Bug: skia:9562
Change-Id: I172e1008ca423f46b0c7b445bdf3eb573215adfb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251458
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-29 20:15:35 +00:00
Brian Osman
5f95519d54 Use GPU special images in two GPU image filter tests
We were always testing the CPU backend.

Bug: skia:9582
Change-Id: I25ff1dc151c1be8a31ab09008393430a1fa85221
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251457
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-10-29 19:59:49 +00:00
Greg Daniel
baf8d992e6 Remove outputSwizzle from GrRenderTargetProxy.
Bug: skia:9556
Change-Id: Icbcc56c0eb0d0de0886874e0ed8c3f03c7318d02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249883
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-10-29 18:51:20 +00:00
Brian Osman
650f40d39b SkMorphologyImageFilter: Avoid integer overflow with large radii
We later compute the "width" of the filter as (2*radius)+1, so fail
early if that will overflow.

Bug: chromium:1018190
Change-Id: I6554693067be4b52b1304d9f6fd0376ce4b3be19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251364
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-10-29 18:38:45 +00:00
Robert Phillips
b69001f36f Make GrFillRectOp and GrTextureOp consistent re AA-upgrading and size checks
I believe GrFillRectOp wasn't handling AA-upgrading correctly. Both ops now also check that they aren't exceeding the index buffer limits for both AA and non-AA draws.

Change-Id: Iae586b92e1f27a908a54ae881f2b1db21ec1afc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251360
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-10-29 17:25:45 +00:00
Greg Daniel
793c9e8c98 Cache simple descriptor sets on GrVkTexture.
We add a small cache of descriptor sets on each texture which only contain
one descriptor which a a texture/sampler using the given texture.

This helps to reduce the overhead of finding a new descriptor and re-writing
data to it every frame we want to use it.

Seeing about 25% gpu main thread performance win on linux vulkan
css_opacity_plus_n_layers.html?layer_count=1000&visible_layers=1000 test

Bug: skia:9574
Change-Id: I9979d7d874350e12caae0e5e70113c9347228e8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251243
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-10-29 17:04:10 +00:00
Kevin Lubick
77d9b5c58e [canvaskit] Add tentative support for savelayerrec
It was easier to just add a few saveLayer overrides rather
than try to expose the struct of pointers. SkRect*
was hard/impossible because we have it as a value_object,
which does not support pointers in enscriptem.

Change-Id: Iad702593cca19f80d6ef9a319f8c80a087135e38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250996
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-10-29 16:46:43 +00:00
Greg Daniel
16f5c65a0a Use GrSurfaceProxyView in RenderTasks.
Bug: skia:9556
Change-Id: Ibe0ae6981e87909848e5af73fc716aac7c8a591f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249232
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-10-29 15:53:59 +00:00
Kevin Lubick
15b40236bd [canvaskit] Add various ImageFilters
We are pretty comfy exposing this set for the long-term.

CanvasKit will generally support chains of image filters,
not necessarily arbitrary DAGs, just to simplify the
points needed to expose.

Change the naming around MaskFilters also, I like having
the factories be a class function, just to keep things
a bit better organized and minimize the amount of things
we want to keep on the top level CanvasKit object.

Change-Id: If32c630efa2fd8bc4bac84d0c3461ac3c0d21263
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250758
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-10-29 14:48:33 +00:00
Greg Daniel
c10bb6aa30 Some cleanup of unneeded code/objects in GrVkPipelineState.
I wanted to cleanup this file as much as possible before starting to add
caching logic to make the changes simpler.

Bug: skia:9574
Change-Id: I8280a81f17372680a488f7f7d28d78d68121b235
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251201
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-10-29 14:35:55 +00:00
Brian Salomon
998937c035 Reland "Make GrFillInData use SkRasterPipeline"
This is a reland of 620154a7dc

Now handles kGray_8.

Original change's description:
> Make GrFillInData use SkRasterPipeline
>
> Makes it easier to add new color types.
>
> Bug: skia:6718
> Change-Id: Id0e6974ec87fd06587b2ccd7a9b99ceb1b6284f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251236
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:6718
Change-Id: Id8b632242b87957f5b1e1a130eb26dafdf82a1cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251359
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-29 14:29:32 +00:00
Robert Phillips
ee08d523f6 Move creation of AAQuadIndexBuffer to GrResourceProvider
This CL also increases the AAQuadIndexBuffer's size and centralizes the handling of index buffer constants.

Change-Id: I4fb679a1c5e4076cf249b612f798e9bf5a38cd0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251244
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-29 13:51:22 +00:00
Robert Phillips
d4b95d213d Revert "Implement refPinnedTextureProxy for SkImage_Lazy."
This reverts commit 1e0f2f389f.

Reason for revert: I suspect this is blocking the Chrome roll

Original change's description:
> Implement refPinnedTextureProxy for SkImage_Lazy.
> 
> Creating a cross-context texture exposed a hole in our lazyproxy
> texture generation. Despite having a wrapped texture we were falling
> back to drawing in tiled mode, which is incorrect. Filling in these
> methods allows us to draw with the wrapped texture.
> 
> Bug: skia:9562
> Change-Id: Ia26c5d75b202aefdf720e6d1f7a201af23e40676
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251214
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I2dd6f2cbe13dd3ac1f65890da366171572fb84e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9562
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251356
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-10-29 12:40:06 +00:00
Joe Gregorio
7a6986b7b3 Revert "Make GrFillInData use SkRasterPipeline"
This reverts commit 620154a7dc.

Reason for revert: Breaks Win10. 

Original change's description:
> Make GrFillInData use SkRasterPipeline
> 
> Makes it easier to add new color types.
> 
> Bug: skia:6718
> Change-Id: Id0e6974ec87fd06587b2ccd7a9b99ceb1b6284f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251236
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I77b400fcb9a74b56f5b480c88e3d2340f26a6cf2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251349
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2019-10-29 11:04:06 +00:00
skia-autoroll
76d22d1ee8 Roll third_party/externals/swiftshader 1737a30e3e34..f8f6103eb89f (2 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/1737a30e3e34..f8f6103eb89f

git log 1737a30e3e34..f8f6103eb89f --date=short --no-merges --format='%ad %ae %s'
2019-10-28 sugoi@google.com VK_EXT_provoking_vertex support
2019-10-28 jonahr@google.com Fix vulkan builds in ANGLE on MacOS

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

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

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

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

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
TBR=jcgregorio@google.com
Change-Id: Id62ed71170fafab4fa3574df0ad028f84089efd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251337
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-10-29 04:41:23 +00:00
Florin Malita
512eb94916 [skottie] Fix layer blend modes under mattes
The layer blend mode should be applied post-masking (after compositing
with the matte layer).

TBR=
Change-Id: Ie84760526cd9be95f08bc68bc5a8dbfb635ca905
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251316
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-29 01:49:26 +00:00
Florin Malita
f22dda9601 [skottie] Fix skottie2movie after async API change
TBR=
Change-Id: I4793d3540f3b5f5fa06ce7a3d1ce2a281660fb72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251255
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-28 23:28:25 +00:00
Herb Derby
d898cc3f26 Small cleanups
Change-Id: Id5fbfa48868d4aa48901835f8618c4297d5cdc88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251240
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-10-28 22:29:25 +00:00
Herb Derby
9e1909f03d Inline fallback code
Change-Id: I49adc018dc4b486edb7be8aa55f86f248bb39c83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251212
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-10-28 22:25:05 +00:00
Herb Derby
aacbd44cad Only send needed glyph images
Only send the glyph images that will be used by the GPU process. If the image
is too big to fit in that atlas, it will never be placed in the strike cache.
So, don't send it.

Change-Id: I8b3c3138555cf73b370784b37360b0a283bb3e41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251239
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-10-28 22:10:25 +00:00
Michael Ludwig
b987862c86 Blacklist bulkrect benchmarks on chorizo
Change-Id: I487fb2e68de683301ce3d7ad19465b71d48c28e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251249
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-10-28 22:04:15 +00:00
skia-autoroll
e122772e88 Roll skia/third_party/skcms 8e28e18b5c9e..b118cb0ef477 (1 commits)
https://skia.googlesource.com/skcms.git/+log/8e28e18b5c9e..b118cb0ef477

git log 8e28e18b5c9e..b118cb0ef477 --date=short --no-merges --format='%ad %ae %s'
2019-10-28 brianosman@google.com Guard against integer overflow when classifying transfer functions

Created with:
  gclient setdep -r skia/third_party/skcms@b118cb0ef477

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skcms-skia-autoroll
Please CC jcgregorio@google.com,mtklein@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=luci.chromium.try:linux-blink-rel

Bug: None
Change-Id: Ia9038f566ab4134fc8e5dcb849f92e087b6ddfdf
TBR=jcgregorio@google.com,mtklein@google.com
TBR=jcgregorio@google.com,mtklein@google.com
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251268
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-10-28 21:10:54 +00:00
Florin Malita
c6fbedc507 [skottie] 3D layer parenting refinements
Observed AE layer parenting semantics:

  * layers are flagged as either 2D or 3D
  * camera applies to 3D layers, but not to 2D layers
  * parented 3D layers treat their ancestor transform chain as 3D (SkMatrix44)
  * parented 2D layers treat their ancestor transform chain as 2D (SkMatrix, ignoring 3D components)

This means that for a given layer, we may need to build two distinct transform chains - depending
on the type of descendant layer being considered.

Furthermore, transforms are animatable and their animators are scoped to a layer controller.  Since
we're potentially building two version of the transform node, we need to ensure all animators for
both of them are transferred to controller object (we still want to only instantiate a single layer
controller and render tree to avoid duplication).  IOW, all dependent layer transforms need to be
considered before "sealing off" a given layer controller.

In order to avoid a layer dependency/topological sort, we can split off the transform tree
construction into a separate pass.  High-level changes:

  -- replace existing LayerAttachContext with CompositionBuilder
     (holds LayerBuilders and other Composition-wide state)

  -- replace LayerRec with LayerBuilder
     (holds Layer-wide state and also caches transform nodes)

  -- pass 1: for each LayerBuilder, transitively build and cache a transform chain
     of a type (2d/3d) determined by the leaf (entry point) layer

  -- pass 2: for each LayerBuilder, build the actual layer content render tree
     and instantiate the layer controller objects

Bug: skia:8914
Change-Id: I9f7efcf4819424282fd3dda98f5621ba12fd001b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251001
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-28 20:29:54 +00:00
Jim Van Verth
1e0f2f389f Implement refPinnedTextureProxy for SkImage_Lazy.
Creating a cross-context texture exposed a hole in our lazyproxy
texture generation. Despite having a wrapped texture we were falling
back to drawing in tiled mode, which is incorrect. Filling in these
methods allows us to draw with the wrapped texture.

Bug: skia:9562
Change-Id: Ia26c5d75b202aefdf720e6d1f7a201af23e40676
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251214
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-28 20:28:33 +00:00
Brian Osman
9ead6c7400 Guard against integer overflow when classifying transfer functions
Bug: chromium:1016183
Change-Id: I2fa470db3690f79d83fd17b01e421e7457f7c725
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251246
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-10-28 20:18:23 +00:00
Brian Salomon
620154a7dc Make GrFillInData use SkRasterPipeline
Makes it easier to add new color types.

Bug: skia:6718
Change-Id: Id0e6974ec87fd06587b2ccd7a9b99ceb1b6284f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251236
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-28 20:03:53 +00:00
Greg Daniel
1e058a5380 Reland "Revert "Rename gl_SampleMask to sk_SampleMask""
This reverts commit 4ac37632a8.

Reason for revert: Failing assert, "assert(fProgram.fSettings.fCaps->sampleVariablesSupport())" on some bots

Original change's description:
> Revert "Revert "Rename gl_SampleMask to sk_SampleMask""
> 
> This reverts commit 40b815db97.
> 
> Bug: skia:
> Change-Id: I454d3e86219276996d0b4f9e7fcf177bb6dc45e7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251004
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: I1fe9e2bb0d9f921f7d66e4a4707c21dd5c923586
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251248
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-10-28 19:28:25 +00:00
Michael Ludwig
1beb8ae9a2 Reland "Add variety of bulk API benchmarks"
This reverts commit 659b21d480.

Reason for revert: Fixed skipping nonrendering benchmark

Original change's description:
> Revert "Add variety of bulk API benchmarks"
>
> This reverts commit e63595dd85.
>
> Reason for revert: Breaking the Perf tests:
>
> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
> Command exited with code 139
> #######################################
> symbolized stacktrace follows
> #######################################
> build/nanobench BulkRectBench<1000, (RectangleLayout)1, (ImageMode)2, (DrawMode)2>::onPerCanvasPreDraw(SkCanvas*) at skia/bench/BulkRectBench.cpp:218
> build/nanobench main at skia/bench/nanobench.cpp:1277
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f1213dad2e1]
> build/nanobench _start at ??:?
>
>
>
>
>
> Original change's description:
> > Add variety of bulk API benchmarks
> >
> > Covers drawing 1000 anti-aliased rectangles, either sharing 1 image, using
> > a unique image, or as a solid color. Tests using the bulk APIs and regular
> > one-at-a-time drawing.
> >
> > Change-Id: Icdf5a1f6df229aed785212d0941b89c11aa785c0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251003
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,egdaniel@chromium.org,michaelludwig@google.com
>
> Change-Id: I3b26d5a04c472993585242a108c2764ea2b96940
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251213
> Reviewed-by: Joe Gregorio <jcgregorio@google.com>
> Commit-Queue: Joe Gregorio <jcgregorio@google.com>

Change-Id: I83538faa29ada5ab1b02ff07ae9fe90734ed198e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251238
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-10-28 18:48:32 +00:00