Commit Graph

56644 Commits

Author SHA1 Message Date
Michael Ludwig
3b39b7f5c6 Alias canComputeFastBounds to affectsTransparentBlack
This moves SkImageFilter's API closer to SkColorFilter's, and also
updates SkRecordDraw's PaintMayAffectTransparentBlack to be less
conservative.

Originally:
-canComputeFastBounds() handled aggregating behavior of the entire graph
  but it's a public API
-affectsTransparentBlack() was the private virtual for a specific node

Now:
-affectsTransparentBlack() handles aggregating behavior of the graph and
  is part of SkImageFilter_Base (mirroring SkColorFilter_Base).
-added onAffectsTransparentBlack() to clarify the per-node virtual that
  they can override.
-canComputeFastBounds() simply returns !affectsTransparentBlack().

There are some usages in our code that I kept using canComputeFastBounds
(e.g. SkPaint's computefastBounds) because it kept naming consistent.
In other places I updated to use affectsTransparentBlack since I thought
that made it clearer why we were checking that behavior.

Bug: skia:12282
Change-Id: I7b58372c127b4d8d9097d6c0de64486e822d2342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436296
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-08-04 19:11:19 +00:00
John Stiles
9fdcc517b2 Write test demonstrating bug with array narrowing conversions.
We don't currently support this. There's no explicit syntax to cast an
array's type, but it can be implicitly required in some situations, like
`halfArray == floatArray` (when fAllowNarrowingConversions is on).

Change-Id: I00fe0ddd4f2682b2950e828dd78bb941d5f0430e
Bug: skia:12248
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436560
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-04 18:34:18 +00:00
recipe-roller
fdb13e954c 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:
7a262eba20
  7a262eb (dpranke@google.com)
      Fix pylint canned check for pylint-2.6.

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

R=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Iade0fdfe864a52119fcbc7b7d04fae04721c1c9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436544
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2021-08-04 18:31:49 +00:00
Michael Ludwig
68587ae274 Add SkClipStack::replaceClip() separate from deprecated clip op
The replaceClip functionality was added to allow Android to move off of
generalized expanding clips. At the time, SkClipStack simply used the
kReplace_SkClipOp to handle it. In order to remove those expanding ops,
SkClipStack will need a proper implementation of replaceClip().

The clip elements have an additional field to mark if
it's a replace (and it's op will be kIntersect). Adds a temporary
getRegionOp() function to unify elements that use this field vs.
elements that use the deprecated clip op (i.e. if they were deserialized
from an SKP that recorded an expanding op).

Clients of SkClipOp that checked for replace ops use the new function
instead of referring to the enum value directly.

Bug: skia:10209
Change-Id: I1c16c87fadb2becfe181db717c05e240ac87fd34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436158
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-08-04 18:17:11 +00:00
Derek Sollenberger
b00cbc704d Revert "uniform Ptr (UPtr) is a sub class of Ptr"
This reverts commit cef047a490.

Reason for revert: DM test failures on some Windows/Linux devices

Original change's description:
> uniform Ptr (UPtr) is a sub class of Ptr
>
> A pointer for a Uniform (UPtr) is a sub type of a Ptr. Everywhere you
> can use a Ptr a UPtr will work, but you can't use Ptr where you need
> a UPtr. All the UPtr instructions uniformF, gather32, etc are expected
> to be hoisted and therefore loaded only once. While the varyings
> instructions like load32, etc. are expected to remain in the body
> of the loop, and be evaluated each time through the loop.
>
> Change-Id: I4fe6458c2a4614872ed67cda1e81b05ea8a9e69e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436297
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=herb@google.com,brianosman@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: I785973be1493643e7d5a3da482bc4ab07d186865
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436559
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2021-08-04 17:26:34 +00:00
Derek Sollenberger
40b82c6b5c Revert "Fission GrSurfaceFillContext into skgpu:: and skgpu::v1:: versions"
This reverts commit af844c79d5.

Reason for revert: breaking chrome roller

Original change's description:
> Fission GrSurfaceFillContext into skgpu:: and skgpu::v1:: versions
>
> The only really interesting parts are:
>   src/gpu/SurfaceFillContext.*
>   src/gpu/v1/SurfaceFillContext.*
>
> Everything else is mostly mechanical.
>
> Bug: skia:11837
> Change-Id: If2945f30dadd6ad0cccf6ff2b53e4a92b1dc6cbc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436099
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

