Commit Graph

36835 Commits

Author SHA1 Message Date
skia-recreate-skps
098c1355bf Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: If01c4d665f18b80042068a3ba9697925b9df5b98
Reviewed-on: https://skia-review.googlesource.com/154808
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2018-09-16 08:33:24 +00:00
Mike Reed
840debe9c7 don't try to extract or blur a zero-sized bitmap
Bug:884473
Change-Id: Ic61238633f65c66db0d5d00c2c438f03552ec7c9
Reviewed-on: https://skia-review.googlesource.com/154634
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-09-15 16:33:33 +00:00
skia-autoroll
8e73f4b6bb Roll third_party/externals/angle2 4230d4847fdc..62114aae8550 (1 commits)
4230d4847f..62114aae85


git log 4230d4847fdc..62114aae8550 --date=short --no-merges --format='%ad %ae %s'
2018-09-14 courtneygo@google.com glBufferSubData: Exit early if size is zero


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

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=caryclark@google.com

Change-Id: Iac2f6f7733b9fc389dc67af8765677e0dd160ac2
Reviewed-on: https://skia-review.googlesource.com/154703
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-15 04:59:02 +00:00
Michael Ludwig
afebe1614e Remove all old gpu gradient code
At this point, all gradient configurations should be handled by the new
FP gradient code path so this removes all of the dead code.

Bug: skia:
Change-Id: If6041edcd8417d8f345e17000ccb27d9efea0bb3
Reviewed-on: https://skia-review.googlesource.com/152383
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-14 22:21:56 +00:00
Brian Osman
d4c29709ca Specify CPU (buffer) and GPU (shader) types explicitly in Attribute
The CPU type is still specified using GrVertexAttribType.
The GPU type is specified directly using GrSLType.

kHalfX_GrVertexAttribType now really means half-float buffer
data, rather than float. (Caveat: The GL enum is only correct
with ES3/GL3 - ES2+extension needs a different value. Sigh.)

