Commit Graph

50540 Commits

Author SHA1 Message Date
John Stiles
44e96bee4b Migrate SkSL Inliner out of IRGenerator and into its own module.
The functional changes needed to make this migration possible have
already been submitted in prior CLs, so although this is large, it is
almost entirely a mechanical migration of code from one file to another.

Change-Id: I54380b52e38ebcec40ffbca7cb254f9655cb1865
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313909
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-31 18:06:56 +00:00
Michael Ludwig
16d5b0a81a Consolidate image filter evaluation into SkBaseDevice
This CL does several things:
1. SkDevice subclasses that implement drawSpecial() now assert that the
provided SkPaint does not have an SkImageFilter.
2. The SkGpuDevice implementation of drawSpecial() is simplified to go
through the draw_texture_producer code path. This removes duplicate logic
for paint and texture handling, and also allows simple drawSpecials to
actually use the texture op.
3. SkCanvas' drawInternalDevice and onDrawImage now define the
skif::Mappings that define the coord transforms for filter eval and
final draw, before calling the new drawFilteredImage on SkDevice.
  - This is implemented in SkBaseDevice, but subclasses can extend it.
  - I had originally put it as a static function in SkCanvas, but that
    meant I had to forward declare more types in SkCanvas.h than I liked.
  - A lot of the skif::Context properties are dependent on the dst device
    anyways, so having a drawFilteredImage on device seems okay, now that
    filter eval is separated from how to draw a special image.
  - Once drawSpecial can take a matrix transform, and once image filters
know how to handle non-(0,0) source origins, this will simplify further.
4. Swapped the behavior of SkDevice::getRelativeTransform. I originally
wrote it so that it would be the matrix mapping from arg to caller.
After finally using it here (its original purpose), I realized it reads
better to be the matrix from caller to arg.
  - Previously this was never called, so compatibility isn't a problem.