TBR=robertphillips@google.com,michaelludwig@google.com,skcq-be@skia-corp.google.com.iam.gserviceaccount.com

Change-Id: I3b2d1d4a30e253a107f55dc3c5ecaaee5386e6e8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11837
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436557
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2021-08-04 17:15:45 +00:00
Tyler Denniston
40dfc67917 Reland "Reland "Omit inner join geometry when possible""
This reverts commit bdc412f149.

Original change's description:
> Revert "Reland "Omit inner join geometry when possible""
>
> This reverts commit 44edd1952a.
>
> Reason for revert: problematic gold diffs (e.g. paths-data-10-t) and androit CTS failures
>
> Original change's description:
> > Reland "Omit inner join geometry when possible"
> >
> > This is a reland of 1b0a95e0ee
> >
> > Original change's description:
> > > Omit inner join geometry when possible
> > >
> > > There is some relatively cheap math we can do to determine easy cases
> > > when the inner join geometry can be skipped. This CL is not
> > > comprehensive in that there may be other cases where we can skip the
> > > geometry.
> > >
> > > Only handling miter joins in this CL - the other join types can likely
> > > have similar logic, but will require a bit more computation to compute
> > > the inner (reflected) miter point.
> > >
> > > Misc notes:
> > > - Added SK_LEGACY_INNER_JOINS ifdef in the event that clients depend on
> > >   the old behavior.
> > > - Modified stroker to track "previous previous" point, which is the
> > >   start point of the previous line segment.
> > >
> > > Bug: b/165379671, skia:11964
> > > Change-Id: I56789e85a2b4627c32f2a30fe60e47d448e9adf3
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404717
> > > Reviewed-by: Mike Reed <reed@google.com>
> > > Commit-Queue: Tyler Denniston <tdenniston@google.com>
> >
> > Bug: b/165379671, skia:11964
> > Change-Id: If8bf183db9379d0a98a6f88e70f871a559692a60
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423821
> > Reviewed-by: Tyler Denniston <tdenniston@google.com>
> > Commit-Queue: Tyler Denniston <tdenniston@google.com>
>
> TBR=reed@google.com,tdenniston@google.com
>
> Change-Id: I5a2dfd402269db6c788f0e0625f67e9bf3b1f5cf
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: b/165379671, skia:11964
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426059
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: b/165379671, skia:11964
Change-Id: Icfd420954a291f414fc2cb5cc2fe2756224a5d8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436518
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-08-04 16:44:11 +00:00
Chris Dalton
03b7935068 Reland "Enable the atlas path renderer for GrAAType::kCoverage"
This is a reland of 8cd8e27c2c

Original change's description:
> Enable the atlas path renderer for GrAAType::kCoverage
>
> This will definitely cause regressions on a whole slew of benchmarks
> that were carelessly regurgitating cached bitmaps until the system
> memory was blown. But the well defined memory limits of the atlas and
> resilience to animation are worth it. If a client still wants this
> type of caching they can always render their own bitmaps using Skia
> and cache them.
>
> Bug: chromium:928984
> Bug: skia:12258
> Change-Id: I277f50cb9192f1cf5fe8d4b7f629abe72432150a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433917
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: chromium:928984
Bug: skia:12258
Change-Id: I59d7b0684b7569d62939b6a8035fa6e92f4c02f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436356
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-08-04 16:31:34 +00:00
Herb Derby
cef047a490 uniform Ptr (UPtr) is a sub class of Ptr
A pointer for a Uniform (UPtr) is a sub type of a Ptr. Everywhere you
can use a Ptr a UPtr will work, but you can't use Ptr where you need
a UPtr. All the UPtr instructions uniformF, gather32, etc are expected
to be hoisted and therefore loaded only once. While the varyings
instructions like load32, etc. are expected to remain in the body
of the loop, and be evaluated each time through the loop.

Change-Id: I4fe6458c2a4614872ed67cda1e81b05ea8a9e69e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436297
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-04 16:00:10 +00:00
Robert Phillips
af844c79d5 Fission GrSurfaceFillContext into skgpu:: and skgpu::v1:: versions
The only really interesting parts are:
  src/gpu/SurfaceFillContext.*
  src/gpu/v1/SurfaceFillContext.*