Bug: skia:
Change-Id: Ife101db68a5d4ea1ddc2f6c60fbec0c66d725c16
Reviewed-on: https://skia-review.googlesource.com/154628
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-14 21:54:03 +00:00
skia-autoroll
1de063cb45 Roll third_party/externals/swiftshader a764381ef9f3..25c541e51cbd (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/a764381ef9f3..25c541e51cbd


git log a764381ef9f3..25c541e51cbd --date=short --no-merges --format='%ad %ae %s'
2018-09-14 sugoi@google.com Build fix


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

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
TBR=caryclark@google.com

Change-Id: If797aae4d4d81505519bddf081dedfa275e77a77
Reviewed-on: https://skia-review.googlesource.com/154702
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-14 21:38:22 +00:00
Chris Dalton
ce038dce94 ccpr: Clamp the number of linear stroke segments
Clamps the number of linear segments before indexing into arrays with
it (oops). Also adds some minor fixups surrounding NaNs.

Bug: skia:8360
Change-Id: Id520ac49df2ebce71bda9fcaa0f164ddb6ddf2d2
Reviewed-on: https://skia-review.googlesource.com/154771
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-09-14 20:35:50 +00:00
Michael Ludwig
7f8c5249d5 Port gradient unit tests over to new FPs
Previously, the GPU gradient tests were included in the SkXGradient
implementation and provided a processor factory that used the public
SkGradientShader::MakeX() end points to get at the final GrFragmentProcessor.

This factory approach is maintained as well, so there are no individual
tests for the specific colorizers. The tests are added to the layouts that
correspond to the public gradient constructor.

Bug: skia:
Change-Id: Iac74d8490efd0fb7395ad9fc0581906abb815742
Reviewed-on: https://skia-review.googlesource.com/151548
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-14 20:16:03 +00:00
Mike Klein
be569494c4 add bitmap shaders to P3
Update SkImageShader/SkBlitter_sprite to use SkPaint::getColor4f().

Split the set_rgb into bounded and unbounded variants, just like we did
with uniform_color (the exact rgba variant).  Without this we'd try to
draw out-of-gamut colors in lowp for the non-scaled shader draw in
--config srgb, and that can't work.  SkRasterPipeline::append_set_rgb()
now checks to see if it's safe to use ::set_rgb and lowp, falling back
on ::unbounded_set_rgb and floats.

In the GM, the new "sprite" case is handled by SkImageShader, and the
old "sprite" case is handled as a uniform color draw through an A8 mask.
I'm having trouble constructing a call that reaches the A8 code in
SkBlitter_Sprite, but I have confirmed that it's definitely used by
quickly running the other GMs.  I've updated it to use the float paint
color just like SkImageShader.

Change-Id: I1ca8c08b79631165ac0c0032a1406add80e55c9f
Reviewed-on: https://skia-review.googlesource.com/154624
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-14 20:05:32 +00:00
skia-autoroll
6fd6631123 Roll third_party/externals/angle2 7f2329398fe8..4230d4847fdc (2 commits)
7f2329398f..4230d4847f


git log 7f2329398fe8..4230d4847fdc --date=short --no-merges --format='%ad %ae %s'
2018-09-14 jmadill@chromium.org Finish fixing EGL enums.
2018-09-14 jmadill@chromium.org Vulkan: Fix cube map attachment clears and readpixels.


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

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=caryclark@google.com

Change-Id: I9f770fd46b978f45da954a2a0d608db8eb2c90d6
Reviewed-on: https://skia-review.googlesource.com/154701
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-14 19:55:12 +00:00
Michael Ludwig
b96cba3f1a Report optimizations in master gradient effects
All of the FPs for the gradient components have had to be updated to
include the @optimizationFlags section. Layout FPs now can use the
opacity preserving optimization to report whether or not they might
reject a fragment (e.g. 2 point conical gradients).

The previous composition logic that handled ensuring the gradient shader
output a premul color was removing optimizations that should have been
valid for gradients, so the make premul logic has been inlined into
the top-level effect FPs.

Bug: skia:
Change-Id: I73e4224d8dc0e3420a215b0aa805d829b08f6c76
Reviewed-on: https://skia-review.googlesource.com/151547
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-14 19:13:23 +00:00
Jim Van Verth
7b617a7fc8 Fix some issues with shadow tesselation
Bug: oss-fuzz:10348
Change-Id: I818f741452bdb8092796f78bb73d9b518502e4c9
Reviewed-on: https://skia-review.googlesource.com/154627
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-09-14 18:51:14 +00:00
Herb Derby
04e0c8b2f1 Make setupForAsPaths produce a canonical paint
There are three call sites two of them clear the path
effect and set the style. The third is SkCanonicalizePaint
which is used for measureText, getTextWidths, getFontMetrics,
and breakText.

Change-Id: Idb85323a55d3efaf7713884cf757ea2ff88b4a45
Reviewed-on: https://skia-review.googlesource.com/154460
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-09-14 18:47:54 +00:00
Michael Ludwig
a7914d3a8e Implement textured gradients
Also clones SkGradientBitmapCache into GrGradientBitmapCache in the
gpu/gradients folder. But after cleaning up the old gradient code,
SkGradientBitmapCache will go away and SkGradientShader will have no
reference to the bitmap cache or support for building bitmaps.

The "new" GrGradientBitmapCache has been updated to hide the thread
safety responsibilities and gradient bitmap generation code that had
originally been a part of SkGradientShader.

Bug: skia:
Change-Id: Ida134c6437c866439fac44fa453d09a6a11549e7
Reviewed-on: https://skia-review.googlesource.com/150917
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-14 17:31:53 +00:00
Chris Dalton
b68bcc4398 ccpr: Remove the dangling pointer from GrCCDrawPathsOp
Actually takes a ref on fOwningPerOpListPaths, instead of just
asserting it continues to exist. Removes unnecessary asserts
surrounding dangling pointers.

Bug: skia:8359
Change-Id: Ie80da55510f320452bd9ee3a4b38bd59d48681a0
Reviewed-on: https://skia-review.googlesource.com/154684
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-09-14 16:32:58 +00:00
Robert Phillips
66f6ef41b9 Harden SerializedImageFilter fuzzer against filter creation failure
Change-Id: Ic9cc0e17af55300a0de4eab7a61d150f2c07314a
Reviewed-on: https://skia-review.googlesource.com/154626
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-14 16:18:22 +00:00
Robert Phillips
f026d896dc Preserve fLastMoveToIndex in SkPath::transform
This should remedy some of the SkPath::reverseAddPath fuzzer failures

Change-Id: Ic9fe6106b4a0693084b75f0544b672cea78be3cc
Reviewed-on: https://skia-review.googlesource.com/154625
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-14 15:37:22 +00:00
Cary Clark
7724d3f494 fix error reporting for doc examples
Switching parts of bookmaker to use SkJSONCPP.h
introduced a couple of bugs. Fix them.

Report errors found when parsing fiddleout.json,
the results of compiling doc examples.

Parse status.json correctly for spell checking.

TBR=fmalita@chromium.org

Bug: skia:8376
Change-Id: I86d92b0613ece54495efb43424b8fca56aa2cdaf
Reviewed-on: https://skia-review.googlesource.com/154623
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-09-14 13:34:16 +00:00
Michael Ludwig
0495f7aec3 Implement dual interval gradients
Adds a new colorizer implementation that supports gradients with two
interpolation intervals. The two intervals can share a middle color
to represent the usual 3-color gradient, or can have different colors
to represent a hard stop at an arbitrary point.

Bug: skia:
Change-Id: I8c73705e83b99e28ad5c834230ced4e3b7b9d1c4
Reviewed-on: https://skia-review.googlesource.com/150700
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-14 13:12:52 +00:00
Brian Salomon
776a411b52 Pin miter sin half angle to 0 in GrAAConvexTessellator.
Covers slightly concave ring outsets.

Bug: chromium:883331
Change-Id: I1d3d5be5d2ad9d7cd8953356164e9763922b274a
Reviewed-on: https://skia-review.googlesource.com/154541
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-09-14 13:00:32 +00:00
Chris Dalton
66261f1ac2 ccpr: Don't release the stashed atlas proxy inside CopyAtlasOp
This is a leftover from when we used to try and persuade the resource
cache to recycle atlas textures instead of making it explicit. Vulkan
expects Ops to keep their textures alive until they are destroyed.

Bug: skia:7733
Change-Id: I65c90e28026d9faaba43a3e77d87eff612b1b8ac
Reviewed-on: https://skia-review.googlesource.com/154600
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-09-14 03:01:03 +00:00
skia-autoroll
64b0fb5995 Roll third_party/externals/angle2 daab00149ee5..7f2329398fe8 (8 commits)
daab00149e..7f2329398f


git log daab00149ee5..7f2329398fe8 --date=short --no-merges --format='%ad %ae %s'
2018-09-13 jmadill@chromium.org Run git cl format on several files.
2018-09-13 jmadill@chromium.org Pack SamplerState into small struct.
2018-09-13 jmadill@chromium.org Make SamplerState a contained class.
2018-09-13 courtneygo@google.com Vulkan: Emulate eglSwapBuffersWithDamage with full swap
2018-09-13 jmadill@chromium.org Fix EGL enum allocation.
2018-09-13 jmadill@chromium.org Vulkan: Update LineLoopTest expectations.
2018-09-13 jmadill@chromium.org More micro-optimization for draw call validation.
2018-09-13 jmadill@chromium.org Cache valid draw modes for draw calls.


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

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=caryclark@google.com

Change-Id: I26c2d0caeedd87c7e5cad623d3d3b5dd2faeaee0
Reviewed-on: https://skia-review.googlesource.com/154700
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-13 23:50:02 +00:00
skia-autoroll
b4d5af9c05 Roll third_party/externals/swiftshader 52551d1cd8b6..a764381ef9f3 (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/52551d1cd8b6..a764381ef9f3


git log 52551d1cd8b6..a764381ef9f3 --date=short --no-merges --format='%ad %ae %s'
2018-09-13 capn@google.com Disable unsafe FP math optimizations for LLVM 7.0.


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

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
TBR=caryclark@google.com

Change-Id: I248cd7c788c68cffdf96a427a5157c0470d3c9d8
Reviewed-on: https://skia-review.googlesource.com/154521
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-13 22:34:00 +00:00
Ben Wagner
d8327f4c91 Update Win version.
Change-Id: Ieb0885c2638629634b60e78d3ff99af446ac7d67
Reviewed-on: https://skia-review.googlesource.com/154620
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2018-09-13 22:18:51 +00:00
Allan MacKinnon
5cd7777497 Partial support for projective transforms
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true
Bug: skia:
Change-Id: I2879c1e30099fe78e8838f3e16a95e5d71f5400d
Reviewed-on: https://skia-review.googlesource.com/154640
Reviewed-by: Allan MacKinnon <allanmac@google.com>
Commit-Queue: Allan MacKinnon <allanmac@google.com>
Auto-Submit: Allan MacKinnon <allanmac@google.com>
2018-09-13 22:01:28 +00:00
Mike Klein
9fb5a53c8e add two more cases to P3 gm
These are a sprite and non-sprite A8 image draw,
where we pick up the color from the paint.

I'm slightly disturbed to see these working.
It turns out I had no idea how A8 draws happened.

There is probably some dead code to remove in
SkBlitter_Sprite (I think, never called for A8)
and in SkImageShader (only ever called with a black
paint color for A8), in this CL as TODOs.

Change-Id: I1d276f8d9b145b57e3ab793735fb184bdae670fb
Reviewed-on: https://skia-review.googlesource.com/154461
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-13 21:14:56 +00:00
Brian Osman
d29dcd1ae6 Add fallback path for drawing unsupported bitmap configs
Just converts to RGBA_8888 before uploading.

Bug: skia:8375
Change-Id: I7e323da51debb4950c17049ed3b4822a202cba73
Reviewed-on: https://skia-review.googlesource.com/154180
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-13 21:02:16 +00:00
Brian Osman
0ab568463b For Windows-Clang-Debug, use -fstandalone-debug to get better debug info
Without this, debug clang builds on windows have very little debug info.
Fix is based on Chromium's handling of this (they have several tactics,
depending on linker, etc...)

https://cs.chromium.org/chromium/src/build/config/compiler/BUILD.gn?l=2194

Change-Id: Ib1b3aa4cdf4e2daa762d994bea94dc3c691cf359
Reviewed-on: https://skia-review.googlesource.com/154540
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-13 20:07:58 +00:00
Michael Ludwig
8f685085af Implement 2-pt conical gradient layout
Add an FP that provides the two-point conical gradient effect. The
majority of the new FP's shader code is a straight forward port from
SkTwoPointConicalGradient_gpu.cpp. This FP is bulkier because of the
extensive calculations that go on in its overridden Make function.

To support 2-pt conical gradient's behavior of writing transparent
black in invalid areas of the conical interpolation, the contract of
gradient layout FPs has been updated to provide a flag in the y
component as to whether or not the fragment should be rejected.

A separate channel was used since negative values and large values are
perfectly reasonable for the untiled gradient layout to return (before
the value is then constrained into [0, 1]). It also seemed better to
avoid returning a problematic value like infinity or NaN.

Bug: skia:
Change-Id: I37373bb5aebd89cac8905602e699ad19f0f5ac82
Reviewed-on: https://skia-review.googlesource.com/148988
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-13 20:04:16 +00:00
skia-autoroll
6d1c074073 Roll third_party/externals/swiftshader fcedef476ef1..52551d1cd8b6 (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/fcedef476ef1..52551d1cd8b6


git log fcedef476ef1..52551d1cd8b6 --date=short --no-merges --format='%ad %ae %s'
2018-09-13 capn@google.com Work around stack probe issue.


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

The AutoRoll server is located here: https://autoroll.skia.org/r/swiftshader-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
TBR=caryclark@google.com

Change-Id: I444667ad7fa42c6128fae232f931b4537dab5f0c
Reviewed-on: https://skia-review.googlesource.com/154520
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-13 19:54:56 +00:00
Cary Clark
9548ea9d6c fix bookmaker
match docs for SkImage::MakeFromAHardwareBuffer
with include.

TBR=stani@google.com
NOTRY=true
Docs-Preview: https://skia.org/?cl=154503
Bug: skia:6898
Change-Id: Ia0c6d12c1f0d131b3d46e9c1168012613a96d81b
Reviewed-on: https://skia-review.googlesource.com/154503
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-13 19:31:27 +00:00
Cary Clark
9bb34b74f3 update generated includes
This fixes all comments in generated includes
to fit in 100 columns.

TBR=reed@google.com

Bug: skia:6898
Change-Id: I6d28a24d4e2d079e4a9284d4b2a25326dc5f2dc6
Reviewed-on: https://skia-review.googlesource.com/154440
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-13 19:03:00 +00:00
Mike Klein
30cac1ecff pin in Sk4f_toL32()
It's looking too hairy to make SkNx_cast() itself pin.

There will be more of these that I'll have to work
through as they come up, hopefully by funneling them
through to this function.

Change-Id: I534e2dc612f30f2ea9692fd6b466ba59692ef4e2
Reviewed-on: https://skia-review.googlesource.com/154400
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-13 19:02:01 +00:00
Michael Ludwig
24d438b393 Implement sweep gradient layout
Add an FP that implements the sweep gradient effect and updates
SkSweepGradient to use the new system if possible.

Bug: skia:
Change-Id: I3f65da01afafae54c45848a6a78fd758f65eb4a6
Reviewed-on: https://skia-review.googlesource.com/148806
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-13 18:45:26 +00:00
Stan Iliev
505dd57406 Add GrSurfaceOrigin to MakeFromAHardwareBuffer
Add support for kBottomLeft_GrSurfaceOrigin origin for SkImage
backed by an Android hardware buffer.

Bug: b/115610873
Change-Id: I8ba142007ee01c3fc2fd48317b29388d07a7b6e0
Reviewed-on: https://skia-review.googlesource.com/154301
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-09-13 18:43:25 +00:00
Brian Osman
bc6b9cb6ac Cleanup mip-mapped proxy creation slightly
Re-land of portions of https://skia-review.googlesource.com/c/skia/+/154080,
without deferring the mipmap construction.

Bug: skia:8375
Change-Id: Ie0b1468839418032fa882f08c5d9a16de97ac38a
Reviewed-on: https://skia-review.googlesource.com/154305
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-13 18:05:25 +00:00
Brian Osman
1b97f13904 Revert "Defer mip-mapping until lazy proxy instantiation"
This reverts commit 475819cab7.

Reason for revert: No, let's not defer.

Original change's description:
> Defer mip-mapping until lazy proxy instantiation
> 
> - Remove some checks for truly impossible failures (levelCount < 0)
> - Use helper method to predict number of mips, then verify correct
>   results in the lambda.
> - Split up SkMipMap::Build with a CanBuild helper, so GPU code can
>   predict success/failure accurately.
> - This is going to simplify the case where we need to change the
>   config for unsupported formats.
> 
> Bug: skia:8375
> Change-Id: Ied523ab55c38b8c8e7e2ae983744ed400497939b
> Reviewed-on: https://skia-review.googlesource.com/154080
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I04dbc458103f7bb5a7c28da28b0256d7a2b8b3d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8375
Reviewed-on: https://skia-review.googlesource.com/154304
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-09-13 17:33:52 +00:00
Michael Ludwig
4089df8690 Implement radial gradient layout
Adds a radial gradient FP in the same vein as the prior linear gradient
FP. It updates SkRadialGradient to try and use the new system before
falling back to the original GPU gradient code.

Bug: skia:
Change-Id: I0739832beeae18d0a7178ada44014d7885478031
Reviewed-on: https://skia-review.googlesource.com/148803
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-13 16:58:25 +00:00
Cary Clark
2be81cf973 Condense embedded formulas.
Bookmaker delimits formulas and equations to allow
representing variables and symbols without tripping
up reference lookup, spell checking, and comment
generation.

Before, formulas were represented with:
some text
#Formula
(x + y, 0)
##
, and more text

This made it difficult to know when spacing should
be preserved before and after the formula. Now,
formulas are represented with:
some text #Formula # (x + y, 0) ##, and more text

The presence or absence of a space between ## and ,
is now significant (before it was not).

Also, formulas are bracketed by <code> in markdown
generation, so that variables stand out better.
See:
https://skia.org/user/api/SkBlendMode_Reference?cl=152781#Dst_Out
for an example.

Also fixed 100 column offenders and added a code
check to identify them. For the moment, 100 column
offenders are outed with SkDebugf but their presence
does not cause bookmaker to fail.

TBR=caryclark@google.com

Docs-Preview: https://skia.org/?cl=152781
Bug: skia:6898
Change-Id: If92a65a234f5d616bf4485984a8d219a6f04821a
Reviewed-on: https://skia-review.googlesource.com/152781
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-09-13 16:50:25 +00:00
Cary Clark
dcec329d3b fix 100 column violators in generated includes
Several generated includes include code that exceeds the 100 column
limit. Fix the code that exceeds 100 columns here.
In a later CL, bookmaker will fix the comments that
exceed 100 columns.

TBR=reed@google.com

Bug: skia:6898
Change-Id: I8b44b01675e99c5750f3c89689f29bb709203ec2
Reviewed-on: https://skia-review.googlesource.com/154303
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-09-13 16:00:54 +00:00
Mike Klein
ae4b1f484c encode F16/F32 .pngs as Rec2020
This lets us see more of the range of configs like esrgb.

Change-Id: Id8fe3d6d7545b139d905e4a0e587228c85159043
Reviewed-on: https://skia-review.googlesource.com/154380
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-13 15:43:02 +00:00
Herb Derby
1a0f189049 Change fallback for path glyphs to bulk api
This is a different approach to handling fallback, but it
ultimately simplifies handling fallback. If this works out,
the remote code will not have to use the GPU's fallback code.

Change-Id: I20b159f224771a4b900055ad33ae625f0cf210a4
Reviewed-on: https://skia-review.googlesource.com/154121
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-09-13 15:31:19 +00:00
Mike Reed
5152c4acfb Reland "remove SK_SUPPORT_LEGACY_TYPEFACE_MAKEFROMSTREAM"
This reverts commit b8e125281d.

Reason for revert: flutter has landed in fuchsia

Original change's description:
> Revert "remove SK_SUPPORT_LEGACY_TYPEFACE_MAKEFROMSTREAM"
> 
> This reverts commit 558fabb31c.
> 
> Reason for revert: flutter hasnt rolled into fuschia so this breaks fuschia
> 
> Original change's description:
> > remove SK_SUPPORT_LEGACY_TYPEFACE_MAKEFROMSTREAM
> > 
> > ... now that Brian updated Flutter's callsites
> > 
> > Bug: skia:8350
> > Change-Id: I5ae72700125e09d84392eee8045c9602f718909a
> > Reviewed-on: https://skia-review.googlesource.com/153901
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Auto-Submit: Mike Reed <reed@google.com>
> 
> TBR=brianosman@google.com,reed@google.com
> 
> Change-Id: I263e3c7694895ac85dc71a785832e7fb89dc81de
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8350
> Reviewed-on: https://skia-review.googlesource.com/154081
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>

TBR=brianosman@google.com,reed@google.com,caryclark@skia.org

Change-Id: Iabf3c78c883275c0256b31bcde87d4cdc8eecbec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8350
Reviewed-on: https://skia-review.googlesource.com/154302
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-09-13 15:19:09 +00:00
Herb Derby
96519f2835 Centralize the max glyph dimension
Over several refactorings the max glyph dimension has become
a constant. Simplify the code by removing variables that can
only be constant.

Change-Id: I65800a5ec1dfd4de5337f2f37348bd0eb101cc3e
Reviewed-on: https://skia-review.googlesource.com/154123
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-09-13 15:08:31 +00:00
skia-autoroll
03d46695fd Roll third_party/externals/angle2 44286dc870e3..daab00149ee5 (1 commits)
44286dc870..daab00149e


git log 44286dc870e3..daab00149ee5 --date=short --no-merges --format='%ad %ae %s'
2018-09-13 oetuaho@nvidia.com Test and fix robust resource init for multisampled textures


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

The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll

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

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=caryclark@google.com

Change-Id: I804b1c81c3efd38b02a2e9488059b4c2e9a1a3b3
Reviewed-on: https://skia-review.googlesource.com/154360
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2018-09-13 14:55:04 +00:00
Stephan Altmueller
d2916264aa [infra] Add pubsub emulator to gcloud asset
Bug: skia:
Change-Id: I41d45b2577104d5a172cf06e5241c4a33e6d8e19
Reviewed-on: https://skia-review.googlesource.com/154181
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Stephan Altmueller <stephana@google.com>
2018-09-13 14:27:19 +00:00
Brian Osman
475819cab7 Defer mip-mapping until lazy proxy instantiation
- Remove some checks for truly impossible failures (levelCount < 0)
- Use helper method to predict number of mips, then verify correct
  results in the lambda.
- Split up SkMipMap::Build with a CanBuild helper, so GPU code can
  predict success/failure accurately.
- This is going to simplify the case where we need to change the
  config for unsupported formats.

Bug: skia:8375
Change-Id: Ied523ab55c38b8c8e7e2ae983744ed400497939b
Reviewed-on: https://skia-review.googlesource.com/154080
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-09-13 14:01:17 +00:00
Mike Klein
5e31ec6045 add a linear gradient to P3 gm
I've tweaked the indicators into overlays so there can be one for each
pixel sampled.  This lets me test both gradient corners.

I've dropped displaying the P3 value... not sure if it's as useful as
the other two, and I'm worried about information overload.  There's
already a lot to look at.

Change-Id: I57a41c3af0162e8132e50c47a0b967714a57e9e5
Reviewed-on: https://skia-review.googlesource.com/154220
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2018-09-13 13:30:22 +00:00
Robert Phillips
8051d38358 Fix SkPath::reverseAddPath and fuzzing of SkPath enums
Bug: 882423
Change-Id: I2be2863574a5951b86e4d5e213094efee6081098
Reviewed-on: https://skia-review.googlesource.com/154300
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-09-13 13:10:33 +00:00
Greg Daniel
637c06aec7 Add Vulkan support to GrAHardwareBufferImageGenerator
Bug: skia:
Change-Id: I37b08f336919fdac77fcd2726f129425bf8f4f2b
Reviewed-on: https://skia-review.googlesource.com/150132
Reviewed-by: Stan Iliev <stani@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-09-13 12:54:53 +00:00