Bug: skia:9558
Change-Id: If855903110947a11ae89b1e50cf5848a3c5dbecd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308768
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-31 17:43:16 +00:00
John Stiles
241f08018a Add helper function for inlining argument lists.
This doesn't change any behavior, just moves out repeated code to a
common place. (It does add a vector::reserve that wasn't present before,
but that's a pretty minor detail.)

Change-Id: I7b1fe8746af5192e2cddcc80418351395f3c702c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313838
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-31 16:20:46 +00:00
Mike Klein
4c2928bb0d deserialize drawPoints() mode safely
Use checkRange() to prevent an out-of-range enum.

Bug: oss-fuzz:25301
Change-Id: Icd20ebb8a60925d24ca39b9be0e85fafb361539a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314119
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-31 15:48:48 +00:00
Brian Salomon
db5582b711 Revert "Experiment to see if ANGLE ES2 vs ES3 perf is related to GLSL ver"
This reverts commit 952f088d41.

Reason for revert: Removing temporary perf experiment hack

Original change's description:
> Experiment to see if ANGLE ES2 vs ES3 perf is related to GLSL ver
> 
> Force ES2 level shading language on ANGLE.
> 
> Will be reverted. Only affects Skia tool builds.
> 
> Bug: skia:10644
> Change-Id: Ic52d6afae7f784b173725a9353d5f43f2da3ca72
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313703
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:10644
Change-Id: I5ba23c7479d6f7162a3b75e947787943866fb52f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314176
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-08-31 14:58:36 +00:00
John Stiles
ea9ab825ab Refactor inlineCall() to take a FunctionCall and SymbolTable as input.
This moves us closer to the goal of allowing inlineCall() to inline
functions later in the compilation process, rather than only during
initial IR generation. (Redesigning how extra statements are injected is
another hurdle to overcome.)

Change-Id: Idee34579dcf4d4414080ef5885732f6f3406005a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313841
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-31 14:35:16 +00:00
Brian Salomon
ffd61ca012 Simpler SkYUVAPixmapInfo construction
Bug: skia:10632
Change-Id: I40636d004f8458b3eb578caeeb9e77594ce8bc54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313908
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-31 13:45:46 +00:00
skia-autoroll
c23eeb8c78 Roll SwiftShader from ec3650f56ca2 to a2e6c1a149f4 (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/ec3650f56ca2..a2e6c1a149f4

2020-08-28 capn@google.com Optimize multisample resolve with SSE2 instructions
2020-08-28 capn@google.com Add a fast multisample resolve code path
2020-08-28 capn@google.com Make multisample resolve a Blitter method
2020-08-28 capn@google.com Work around std::is_trivially_copyable issue with MSVC

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: michaelludwig@google.com
Change-Id: I7cb8536f5da8b35cd907916b14f194f1d7265573
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314062
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-31 04:43:41 +00:00
skia-autoroll
5f71ffe44f Roll ANGLE from d3eba1db0a14 to 2f291c0bd181 (29 revisions)
d3eba1db0a..2f291c0bd1

2020-08-31 syoussefi@chromium.org Vulkan: Re-enable fixed dEQP tests
2020-08-30 syoussefi@chromium.org Vulkan: Fool-proof usage of GL and VK level indices
2020-08-29 jmadill@chromium.org Revert "Convert unordered_map to absl::flat_hash_map for select files"
2020-08-29 jmadill@chromium.org Fix EGLContextCompatibilityTest.
2020-08-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 11fcbbf5d7cc to 3b3f93c206dc (13 revisions)
2020-08-29 jmadill@chromium.org Enable -Wdeprecated-copy.
2020-08-29 jmadill@chromium.org Force impicit fallthrough off in xxhash.
2020-08-29 syoussefi@chromium.org Make copy*Texture parameters consistent for level indices
2020-08-28 cclao@google.com Vulkan: Use context staging buffer for CopyTexSubImage
2020-08-28 timvp@google.com Convert unordered_map to absl::flat_hash_map for select files
2020-08-28 jmadill@chromium.org Enable MSVC warning 4312.
2020-08-28 lehoangq@gmail.com Metal: autogen for EXT_occlusion_query_boolean.
2020-08-28 cclao@google.com Vulkan: Let stageSubresourceUpdateAndGetData use ctx staging buffer
2020-08-28 jmadill@chromium.org Enable -Wreturn-std-move-in-c++11.
2020-08-28 jmadill@chromium.org Enable -Wbad-function-cast.
2020-08-28 timvp@google.com Add third_party/abseil-cpp to ANGLE
2020-08-28 cclao@google.com Vulkan: Fix alignment issue with context staging buffer
2020-08-28 lehoangq@gmail.com Metal: Fix handling of vertex attrib offset not multiple of 4
2020-08-28 jmadill@chromium.org Enable two override suggestion warnings.
2020-08-28 cnorthrop@google.com Capture/Replay: Track groups of strings
2020-08-28 lehoangq@gmail.com Metal: Implement ANGLE_robust_resource_initialization.
2020-08-28 reveman@google.com Vulkan: Use 4 MB as preferredLargeHeapBlockSize for allocator.
2020-08-28 syoussefi@chromium.org Vulkan: Fixes to transform feedback emulation path
2020-08-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from cac2574c240a to af56d31487bb (5 revisions)
2020-08-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 0654095b63fb to d846ea5a2427 (4 revisions)
2020-08-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from c472fa2f0330 to 1b0bbd1550ed (1 revision)
2020-08-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 1f48854dae26 to ec3650f56ca2 (1 revision)
2020-08-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from bceab9fab4bc to 08291a3a9e22 (3 revisions)
2020-08-28 syoussefi@chromium.org Revert "Vulkan:Clean up best practices exceptions"

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: chromium:1122718
Tbr: michaelludwig@google.com
Test: Test: Manhattan MEC works again
Change-Id: I0e71aba6288ca83245681edfb38d618c3cdb376b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314063
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-31 04:41:21 +00:00
skia-autoroll
bdf790457a Roll Chromium from 15c4ec7c0cc6 to b89144a43412 (499 revisions)
15c4ec7c0c..b89144a434

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

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

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: michaelludwig@google.com
Change-Id: Id592d8e14691bbb5062328256cf629c5d9b76859
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314060
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-31 04:38:36 +00:00
skia-autoroll
ba1e083d37 Roll dawn from 900bd341a3c6 to 0b89b27263b1 (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/900bd341a3c6..0b89b27263b1

2020-08-28 enga@chromium.org Move client-side OnCompletion callbacks to the server.
2020-08-28 cwallez@chromium.org Unify ProgrammableStageDescriptor handling in PipelineBase

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: If981328e03368f99c2fcbc1240d3631210121361
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314061
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-31 04:36:16 +00:00
Mike Reed
85f51b2a40 Simplify firstdirection
Change-Id: I30d3056dc97a16c08b85fd77120485ef07b18d96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314037
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-30 15:01:02 +00:00
Mike Reed
3872c98951 Move convexity enum out of public
Also, move first-direction into SkPathRef.h so it can be referenced
by name in SkPath (instead of using uint8_t)

No functional change expected.

Change-Id: Ica4a8357a8156fd9a516118f23599a965b0fdd47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313980
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-30 13:04:22 +00:00
skia-recreate-skps
d5961b33e8 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Ie35a3cd045495284962bd103fadacec84c022ce6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313996
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-08-30 06:25:32 +00:00
Mike Reed
8702b8f444 don't return unknown from computing-convexity, as documented
Change-Id: I3b71a49a6329efe40f7388b1d4d9401edc1c7c88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313977
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-29 18:13:50 +00:00
Mike Klein
5d3314c53c overhaul blit_row_s32a_opaque()
- Remove branching on source alpha, which
    makes Skia susceptible to timing attacks.

  - Remove SSE4.1 variant, which is nearly identical
    to the SSE2 code once branching's removed.

  - Reroll SIMD loops back to their native vector
    size, leaving unrolling to the compiler.

  - Allow wider SIMD sets to cascade down into the
    narrower ones for the last few pixels instead of
    always hitting the scalar fallback.

  - Move code around, rewrite, refactor, etc. so it
    all reads more consistently.

  blit_row_color32() has not changed at all here,
  just moved to the bottom of the file to prevent
  it from interrupting blit_row_s32a_opaque().

  This prevents me from seeing the timing reconstructions
  on the Timing sample everywhere I've tested.

Charts to watch (ARMv7, ARMv8 AVX2, AVX512 geometric mean of SKP rendering):

    https://perf.skia.org/e/?formulas=geo(filter(%22config%3D8888%26cpu_or_gpu_value%3DAVX2%26extra_config%3D!Fast%26extra_config%3D!SK_FORCE_RASTER_PIPELINE_BLITTER%26source_type%3Dskp%26sub_result%3Dmin_ms%22))&formulas=geo(filter(%22config%3D8888%26cpu_or_gpu_value%3DAVX512%26source_type%3Dskp%26sub_result%3Dmin_ms%22))&formulas=geo(filter(%22arch%3Darm64%26config%3D8888%26source_type%3Dskp%26sub_result%3Dmin_ms%22))&formulas=geo(filter(%22arch%3Darm%26config%3D8888%26source_type%3Dskp%26sub_result%3Dmin_ms%22))

Bug: chromium:1088224
Change-Id: I4baf2ccd58ac3129ef01c2cf79c3826c9c0d389e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313716
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-08-29 13:04:30 +00:00
Herb Derby
6fd391a016 uv in x - fix iphone6
For some strange reason, bit 15 seems to create problems on iphone6
for gles. This works fine for mtl. Shift down to bits 13 and 14.

Change-Id: Id8e39d46bf23decaf1bd1a6058dd3fc999fc31cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313907
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-28 21:17:39 +00:00
Greg Daniel
ae1672bdb5 Remove the kFramebufferOnly flag from our validation checks again.
This flag was added recently since I noticed it was missing and should
be checked. However, Dawn fails this check in chrome since it doesn't
report this flag correctly to DDLs. Going back to the previous status
quo for now.

Bug: skia:10672
Change-Id: Ib825fe5a69bff7af0d9893b95cd4df80289be7b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313905
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-28 20:17:19 +00:00
Herb Derby
06296c69ee secure AtlasLocator
Add API to atlas locator to manipulate the PlotLocator and rect.
The next step is to store the page index in the rect using the
update methods to maintain the invariants between the PlotLocator
and the rect.

Change-Id: I7e27d20ffce7f08f71fef35d02bbd59eb4235dae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313903
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-28 19:41:39 +00:00
Herb Derby
d80cb1fb72 store the page bits in U only
Store the 2 page index bits in bits 14 and 15 of U. This allows
several simplifications.

Change-Id: Ib3ce98f0f5a430849acc0e6f6f3ecfabdb3f038d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313896
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-28 19:11:29 +00:00
Mike Klein
1e87a9ab4a second guess swizzler avx-512 opts
Like the last CL, not sure these outperform AVX2, and if they don't
they're either dead code or a risk that clocks the CPU down.

Best comparison chart I have to watch, where AVX-512 once again looks
worse than AVX2 at head:

    https://perf.skia.org/e/?formulas=geo(filter(%22bench_type%3Dskcodec%26cpu_or_gpu_value%3DAVX2%26extra_config%3D!Fast%26extra_config%3D!SK_FORCE_RASTER_PIPELINE_BLITTER%26model%3DGCE%22))&formulas=geo(filter(%22bench_type%3Dskcodec%26cpu_or_gpu_value%3DAVX512%26extra_config%3D!Fast%26extra_config%3D!SK_FORCE_RASTER_PIPELINE_BLITTER%26model%3DGCE%22))&formulas=geo(filter(%22bench_type%3Dskcodec%26cpu_or_gpu_value%3DAVX512%22))

Change-Id: Ia772ae0b5c7a96355fac36d55ebb224f6d42dd4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313865
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-28 17:20:59 +00:00
Mike Reed
6052c0bee0 Only expose isConvex on path publicly.
Subsequent CLs can work on combining convexity and direction

Bug: skia:10670
Change-Id: Ia44769ea88ffd99a56d4c6729a80a2044e790ec2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313837
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-28 16:56:29 +00:00
John Stiles
933abe39c9 Remove fProgram member from ProgramVisitor.
This was only used by a single visitor (MergeSampleUsageVisitor) and
just for its context. It is simpler for MergeSampleUsageVisitor to just
hold onto a Context& directly.

Change-Id: Ia38e3fa1b67498ac4c65a6a8450ca87aea1e0963
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313876
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-08-28 16:33:09 +00:00
Mike Klein
5c612ade3b create a sample to demonstrate a timing attack
This sample attempts to re-create an image's alpha channel by drawing it
one pixel at a time and timing how long each pixel takes to draw.

The "abc" text should appear twice normally, and the third and fourth
versions are reconstructed from timing, one by timing 1:1 pixel draws,
the other by timing 1x1:1024x1024 upscale into an offscreen.  It's not
meant to be an exact reconstruction, but you can easily see the shapes,
particularly at -O0, -O1, and -Os.  Auto-vectorization from -O2/-O3 do
a good amount to cover up the problem.

The legacy CPU backend is the main place to look.  I haven't been able
to reconstruct any images using SkRasterPipelineBlitter or SkVMBlitter,
and while on the GPU I do see non-random patterns in the timing, it
appears to be the same single pattern across devices, OSes, GPUs, GPU
APIs and content... I assume it's something like our resource caching
policy.

This can't really be a GM, given how it draws non-deterministically.

Bug: chromium:1088224
Change-Id: I2ec79c8dd407ecb104fd9bf0c8039cb6dd1fe436
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313466
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-28 16:17:39 +00:00
John Stiles
09dac44dbc Add helper function for making temp variables in inlineCall.
This doesn't change any behavior, just moves out repeated code to a
common place, and adds a handful of comments.

The code which creates a block of inlined statements has also been
reorganized a bit; the unique_ptr<Block> of inlined statements is now
created earlier, instead of creating a vector of statements and then
wrapping it in a Block in two separate places. Again, this shouldn't
cause any externally-visible behavioral changes; it's just doing the
same steps in a different order.

Change-Id: I89e87d93cf505ee30a49917390afab6a4f226aeb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313839
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-08-28 16:03:39 +00:00
Mike Klein
fc1eb95f39 second-guess AVX-512 opts
We've had some reason to double back on these AVX-512
opts and second guess whether they have any impact.

There's not much reason to keep building them if they're
the same speed as the AVX2 code with the extra risk of
AVX-512 downclocking.  In this case it's pretty easy
to maintain the AVX-512-aware code in SkBlitRow_opts.h,
so it'd be easy to add back if we find benefit later.

I plan to watch

    https://perf.skia.org/e/?queries=cpu_or_gpu_value%3DAVX512%26source_type%3Dskp%26sub_result%3Dmin_ms%26config%3D8888

and the geometric mean summary

    https://perf.skia.org/e/?formulas=geo(filter(%22cpu_or_gpu_value%3DAVX512%26source_type%3Dskp%26sub_result%3Dmin_ms%26config%3D8888%22))

Looking at this AVX-512 vs. AVX2 chart, we wouldn't expect to see any regression,
and likely an improvement:

    https://perf.skia.org/e/?formulas=geo(filter(%22config%3D8888%26cpu_or_gpu_value%3DAVX2%26extra_config%3D!Fast%26extra_config%3D!SK_FORCE_RASTER_PIPELINE_BLITTER%26source_type%3Dskp%26sub_result%3Dmin_ms%22))&formulas=geo(filter(%22config%3D8888%26cpu_or_gpu_value%3DAVX512%26source_type%3Dskp%26sub_result%3Dmin_ms%22))

Change-Id: Ib5ef8ec8cb4af1ecab254c31751761ee2bd153f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313809
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-28 15:39:39 +00:00
Mike Klein
442c57893c add missing include
SkBlitRow_opts.h is including this and masking the issue.

Change-Id: I0a5f873a2f9c486d40f86e79c8119081495ae1ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313810
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-28 15:37:29 +00:00
Brian Salomon
280fa3d303 Remove use of texture swizzle in GL backend.
This has always been a potential source of a bug. If the same texture is
used twice in a shader with different swizzles we would overwrite the
swizzle for the first use by that of the second use since there is
only one fixed function swizzle per texture. It's not part of the
sampler state.

We set the swizzle when it is a feature, but always to RGBA.

Also, highly speculative that this may improve ANGLE D3D11 ES3
performance compared to ES2.

Bug: skia:10644
Change-Id: I8877afc3043c5ddaafd26ea9f9bd372303328c71
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313682
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-08-28 15:22:29 +00:00
Mike Klein
e7f7158900 add suggested override
Using Chromium's clang with skia_use_metal=true produces

    ../src/gpu/mtl/GrMtlCommandBuffer.h:25:5: warning: '~GrMtlCommandBuffer' overrides a destructor but is not marked 'override' [-Wsuggest-destructor-override]
        ~GrMtlCommandBuffer();

Change-Id: I177a6645a37cf9853b9284798eb48997428e1854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313808
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-28 15:03:19 +00:00
Brian Osman
8a43e20660 Don't run glesnarrow on Mali400 bots
Change-Id: I9b908bc1cdd28f3bd6819096420b1d119eecd62e
Bug: skia:10669
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313836
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-08-28 13:48:09 +00:00
Mike Reed
43c78abe04 Remember to track convexity/direction for IsA shapes (e.g. oval, rrect)
In a follow-up, I will explore more clearly tying together convexity
and direction internally -- perhaps a unified enum?
    [ unknown, convex_cw, convex_ccw, concave ]

Change-Id: I9fc2a2205f40050f4c24c5bec7fc25c8b6d2461c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313680
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-28 12:51:57 +00:00
John Stiles
ce591b7d2f Fix a handful of remaining C-style casts in IRGenerator.
Change-Id: Ia0e2cbc14f6b61a14fd87b23a7dc8bfc0f827775
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313679
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-28 12:40:07 +00:00
skia-autoroll
d385091edd Roll Chromium from e3029d74cf64 to 15c4ec7c0cc6 (406 revisions)
e3029d74cf..15c4ec7c0c

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

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

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: mtklein@google.com
Change-Id: Id7018c5d53e8df9bee2689595292a15a042f9bbb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313767
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-28 05:30:37 +00:00
skia-autoroll
5fc37c9ccc Roll ANGLE from 68c8ed7aec14 to d3eba1db0a14 (19 revisions)
68c8ed7aec..d3eba1db0a

2020-08-28 courtneygo@google.com Fix ASAN error with test
2020-08-28 jmadill@chromium.org Fix warnings that show up in Skia with MSVC.
2020-08-27 bsheedy@chromium.org Workaround GN bug
2020-08-27 jonahr@google.com Fix badly formatted dEQP test expectation
2020-08-27 courtneygo@google.com Revert "Vulkan: restore mContentDefined at endRP()"
2020-08-27 ianelliott@google.com Vulkan: Fix whitebox test to end render pass
2020-08-27 tobine@google.com Vulkan:Clean up best practices exceptions
2020-08-27 jonahr@google.com Suppress functional_shaders_indexing_tmp_array_*_const_* on Metal
2020-08-27 tobine@google.com Vulkan:Use roundUpPow2 where possible
2020-08-27 amy.liu@arm.com Disable forceOldRewriteStructSamplers on Mali.
2020-08-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 7a71abb602a2 to cac2574c240a (1 revision)
2020-08-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from 834673eaa34a to ced848d699b5 (1 revision)
2020-08-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 94ee680cab4c to 11fcbbf5d7cc (1 revision)
2020-08-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from e1c7eaa74142 to 0654095b63fb (3 revisions)
2020-08-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 2205254cfb50 to bceab9fab4bc (3 revisions)
2020-08-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 983698bb34ec to 517f39eee46f (1 revision)
2020-08-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from dda8dabe9eb3 to c472fa2f0330 (4 revisions)
2020-08-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 622558b02e1a to 1f48854dae26 (3 revisions)
2020-08-27 timvp@google.com Revert "Vulkan: Only count descriptor set resources once"

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: chromium:1122621
Tbr: mtklein@google.com
Test: Test: dEQP-GLES31.functional.uniform_location.nested_array.*sampler2D_*
Change-Id: I6d8ee842c80f9cdac89617521cbaf7229bebe0ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313770
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-28 04:41:37 +00:00
skia-autoroll
6e093d6287 Roll SwiftShader from 1f48854dae26 to ec3650f56ca2 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/1f48854dae26..ec3650f56ca2

2020-08-27 srisser@google.com Add getPhysicalDeviceFeatures2

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: mtklein@google.com
Change-Id: I6eb56d8906c4f681ec8dca31d3bd5d7574f0c022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313769
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-28 04:39:37 +00:00
skia-autoroll
983b416231 Roll dawn from 8c012e879646 to 900bd341a3c6 (1 revision)
https://dawn.googlesource.com/dawn.git/+log/8c012e879646..900bd341a3c6

2020-08-27 jiawei.shao@intel.com Enable TextureSubresourceTest.MipmapLevelsTest on Vulkan w/ validation

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: Iddf6c677fa9769352afccda81df9f3d2dc4056f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313768
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-28 04:31:17 +00:00
Brian Salomon
952f088d41 Experiment to see if ANGLE ES2 vs ES3 perf is related to GLSL ver
Force ES2 level shading language on ANGLE.

Will be reverted. Only affects Skia tool builds.

Bug: skia:10644
Change-Id: Ic52d6afae7f784b173725a9353d5f43f2da3ca72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313703
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-08-27 23:31:59 +00:00
Herb Derby
716e281185 use a dense index internally in SkScalerCache
This is an experiment to gauge the additional cost of an extra
indirection. I plan to put it into production to see the impact in
the different clients. The long term goal is to have an API that
works on dense glyph indexes instead of SkGlyph*. This moves from a
system with multiple hash lookups to a single cache lookup. The
lookup would happen on the Renderer side, and the index could be
used to find the glyph directly instead of using a hash map with the
packed glyph id on the GPU side. Eventually, the extra indirection
cost would be recouped by small glyph data (an int instead of a
pointer), and fewer hashmap lookups.

Change-Id: I6dcad6253de54df13c000ecc936a99028cbff5a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313681
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-08-27 22:23:49 +00:00
Greg Daniel
30691f8647 Make sure we set vk input attachment for case when doing copy.
This should fix the current bot failures from previous change.

Change-Id: I1ef4736e9318de6797445a5964c5d29f186811ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313704
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-08-27 22:01:09 +00:00
John Stiles
ee58da9d6f Remove unused count_returns method.
It has been replaced by ProgramVisitors.

Change-Id: I3a79dd46b191d82b025d515c9810e9593f7cf909
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313684
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-27 20:54:49 +00:00
John Stiles
656427a553 Prefer unique_ptr<> and make_xxxx over raw pointers and new.
There doesn't seem to be any reason to use a raw pointer for the
IRGenerator.

Change-Id: I5a37ff8ee212534dc8357722aaf70637623840bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313720
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-27 20:11:09 +00:00
Greg Daniel
638b2e8594 Add GrInternalSurfaceFlag for vulkan input attachment.
This also includes all the plumbing of this flag throughout our proxy
and surface system.

Bug: skia:10409
Change-Id: I48d40012049240cfa80e045ea090f68ce2d2ff0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313676
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-08-27 20:05:29 +00:00
John Stiles
f1bc828205 Replace complex count_returns method with a ProgramVisitor.
These ProgramVisitor classes do the exact same work as count_returns.
Hopefully they are easier for us to reason about, since we no longer
have one omni-method trying to implement three different counts at once.

count_returns still exists in this CL so we can SkASSERT that our
results are unchanged. It is removed entirely in the followup CL.

Change-Id: I17588bcec375a946da6cc6fdb5bab9a3d7d24904
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313683
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-27 19:41:59 +00:00
Herb Derby
532a264c14 use bit 15 to encode page information in glyph UV
Store the page information in bit 15 of the glyph texture UV.
This code is specifically designed to only use 16-bits of
significand.

Change-Id: I36f268b5b131eaad46b05c67ffd4b7a55cfa2bde
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313519
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-27 19:30:19 +00:00
Adlai Holler
bcfc554fde Add GrDirectContext arg to SkImage::readPixels
Note: The polarity of the staging flag is inverted from usual because
a G3 dependency with no SkUserConfig.h relies on the legacy API.

Once this lands, we will migrate them and others, then remove the
staging API. The inverted staging flag is kind of nice, actually - I may
use that pattern in the future. It means less total CLs and it's just as
easy to flip the bit on or off during debugging.

Bug: skia:104662
Change-Id: I48cba1eeae3e2e6f79918c6d243e0666e68ec71b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310656
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-08-27 19:26:29 +00:00
Chris Dalton
b0ebb5a599 Don't pre-scale tessellated strokes by the matrix scale
In order to expand into the correct amount of triangles, we instead
factor the matrix scale into the tolerances.

Bug: skia:10419
Change-Id: I178b9600a8837ec5fc997199a8bf6be87227ec94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313300
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-08-27 19:22:09 +00:00
Brian Osman
55f02eb3ff Run glnarrow/glesnarrow on GPU perf bots
This gives us actual performance data on the cost of color management.

Change-Id: Ia74379f10791f0a8b3607c313e5108215c28b56b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313685
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-27 19:19:29 +00:00
Mike Reed
5a1ebc6247 use pathbuilder
Change-Id: I9e72ff82df1c10e63cab56208c3c04c0994f7fe3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313423
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-27 16:58:12 +00:00
Brian Osman
b6bd0d2094 Make SkRuntimeShaderBuilder safe for reuse
Previously, if you snapped off a shader and then changed uniforms
(without drawing & flushing), we'd trigger the SkData assert about
calling writeable_data when not-uniquely-owned. Now we lazily copy the
SkData when necessary.

Includes unit test that previously failed.

Bug: skia:10667
Change-Id: If8d9dd8106d41e66560d760cb36ed83371791fc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313678
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-27 16:09:37 +00:00
John Stiles
318ad4bb19 Improve control-flow support in early-return detection.
Previously, early-return detection worked by ensuring that a function
had a maximum of one return statement, positioned at the end of the
function. However, this technique did not support if-else statements:

   if (a) { ...; return x; } else { ...; return y; }

This meant that many simple cases were unnecessarily wrapped in a do-
while loop to handle control flow issues that didn't actually occur.

Our early-return detection logic is now more flexible and looks for any
return statements that aren't at an exit point in the control flow,
instead of looking for exactly one return at the end of the code.

Change-Id: Iffe71adf2b9349ce8de42ba8301ccc52abe2882b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313418
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-27 16:04:58 +00:00