Everything else is mostly mechanical.

Bug: skia:11837
Change-Id: If2945f30dadd6ad0cccf6ff2b53e4a92b1dc6cbc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436099
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-08-04 14:30:10 +00:00
recipe-roller
f0ffd41897 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:
2a458f0bd2
  2a458f0 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 48de919ac2fb to b32fc6edde4d

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

R=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I00842412e7e6ecfa7aa06c02214a1517ec017cb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436377
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2021-08-04 08:20:43 +00:00
skia-autoroll
de58ca28e5 Roll ANGLE from f016c4352f52 to 35bdaf8dc485 (14 revisions)
f016c4352f..35bdaf8dc4

2021-08-04 jmadill@chromium.org Capture/Replay: Minor cleanups.
2021-08-03 cnorthrop@google.com Capture/Replay: Track arrayed uniform locations
2021-08-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from c96bed01e3be to b3e57670ca16 (245 revisions)
2021-08-03 syoussefi@chromium.org Translator: Fix fuzzer crashing on assertion
2021-08-03 syoussefi@chromium.org Reland "GL: Fix GPU detection"
2021-08-03 syoussefi@chromium.org Reland "Translator: Clean up type cloning"
2021-08-03 enga@google.com Revert "Translator: Clean up type cloning"
2021-08-03 jmadill@chromium.org Revert "GL: Fix GPU detection"
2021-08-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 44660405ea6c to dcfc0a6e2d84 (6 revisions)
2021-08-03 lubosz.sarnecki@collabora.com gen_restricted_traces: Add kReplayDrawSurfaceColorSpace.
2021-08-03 jmadill@chromium.org Vulkan: Use custom volk init function.
2021-08-03 lubosz.sarnecki@collabora.com FrameCapture: Capture the EGL color space.
2021-08-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 7ad7eb435b84 to c96bed01e3be (1394 revisions)
2021-08-03 syoussefi@chromium.org GL: Fix GPU detection

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: nifong@google.com
Test: Test: PUBG Mobile MEC
Change-Id: I3b149e29ca6f3a4806d85d8660a15753c0be4262
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436268
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-04 05:22:44 +00:00
skia-autoroll
fbe4247ecd Roll SwiftShader from dcfc0a6e2d84 to d4483095765e (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/dcfc0a6e2d84..d4483095765e

2021-08-03 capn@google.com Fix computing anisotropy factor for single-level mipmap
2021-08-03 swiftshader.regress@gmail.com Regres: Update test lists @ dcfc0a6e

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: nifong@google.com
Change-Id: I3e57f825965fdca0a93d825b890a44697d424e80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436267
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-04 05:15:13 +00:00
skia-autoroll
2cbb3f55ea Roll Dawn from 858e585cce60 to 26391657884b (5 revisions)
https://dawn.googlesource.com/dawn.git/+log/858e585cce60..26391657884b

2021-08-03 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 72f9ce98d17c to 51750f15d219 (2 revisions)
2021-08-03 enga@chromium.org Fix VVL error when creating a bind group from a destroyed texture
2021-08-03 enga@chromium.org Use Tint SingleEntryPoint transform in Vulkan/GL backends
2021-08-03 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from b75e4b96a6ba to 72f9ce98d17c (1 revision)
2021-08-03 enga@chromium.org Unsuppress tests failing from crbug.com/dawn/978

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from b75e4b96a6ba to 51750f15d219

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: enga@google.com
Change-Id: I27c69bbc3116b56cae66b0b00804bc1098b25251
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436269
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-04 04:46:44 +00:00
recipe-roller
38d9e0e812 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:
a992238bf0
  a992238 (linxinan@google.com)
      Add params to update_files method

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

R=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I48320b8ae6c441fc7d8f202fff54a12566ad7ba8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436338
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2021-08-04 00:44:40 +00:00
recipe-roller
6ff2b7a4e5 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:
65637d1586
  65637d1 (yuanjunh@google.com)
      Report the total coverage for py2 and py3 tests

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

R=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I7c056775b50ccc6074e411c6c245c2efb1f3018d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436318
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2021-08-03 23:01:46 +00:00
recipe-roller
1b18454ba7 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:
8d91fac839
  8d91fac (mohrr@google.com)
      [lint] Replace --whitelist with --allowlist

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

R=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I2103708e6fe472d25f8c7850e6eaaaaf15dd8fee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436316
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2021-08-03 21:39:10 +00:00
Michael Ludwig
9cd9d0f3de Fix nearly flat edge detection in GrTriangulator
Adds a GM reproducing triangulator failure. The stroker generated
geometry shown in the GM had two edges intersecting on the inner
contour. One of the edges was practically vertical, such that its top
and bottom vertices X coordinates differed by 1ulp (approx 4.8e-7 when
x = 7.5). The intersection was computed correctly in double but then
clamped to exactly 7.5 when stored back in float at (7.5, ~11), which
is still a reasonable intersection point along the edge represented
by (7.5,0) to (7.5000048,~68).

However, with a sorting direction of horizontal for the vertices,
vertices are sorted on increasing x and then *decreasing* y. The
computed intersection is then technically above the edge's top
vertex. In the original code, the edge was not considered flat, so
it assumes that the intersection vertex is below the top vertex
and above the bottom vertex.

The issue was with the nearly_flat function only checking the difference
against machine epsilon without taking the magnitude of the vertices
into account. However, just changing nearly_flat to use ulp instead of
epsilon led to infinite recursion and asserts on a number of tests due
to inaccuracies in edge intersection tests. To address these issues,
I reworked clamp() to work on X and Y independently, which avoids the
need to check nearly_flat entirely. Additionally, edge intersection
detects when it might be inaccurate due to really large vertex coords
and recursively splits to reject false positives.

Bug: skia:12244
Change-Id: I9a92a163e8c53af799332f1f9369fccd3a9fbf31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432196
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-08-03 20:45:40 +00:00
John Stiles
68f5606831 Fix cases of variable shadowing in rasterization.
If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.

Change-Id: I169ff3bac8517869132297c8e98bd9bd4248a349
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436100
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-08-03 19:00:58 +00:00
recipe-roller
6ec3d270f3 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:
ee08888d27
  ee08888 (pkasting@chromium.org)
      Update comment to reflect a directory's new name.

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

R=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I1cb591b1fa472c5a91ccbb390845c90e35c08042
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436196
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2021-08-03 18:59:40 +00:00
Michael Ludwig
2f6e2f8410 Use SkClipOp::kFoo instead of kFoo_SkClipOp from SkClipOpPriv
The SkClipOpPriv.h header will be going away soon, but a number of
places still use its kIntersect_SkClipOp definitions instead of the
equivalent SkClipOp::kIntersect. Besides updating these references,
a number of unnecessary includes to SkClipOpPriv.h are removed and
some test cases exercising expanding clip ops are deleted since they
will be unnecessary shortly.

Bug: skia:10208
Change-Id: I2bbdd6bb39869134c6a80ef2b4482e6cabdeb0b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436157
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-08-03 18:08:21 +00:00
Leon Scroggins III
86b2c952ae Update gn_to_bp_utils to support python3
Python2 is going away, so update the script to run with python3.

Change-Id: I8c1aad12ecf8ae1bde67a1ad5486bf6feb1c04d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436098
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2021-08-03 17:52:43 +00:00
Robert Phillips
46eb3ab80d Make v1/SurfaceDrawContext V1-only
The GrFillRectOp and GrTextureOp guards are temporary - just until they are made V1-only.

The SkGlyphRunPainter and GrTextBlob guards are going to linger since both will probably exist in both versions.

The GrTextBlob guards mainly hide the draw and makeAtlasTextOp methods.

Bug: skia:11837
Change-Id: Icc19d664bb4d93962bf63386dc59fe176cc61ea1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/434044
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-03 16:07:22 +00:00
Brian Salomon
caa760e214 Fix -Wdeprecated-copy warnings
clang-14 has a new warning for deprecated implicit copy/assignment
if the other is written.

https://clang.llvm.org/docs/DiagnosticsReference.html#wdeprecated-copy

Change-Id: Iaeb23b2470ffa0be1953d1aed31bf0423c589893
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435880
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-08-03 16:06:11 +00:00
John Stiles
e9dcbfdaa1 Add test for Runtime Effects and narrowing conversions.
This code intentionally mixes half4s and float4s everywhere. Before
http://review.skia.org/435916 landed, this resulted in a compile error.

Change-Id: I852fef6ee99a8b78623e0e9ddeee2ad84a8c0504
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436058
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-03 15:58:46 +00:00
John Stiles
7b401e0f67 Fix cases of variable shadowing in src/core/.
These were reviewed last year at http://review.skia.org/312480 but never
landed. Splitting into small chunks to land individually.

If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.

Change-Id: Ifb985c1baa5811c458454016d0d05fb04baa1c56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435721
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-08-03 15:57:17 +00:00
Brian Osman
8ef386a123 Revert "Enable the atlas path renderer for GrAAType::kCoverage"
This reverts commit 8cd8e27c2c.

Reason for revert: b/195095846

Original change's description:
> Enable the atlas path renderer for GrAAType::kCoverage
>
> This will definitely cause regressions on a whole slew of benchmarks
> that were carelessly regurgitating cached bitmaps until the system
> memory was blown. But the well defined memory limits of the atlas and
> resilience to animation are worth it. If a client still wants this
> type of caching they can always render their own bitmaps using Skia
> and cache them.
>
> Bug: chromium:928984
> Bug: skia:12258
> Change-Id: I277f50cb9192f1cf5fe8d4b7f629abe72432150a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433917
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:928984
Bug: skia:12258
Change-Id: Ia9ce9a3b392266a0defaa57752d44a71e533609e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436076
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-08-03 15:23:47 +00:00
Robert Phillips
ea3489aa1d Make Gr*ContextPriv class hierarchy parallel Gr*Context class hierarchy
Hopefully this will make it easier to add functionality to the Gr*ContextPriv classes.

This CL is mainly mechanical but did turn up some oddities:

GrDirectContext had a separate 'fShaderErrorHandler' member and a matching GrDirectContextPriv::getShaderErrorHandler method. This now falls back to GrBaseContextPriv::getShaderErrorHandler.

GrDirectContext::resetContextStats was const.

GrRecordingContextPriv's dump and dumpKeyValuePairs methods weren't const.

GrImageContextPriv::abandoned was const. GrImageContext::abandoned is not (bc GrDirectContext can abandon inside abandoned).

Change-Id: I25bb2160031de329d514b30c05752f1bdd1d5339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435716
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-03 14:59:04 +00:00
John Stiles
addccaf9cf Enable narrowing conversions automatically for Runtime Effects.
Previously, it was possible to compile runtime effects with narrowing
conversions disabled; e.g. skslc would do this. A Runtime Effect-based
ProgramKind now enables narrowing conversions automatically. (The
setting flag could still be turned on manually as well.)

Change-Id: I912c9adda77c29ccfda3b1d85d106315f648d624
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435916
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-03 13:30:40 +00:00
skia-autoroll
1c38121964 Roll SK Tool from 458d16ff1961 to d96e01e1e6c1
https://skia.googlesource.com/buildbot.git/+log/458d16ff1961..d96e01e1e6c1

2021-08-02 rmistry@google.com [CT] Remove Windows option from UI and do not bring up Windows instances
2021-08-02 kjlubick@google.com [gold] Roll out new diffcalculator
2021-08-02 kjlubick@google.com [gold] Replace Pub/Sub diffcalculator Part 3
2021-08-02 kjlubick@google.com [gold] Replace Pub/Sub diffcalculator Part 2
2021-08-02 kjlubick@google.com [gold] Replace Pub/Sub diffcalculator Part 1
2021-08-02 jcgregorio@google.com [status] Make the word Status in the title bar a link.
2021-08-02 rmistry@google.com Encode project name in FullChangeId
2021-08-02 rmistry@google.com Remove refs/heads/ prefix from FullChangeId

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

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

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

Tbr: kjlubick@google.com
Change-Id: I2513e655aad84d082491dee968312ed855263819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436004
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-03 12:32:40 +00:00
recipe-roller
b6d6018385 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (depot_tools, recipe_engine) into this repository.

depot_tools:
211a5174c5
  211a517 (chanli@chromium.org)
      [dirmd] roll dirmd

recipe_engine:
f4f2e9bc6d
  f4f2e9b (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 17ea18c0a2cc to 3f172a683204

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

R=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ia32845549c0540e0ac771a7ce31f924ee449d98c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435999
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2021-08-03 08:01:12 +00:00
skia-autoroll
e7541d396f Roll ANGLE from d4d6c23c7c21 to f016c4352f52 (8 revisions)
d4d6c23c7c..f016c4352f

2021-08-02 syoussefi@chromium.org Translator: Clean up type cloning
2021-08-02 jmadill@chromium.org Remove extra angle:: uses from ANGLEPestTest.cpp.
2021-08-02 jmadill@chromium.org Fix unreachable case in test instantiate.
2021-08-02 jmadill@chromium.org Test Runner: Allow listing tests on Android.
2021-08-02 jmadill@chromium.org Capture/Replay Tests: Skip crashing test.
2021-08-02 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix constructors with uniform parameters
2021-08-02 jmadill@chromium.org Remove ASSERT in computeRowPitch about row length.
2021-08-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from eca94bf2bef7 to 2395f179eff3 (1 revision)

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: nifong@google.com
Change-Id: Ifb6f54fe1474edd5a0f1d8ed5c9a5427a7e66daa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435978
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-03 05:31:13 +00:00
skia-autoroll
f4c6f5ed04 Roll SwiftShader from 44660405ea6c to dcfc0a6e2d84 (6 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/44660405ea6c..dcfc0a6e2d84

2021-08-02 capn@google.com Fix ignoring fragment shader depth for EarlyFragmentTests mode
2021-08-02 capn@google.com Include multisample handling into fragment pipeline stages
2021-08-02 capn@google.com Only process active fragment samples
2021-08-02 capn@google.com Refactor sample shading state determination
2021-08-02 srisser@google.com Add Bias and Fetch to divergent Lod sampling
2021-08-02 srisser@google.com Optimize Lod and Grad texture sampling

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: nifong@google.com
Change-Id: I801601f06571bcd3621d20fded9680122c6429c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435976
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-03 05:14:50 +00:00
skia-autoroll
3cb9b9c72d Roll Dawn from 7e874a1c096e to 858e585cce60 (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/7e874a1c096e..858e585cce60

2021-08-03 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c0fbce65d8c6 to b75e4b96a6ba (1 revision)
2021-08-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 8ebff3dc85e7 to c0fbce65d8c6 (1 revision)
2021-08-02 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from b209c477db71 to 8ebff3dc85e7 (1 revision)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from b209c477db71 to b75e4b96a6ba

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: enga@google.com
Change-Id: I810d258a0f85d496e47e1a9256c5fcad3951cfa5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435977
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-08-03 04:52:49 +00:00
Kyle Carlstrom
6bbd7df9fb Generalize KeyframeAnimatorBuilder to AnimatorBuilder
Change-Id: I116489a1261a93d9b2513ca53f04e1305e6fd85b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432957
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Avinash Parchuri <aparchur@google.com>
Commit-Queue: Avinash Parchuri <aparchur@google.com>
2021-08-03 00:56:16 +00:00
Brian Osman
6bf9189ae5 Fix fetch-sk on Windows
Change-Id: Iac7db5bec874ebb7b695ef9890609d54b2afe061
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435881
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-08-02 22:12:12 +00:00
John Stiles
0e15769355 Fix cases of variable shadowing in src/pdf/.
These were reviewed last year at http://review.skia.org/312480 but never
landed. Splitting into small chunks to land individually.

If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.

Change-Id: Ide60535395eddae3392ff37339fa32bdde612da6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435878
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2021-08-02 21:49:15 +00:00
John Stiles
eeff41a7b2 Fix cases of variable shadowing in src/.
These were reviewed last year at http://review.skia.org/312480 but never
landed. Splitting into small chunks to land individually.

If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.

Change-Id: I6ae39ce2bdf4cc9fa079e229e21e607088b3cf5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435723
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-08-02 20:22:19 +00:00
John Stiles
60dbf0746f Allow ProgramUsage add/remove for any kind of element.
Previously, we only supported adding Statements, although we supported
removing Statements, ProgramElements and Expressions. Now, we can add or
remove any kind of element.

`replace` was deleted; it was only used in one place, and it could be
replaced by a pair of calls to `remove` and `add`.  (`replace`
was originally used during the simplification pass.)

Change-Id: I0a0093ab60154fd5f5adfcd5c37d17e576c5379a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435624
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-08-02 19:54:46 +00:00
Chris Dalton
289750a231 Don't assert if glCheckFramebufferStatus fails
This can fail if the context has been reset or abandoned. Instead return
false so the caller print a warning message and skip rendering.

Bug: chromium:1235232
Bug: skia:12258
Bug: skia:5200
Change-Id: If78a914a25d09d48477e04317a34473632f76207
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435816
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-08-02 19:49:12 +00:00
Brian Salomon
9eca2ca0c6 Use varyings to implement MatrixEffects applied to DeviceCoord FPs.
Modify GrGLSLGP's logic to add a varying for a series of matrix sample
usages below a DeviceSpace FP in the FP hierarchy. The varying is based
off the GPs position output variable in the VS.

Adds a new sample usage type for the DeviceSpace FP.

Bug: skia:12198
Change-Id: Ic39f3296c60a073656ad0c72a431a462d5714e92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435717
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-08-02 19:39:13 +00:00
Ethan Nicholas
0dd5f62310 Removed unnecessary check in DSLWriter::Var
This was causing problems in the upcoming error reporting code and does
not appear to be doing anything useful anymore.

Change-Id: Ic4069d9c085e291907483c6019f49a089ee9370d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435796
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-08-02 19:29:21 +00:00
John Stiles
960b0f344d Fix cases of variable shadowing in samplecode/.
These were reviewed last year at http://review.skia.org/312480 but never
landed. Splitting into small chunks to land individually.

If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.

Change-Id: I53d04e5b2ffd7e170a8b10a6bacbc239c8b5e7ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435720
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2021-08-02 19:25:01 +00:00
Robert Phillips
a3f206e0b8 Non-substantive changes for making v1::SurfaceDrawContext V1-only
Bug: skia:11837
Change-Id: I60112e370c95e6f9d9bc12cb9b05d40dd2220bc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435279
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-08-02 19:22:58 +00:00
John Stiles
1be6cbbb96 Fix cases of variable shadowing in module/.
These were reviewed last year at http://review.skia.org/312480 but never
landed. Splitting into small chunks to land individually.

If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.

Change-Id: If993bfe66969d2278009d3a3aba999467f4ac3a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435719
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2021-08-02 19:13:02 +00:00
John Stiles
a212b95413 Fix cases of variable shadowing in gm/.
These were reviewed last year at http://review.skia.org/312480 but never
landed. Splitting into small chunks to land individually.

If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.

Change-Id: Ie6a262328315a5726265ef4afede7e0e66337752
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435718
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-08-02 19:02:56 +00:00
Ethan Nicholas
3533ff10c7 Converted InterfaceBlock name to string_view
Change-Id: I1d64165b43bc956d0f965fe55f29eebb37a8dbd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433002
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-08-02 18:12:47 +00:00
Brian Salomon
66b500a07c Remove explicit sample flag from GrFP.
Instead expand the map that is computed by GrGLSLGP to include a bool
that indicates whether each FP requires coords or not.

Now GrGLSLGP is solely responsible for determining which FPs take coords
and inserting any varyings. The rest of the system follows its lead when
generating FP functions and call sites.

Bug: skia:12198

Change-Id: I3471867fb64e94c7775c0b6209998159abeb6714
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435018
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-02 17:41:45 +00:00
John Stiles
d7437eec2e Fix for fuzzer-discovered error in SPIR-V with RTFlip.
SPIR-V code generation synthesizes some extra variables that don't
actually exist in the Program. Checking the ProgramUsage of these
variables would fail; ProgramUsage::get doesn't know about these
variables, so it asserts (and would consider them as dead even if it
didn't assert). We now track our SPIR-V bonus variables in a separate
set, and always report them as live.

Change-Id: If2f681470654025abf7ca4b3ec8126de2eb01297
Bug: oss-fuzz:36770
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435625
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-08-02 17:13:50 +00:00
Robert Phillips
4916c318fd Retract some headers (mainly GrOpsTask.h)
Bug: skia:11837
Change-Id: I22691e282fe9e994aafe32bed97f284d54595f74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432936
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-08-02 16:55:40 +00:00