Commit Graph

46341 Commits

Author SHA1 Message Date
Mike Klein
5f622d1ea8 add skvm msan bot, move asan back to linux
Leak sanitizer ought not to complain any more
now that I'm cleaning up my thread_local caches.

Add an MSAN bot for paranoia about bug.

Bug: skia:9819
Change-Id: I34600b7d40b6ecbc245d1b0acbca5b2fedf83b5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266523
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-24 15:55:22 +00:00
Brian Osman
cddfc5e7ef Remove invokeChild variants that write to output color
Change-Id: I1788cd621704f580ff0c7d930138d463b724f314
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266556
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-01-24 15:54:22 +00:00
Mike Klein
b81e6975f2 clean up caches at thread exit
Change-Id: I9012a2769eb92d0d393e0eeb684a8bee8519323d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266522
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-24 15:50:17 +00:00
Mike Klein
5df511a308 link clang bots against our prepackaged libc++
This will let ASAN bots find __cxa_thread_atexit(),
letting us clean up thread_local values at thread
exit rather than having to leak them.

Change-Id: Ifd09a1efe659744bb26adf7280bb0f95722a2325
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266529
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-24 15:49:17 +00:00
Brian Salomon
1c3e6cf313 Revert "Move GrDomainEffect functionality into GrTextureEffect and delete"
This reverts commit 988af46dd2.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Move GrDomainEffect functionality into GrTextureEffect and delete
> the former.
> 
> New factories for GrTextureEffect have two main variants:
> MakeTexelSubset(): adjusts the input integer rectangle to account for
> filtering
> 
> MakeSubset(): assumes caller has calculated the exact rectangle needed
> as floats.
> 
> Currently this disables filtering for shader-based mirroring or repeat.
> Will fix this later. The old effect also did not support this.
> 
> Change-Id: If47d8ecfbb349b0d7b39ab5ba864fe3cc1b139e4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265518
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: Ib81a79798668cd7df7d07f72a5113be9fc74180c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266536
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-01-24 14:50:07 +00:00
Ethan Nicholas
b962eff76c Revert "Revert "Complete rewrite of the SkSL interpreter""
This reverts commit 99c54f0290.

Change-Id: I010ac4fdb6c5b6bfbdf63f4dcac5dbf962b0ad9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266205
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-01-24 14:42:37 +00:00
Brian Salomon
988af46dd2 Move GrDomainEffect functionality into GrTextureEffect and delete
the former.

New factories for GrTextureEffect have two main variants:
MakeTexelSubset(): adjusts the input integer rectangle to account for
filtering

MakeSubset(): assumes caller has calculated the exact rectangle needed
as floats.

Currently this disables filtering for shader-based mirroring or repeat.
Will fix this later. The old effect also did not support this.

Change-Id: If47d8ecfbb349b0d7b39ab5ba864fe3cc1b139e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265518
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-01-24 14:23:55 +00:00
Mike Klein
45add166fd silly hack -- move SkVM/ASAN bot to Mac
This should clear up the apparent leaks,
because Mac doesn't support leak sanitizer.

Change-Id: I688edd50265cfd15346f3fa2b8c1d06a2d3d8125
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266368
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-24 13:48:56 +00:00
skia-autoroll
3ea4d5bb85 Roll ../src 7afe38da7578..2ae619822948 (463 commits)
7afe38da75..2ae6198229


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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
Tbr: benjaminwagner@google.com
Change-Id: I005d2bd669f7152522294066455f38c3a4d4d2aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266429
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-24 04:39:09 +00:00
skia-autoroll
8c7beed7b7 Roll third_party/externals/angle2 135f8fcba837..f3b4e6c3030f (8 commits)
135f8fcba8..f3b4e6c303

git log 135f8fcba837..f3b4e6c3030f --date=short --first-parent --format='%ad %ae %s'
2020-01-24 syoussefi@chromium.org Vulkan: No inactive samplers left to cleanup in glslang wrapper
2020-01-24 syoussefi@chromium.org Vulkan: Output qualifiers in the translator
2020-01-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src ab7ac60f14ae..b97057e7f747 (2 commits)
2020-01-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader b766e5e7fbf4..c514ab001bb0 (8 commits)
2020-01-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-tools/src ca9b61a4455f..aaba1e4e6aec (1 commits)
2020-01-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src ac02c61ffc63..8317b28e672a (6 commits)
2020-01-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src af8c7e040f93..37d3a235af2c (2 commits)
2020-01-23 syoussefi@chromium.org Row-major test: switch to compute

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
Tbr: benjaminwagner@google.com
Change-Id: I678e32eb1c1497253c4eb3a566f46ffbf6ac8d5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266431
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-24 04:36:05 +00:00
skia-autoroll
f38f40d180 Roll third_party/externals/swiftshader f324fe10ca65..5ef91b82cbed (6 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/f324fe10ca65..5ef91b82cbed

git log f324fe10ca65..5ef91b82cbed --date=short --first-parent --format='%ad %ae %s'
2020-01-23 amaiorano@google.com Subzero: temp fix Float4 % Float4 (FRem)
2020-01-23 capn@google.com Use UNIMPLEMENTED() for missing functionality we claim support for
2020-01-23 capn@google.com Replace all UNIMPLEMENTED() with UNSUPPORTED()
2020-01-23 swiftshader.regress@gmail.com Regres: Update test lists @ c514ab00
2020-01-23 capn@google.com Evaluate interpolants at pixel center when multisampling disabled
2020-01-23 capn@google.com Use pixel centers for non-multisampled rasterization

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: benjaminwagner@google.com
Change-Id: Iea79fadeb15e8e4e24d3113923f39f26a5f21dc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266430
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-24 04:34:05 +00:00
Brian Salomon
8675bcbaf9 Add support for GL_NV_fence.
Will be used for YUV420 readback on ANGLE ES 2 contexts in Chrome.

Marks the functions as required as Chrome now adds inits these on
GrGLInterface.

Bug: 1040643
Change-Id: I5504d4c9209874991592c9f86aaf7987c316aa40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265602
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-01-24 01:53:33 +00:00
Michael Ludwig
a7e557f3e3 Reland "Increase precision of some quad AA calculations"
This reverts commit 5195673c7a.

Reason for revert: Just waiting for the test suppression
Original change's description:
> Revert "Increase precision of some quad AA calculations"
> 
> This reverts commit 40a1353126.
> 
> Reason for revert: layout tests need rebaseline
> 
> Original change's description:
> > Increase precision of some quad AA calculations
> > 
> > This stops using the low precision rsqrt and instead does a divide + sqrt.
> > It also separates the single kTolerance value used in GrQuadUtils' math
> > into a fairly fuzzy tolerance for edges/distances being close to zero
> > (e.g. a degenerate quad), and a more precise tolerance for linear systems
> > solutions.
> > 
> > The smaller tolerance value used for denominators in these solutions prevents
> > the solved-for coordinates from being mis-classified as "bad". The bad coord
> > resolution works on the assumption that its correcting points that are
> > co-located, but if the input coords were sufficiently large the linear
> > equations would have small denominators that were less than the fuzzy tolerance
> > and then the geometry would be improperly collapsed to a line.
> > 
> > For the selected zoom level of GM_crbug_10141204, this change is sufficient
> > to prevent the draw from being discarded. However, when animating the zoom
> > level, the input shape is sometimes still considered a fullscreen clear when
> > it shouldn't be. A follow up change will improve precision in CropToRect()
> > 
> > Bug: skia:9779, chromium:10141204
> > Change-Id: Id1518a908c03e7813868c4eff014d18388f8f62e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265976
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> 
> TBR=robertphillips@google.com,michaelludwig@google.com
> 
> Change-Id: I44012a2728f75e235678f733c6da8870b84ae3ab
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:9779, chromium:10141204
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266220
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: Ie7f19c1f7c4b742f34b24157aa7800f2a974e5bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9779, chromium:10141204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266221
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-01-24 00:54:21 +00:00
recipe-roller
cfca5c67f1 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (recipe_engine) into this repository.

recipe_engine:
  https://crrev.com/6163c134a0320158e9c0778f9ee532a81d03e0ed (agable@chromium.org)
    Remove recipe engine autoroller config

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Icac69b599cc4f2fb905927a434287c6b4ba49c31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266375
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2020-01-24 00:21:01 +00:00
Mike Reed
845f163f3f remove legacy SkMScalar code
Change-Id: Idb42ea3fc13228a0edc50e36b4573601f50b11fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266384
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-23 23:13:21 +00:00
Mike Klein
6b6727375e use longer-lived alloc in CacheKey()
The gradient shader allocates data in the SkArenaAlloc
and points into it via its uniforms (as if it were a
bitmap or image), so we need to keep that alive while
it may be used.  The scope of CacheKey() is not long
enough.

When the cache is disabled or we get a cache miss,
everything was fine, since we were working out
of the long-lived fAlloc in Builder().

But when we hit something in the cache, we'd be left
trying to draw from data in this temporary scoped
SkArenaAlloc in CacheKey(), a use-after-free.

Change-Id: Ie873d57339180f4cd320c940a72aeb0563b93325
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266356
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-23 21:45:46 +00:00
Mike Klein
20b16bd5e1 force skvm interpreter in ASAN builds, add bots
I think this should catch the use-after-free when it runs
gm/lumafilter.  Reassuring to have running... may also want
to add MSAN bots.

Change-Id: Ia8ed9acdb66b2e5fca02d91922d01dddbd7f2207
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266359
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-01-23 21:44:56 +00:00
Brian Osman
300fe1db40 Use PipelineStageArgs throughout GrSkSLFP and PipelineStageCodeGenerator
Making it easier to modify the objects that are emitted by the generator
and consumed by the FP (as a pre-cursor to sampling children with
explicit coords).

Change-Id: Id746a23537c97ba7a8ac27a63622503f59c902f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266377
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-01-23 21:18:27 +00:00
Julia Lavrova
c88a3bc3f5 Bidi segmentation BEFORE anything else
Change-Id: I94637e663bc1ffc7d9d6e1c0fb0b28509af45f60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266200
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-01-23 20:38:26 +00:00
Chris Dalton
d081dce968 Move GrTessellator::VertexAllocator to GrEagerVertexAllocator
Moves the interface up to Ganesh level and starts using it from other
locations.

Change-Id: I939d2b357d3ae8551976d0d71b877b72da403712
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266063
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-23 20:14:07 +00:00
Herb Derby
1a496c507e Convert evict callback from function to interface
This allows me to find uses of the eviction registratoin
easier in my IDE.

Change-Id: I127911f769d90716f6c8bb69d71b2255786aec21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265981
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-01-23 19:45:16 +00:00
Brian Osman
7abc7aa2db Remove unused functions and members from PipelineStageCodeGenerator
Change-Id: Ib5318575ab929f1e911c8cb13753fd6d19d48818
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266202
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-01-23 19:40:36 +00:00
Mike Klein
7d0861b202 more bits for shader program hash
gm/lumafilter is drawing wrong for me with SkVMBlitter,
but only when I enable its cache.  I thought it must be
a collision between program fingerprints, but on further
inspection that doesn't seem to be the case, even 32-bit.

But now that I've done this, might as well keep it.
Even if p(collision) is small, p^2 is smaller.

Other small cleanups to what we hash and how:
   - don't include derived fields in Instruction equality and hashing
   - use SkOpts::hash() instead of manual std::hash/xor hack

Small struct layout changes to keep everything dense.

Change-Id: I5ba817296f0bfefa0e18f62d103094d0c63bd50d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266282
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-23 19:08:07 +00:00
recipe-roller
fed9eb1b42 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (depot_tools) into this repository.

depot_tools:
  https://crrev.com/684096347b67b1663690c118785018258acd2e9b (contact@yannic-bonenberger.com)
    Improve git cl split

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: If1c855cf15b2969adfba2505c0583457377b7997
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266280
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2020-01-23 19:02:06 +00:00
Robert Phillips
2716daf18e Clean up some "const SkISize& dimensions" usages w/in Ganesh
This is pulled out of the parameter reordering CL - which has become too large.

Change-Id: Id36875dd4a670611ab94a08a3a6df41c474e9022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266217
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-01-23 18:24:16 +00:00
Mike Reed
11b05bc11f Don't make promises about rowbytes
Since we just rely on SkBitmap to manage rowbytes, we don't need to
separately track it in the surface.

Bug: 1038304
Change-Id: Iea2d486019bf4c5bf4f2a87eabc5f00ad71949fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266219
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-23 17:58:36 +00:00
Greg Daniel
cce65006ad Treat GrTextureAdjusters mip copy like other producers, i.e. no fallback.
This makes sure that when we are not using repeat mode the colorType of
the producer will match the colorType of the returned proxy.

Bug: chromium:1044862
Change-Id: I9627517c383ff7c3e9801da21ddafdacfb747871
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266218
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-23 17:35:46 +00:00
Michael Ludwig
5195673c7a Revert "Increase precision of some quad AA calculations"
This reverts commit 40a1353126.

Reason for revert: layout tests need rebaseline

Original change's description:
> Increase precision of some quad AA calculations
> 
> This stops using the low precision rsqrt and instead does a divide + sqrt.
> It also separates the single kTolerance value used in GrQuadUtils' math
> into a fairly fuzzy tolerance for edges/distances being close to zero
> (e.g. a degenerate quad), and a more precise tolerance for linear systems
> solutions.
> 
> The smaller tolerance value used for denominators in these solutions prevents
> the solved-for coordinates from being mis-classified as "bad". The bad coord
> resolution works on the assumption that its correcting points that are
> co-located, but if the input coords were sufficiently large the linear
> equations would have small denominators that were less than the fuzzy tolerance
> and then the geometry would be improperly collapsed to a line.
> 
> For the selected zoom level of GM_crbug_10141204, this change is sufficient
> to prevent the draw from being discarded. However, when animating the zoom
> level, the input shape is sometimes still considered a fullscreen clear when
> it shouldn't be. A follow up change will improve precision in CropToRect()
> 
> Bug: skia:9779, chromium:10141204
> Change-Id: Id1518a908c03e7813868c4eff014d18388f8f62e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265976
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: I44012a2728f75e235678f733c6da8870b84ae3ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9779, chromium:10141204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266220
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-01-23 17:31:26 +00:00
Mike Klein
85754d5855 basic pass at gradients
This is looking pretty good.

Some egregious diffs, some invisible,
and a handful in-between I've investigated.

The egregious diffs look like bad shader caching.  I need to fix that,
but its brokenness is simply helpfully exposed here, not made any worse.
To repo, run: lumafilter, srcmode.

These in-between diffs all fall within the existing variance:
   crbug_938592               ok
   analytic_gradients         ok
   gradients_dup_color_stops  ok
Probably different geometry math, FMAs, reordering, etc.

I will follow up with radial etc,
and shallow gradients also demonstrate we're missing dither.

Change-Id: I5a046ee42accdf1faed50b3b65efb4a6787b5e04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265821
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-01-23 17:03:36 +00:00
Mike Reed
07d32b4d2d remove some memory-based methods, add rc()
Change-Id: I44d6f67dcd3d042127ad20ebdaa332e94f1b0829
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266216
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-01-23 16:52:06 +00:00
Stephen White
3c0a50f038 Implement support for framebufferOnly render targets.
This reflects Dawn and Metal functionality.
Implement a FramebufferOnly flag on GrSurface and GrBackendRenderTarget.
Forward the state from GrBackendRenderTarget to GrSurface.
Check the GrSurface flag in GrGpu::readPixels() and GrGpu::writePixels()
and early-return.

Change-Id: I27d3c9c912b366791bfd0e1db49638d8925742f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262802
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-01-23 16:34:06 +00:00
Greg Daniel
4cb293392c GrPixelConfig is DEAD!!!!!
Bug: skia:6718
Change-Id: Iecad0943b428f7f0e22b45c4cdc7798df00f3e84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265982
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-23 16:25:26 +00:00
Hal Canary
60ff65114c Fix build when (is_ios && !skia_enable_skottie)
Bug: skia:9726
Change-Id: I2ad05e28f8699fc7c5159145cc59065fc8bd5b93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265520
Reviewed-by: Hal Canary <halcanary@skia.org>
Commit-Queue: Hal Canary <halcanary@skia.org>
Auto-Submit: Hal Canary <halcanary@google.com>
2020-01-23 16:11:36 +00:00
Michael Ludwig
8098e63c9e Increase precision in barycentric_coord calculations
For quads with very large coordinates, the barycentric coordinate
calculations could be very inaccurate in 32 bit. This lead to
erroneously thinking the render target was contained within the
quad's triangles, instead of just intersecting it.

By scaling the coordinates to a more reasonable magnitude before
multiplying and subtracting the coordinate values, reasonable
accuracy is preserved w/o needing to do everything in 64 bit.

Because it produces coordinates relative to the triangle vertices,
the computed values remain the same as if the unscaled coordinates
were used with higher precision math.

This seems to prevent GM_crbug_10141204 from being misclassified as
a fullscreen clear when its large rect geometry just intersects
the device.

Bug: skia:9779, chromium:10141204
Change-Id: Ia97c2c4e288907ddbb7058d3e7ed97112143b7dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265977
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-01-23 16:04:07 +00:00
Greg Daniel
b58a3c7331 Remove fConfig from GrSurfaceDesc.
Bug: skia:6718
Change-Id: I586e10c828d5d0a0b3e46d8efd7400991b98d5c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265978
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-23 15:53:36 +00:00
Brian Salomon
899985245a Fix issue introduced in 33c0f260d2
Wrong edge used for left rect in y-pass.

Change-Id: I3040c5b45fcaaddb321aff3a8bc341b4baa67fd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266198
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-01-23 15:37:06 +00:00
Michael Ludwig
40a1353126 Increase precision of some quad AA calculations
This stops using the low precision rsqrt and instead does a divide + sqrt.
It also separates the single kTolerance value used in GrQuadUtils' math
into a fairly fuzzy tolerance for edges/distances being close to zero
(e.g. a degenerate quad), and a more precise tolerance for linear systems
solutions.

The smaller tolerance value used for denominators in these solutions prevents
the solved-for coordinates from being mis-classified as "bad". The bad coord
resolution works on the assumption that its correcting points that are
co-located, but if the input coords were sufficiently large the linear
equations would have small denominators that were less than the fuzzy tolerance
and then the geometry would be improperly collapsed to a line.

For the selected zoom level of GM_crbug_10141204, this change is sufficient
to prevent the draw from being discarded. However, when animating the zoom
level, the input shape is sometimes still considered a fullscreen clear when
it shouldn't be. A follow up change will improve precision in CropToRect()

Bug: skia:9779, chromium:10141204
Change-Id: Id1518a908c03e7813868c4eff014d18388f8f62e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265976
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-01-23 15:33:17 +00:00
Herb Derby
73c75877bd Reland "Specialize SkRectanzier to SkRectanizerSkyline"
This is a reland of 77e1f84a84

Original change's description:
> Specialize SkRectanzier to SkRectanizerSkyline
> 
> It looks like the pow2 rectanizer has never been used. Remove
> the unneeded abstraction for rectanizer everywhere.
> 
> Change-Id: Iba33f1c6faf37201d03928ce8409751c212480a0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265983
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

Change-Id: I09729ba2b0e4b8b1a229fef4b95e65195b33fdc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266180
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-23 15:28:26 +00:00
Mike Reed
26df65c8fb row/col methods
Change-Id: I5b306b15070899d0091b974b09869ff50dcd9c7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265980
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-01-23 15:22:26 +00:00
Mike Reed
05b729709c remove obsolete flag SK_SUPPORT_LEGACY_CANVAS_MATRIX_VIRTUALS
Change-Id: I7f8dabe249a29ffa59e3e6224292895831be13d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266196
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-23 15:12:46 +00:00
Brian Osman
22c44e7f5f Disable Programs test on MacBook10.1-Metal
Bug: skia:9817
Change-Id: I0cee480888a6e2da06d70750dbce9f98c7303516
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266197
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-01-23 15:12:06 +00:00
Michael Ludwig
87211cd0ba Add GM for crbug:10141204
Bug: skia:9779, chromium:10141204
Change-Id: If075e04373a141343ce368c1b28a494047a396f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265876
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-01-23 15:06:16 +00:00
Mike Reed
e4ddb8a7cd Revert "Specialize SkRectanzier to SkRectanizerSkyline"
This reverts commit 77e1f84a84.

Reason for revert: breaking google3 roll?

Original change's description:
> Specialize SkRectanzier to SkRectanizerSkyline
> 
> It looks like the pow2 rectanizer has never been used. Remove
> the unneeded abstraction for rectanizer everywhere.
> 
> Change-Id: Iba33f1c6faf37201d03928ce8409751c212480a0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265983
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

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

Change-Id: I2573534f3ea95c98d089f9c19b027564e77015db
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266116
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-23 10:13:46 +00:00
skia-autoroll
20d0f92991 Roll ../src f2517d68dfde..7afe38da7578 (473 commits)
f2517d68df..7afe38da75


Created with:
  gclient setdep -r ../src@7afe38da75

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

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

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
Tbr: benjaminwagner@google.com
Change-Id: If0d82cb2f158433ba7ac09e75881bc816af2fc04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266066
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-23 05:39:24 +00:00
skia-autoroll
fca88b6504 Roll third_party/externals/angle2 8c396a9cc4a8..135f8fcba837 (16 commits)
8c396a9cc4..135f8fcba8

git log 8c396a9cc4a8..135f8fcba837 --date=short --first-parent --format='%ad %ae %s'
2020-01-23 syoussefi@chromium.org Vulkan: Remove inactive uniforms in the translator
2020-01-23 spang@chromium.org Vulkan: Fix setupDraw when VK_EXT_transform_feedback is not enabled
2020-01-22 courtneygo@google.com Vulkan: Fix cast of float to unsigned int for ARM
2020-01-22 syoussefi@chromium.org Vulkan: Line raster emulation through specialization constant
2020-01-22 sugoi@google.com Enable GL_NV_fence with Vulkan backend
2020-01-22 syoussefi@chromium.org Manually roll spirv-headers
2020-01-22 syoussefi@chromium.org Add support for layout(early_fragment_tests) in;
2020-01-22 syoussefi@chromium.org Row-major test: Clarify std140's stride calculation
2020-01-22 syoussefi@chromium.org Add support for non-float mix
2020-01-22 courtneygo@google.com Update expectations after dEQP test fixes
2020-01-22 jmadill@chromium.org Vulkan: Fix naming in CommandGraphResource.
2020-01-22 aleino@nvidia.com Reduce fail expectations dEQP-GLES31.functional.program_interface_query.buffer_variable.*
2020-01-22 aleino@nvidia.com Reduce D3D11 skips in dEQP-GLES31.functional.program_interface_query.buffer_variable.*
2020-01-22 sugoi@google.com Extensions suffixes
2020-01-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 11cb891a01a2..b766e5e7fbf4 (1 commits)
2020-01-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 323a81fc5e30..ab7ac60f14ae (1 commits)

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
Tbr: benjaminwagner@google.com
Change-Id: I2f7ec6488a43da161cbb2251b92b3a2eb201ac36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266067
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-23 04:35:24 +00:00
skia-autoroll
17ea748d62 Roll third_party/externals/swiftshader b766e5e7fbf4..f324fe10ca65 (6 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b766e5e7fbf4..f324fe10ca65

git log b766e5e7fbf4..f324fe10ca65 --date=short --first-parent --format='%ad %ae %s'
2020-01-22 sugoi@google.com Improve 565 and 5551 precision
2020-01-22 bclayton@google.com CMake: Make the use of endif() / endif(EXPR) consistent
2020-01-22 bclayton@google.com Vulkan debugger: Don't wait for debugger by default.
2020-01-22 bclayton@google.com CMakeLists: Allow overriding of building cppdap
2020-01-22 bclayton@google.com CMakeLists: Only expose options if they're not set as vars
2020-01-22 capn@google.com Don't use VK_TRUE comparisons

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

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: benjaminwagner@google.com
Change-Id: I55cbbb031d5954e6dafdfdb451dc88c8deb40cfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266068
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-23 04:35:04 +00:00
Herb Derby
77e1f84a84 Specialize SkRectanzier to SkRectanizerSkyline
It looks like the pow2 rectanizer has never been used. Remove
the unneeded abstraction for rectanizer everywhere.

Change-Id: Iba33f1c6faf37201d03928ce8409751c212480a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265983
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-01-23 02:28:32 +00:00
Greg Daniel
ce3ddaa50f Pass readSwizzle into more proxy creation to not use config.
This is similar to the earlier change to createProxy but needs to be done
for all the lazy ones as well.

Bug: skia:6718
Change-Id: I3f5721541929e2e3fbfa746b5a2c4221b1af5b49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265960
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-01-23 02:21:02 +00:00
Greg Daniel
d51fa2f1e3 Remove GrPixelConfig from GrSurface and GrSurfaceProxy.
This also requires us to compute a scratch key from backend format instead of config.

Bug: skia:6718
Change-Id: I6bf4c5ba8188e354ddc5307ebf2ca10080df27cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265768
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-23 01:14:32 +00:00
Ben Wagner
ba16336168 Reduce binary size of GCC Debug builds
Change-Id: I2643a949d21bdacc7263f30d3a8b2ff9000929fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265878
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-01-23 00:08:52 +00:00