platform/upstream/libSkiaSharp.git
7 years agoRemove unused unique ID from GrProgramElement
Brian Salomon [Mon, 9 Jan 2017 15:14:34 +0000 (10:14 -0500)]
Remove unused unique ID from GrProgramElement

Change-Id: I27140b378ad665c40f6edced1a655150ebd4842c
Reviewed-on: https://skia-review.googlesource.com/6800
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoexclude src/splicer from g3
Mike Klein [Mon, 9 Jan 2017 18:40:00 +0000 (13:40 -0500)]
exclude src/splicer from g3

Change-Id: Id1ecf20bb785e5979afa9e07ca4bb04a7d839fb7
Reviewed-on: https://skia-review.googlesource.com/6806
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoVarious memory leak fixes in Vulkan
Greg Daniel [Fri, 6 Jan 2017 19:40:08 +0000 (14:40 -0500)]
Various memory leak fixes in Vulkan

BUG=skia:6101

Change-Id: Iee798dd2d9dcc4521f643b814e65029b9383cc6f
Reviewed-on: https://skia-review.googlesource.com/6696
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoImprove quad edges' smoothness in non-AA cases
Yuqian Li [Fri, 6 Jan 2017 21:31:46 +0000 (16:31 -0500)]
Improve quad edges' smoothness in non-AA cases

Previously, non-AA quad edges only have an accuracy about 1/2 pixel
(while the AA quad edges have an accuracy about 1/8 pixel).  Now, we
increase non-AA quad edges' accuracy to 1/8 pixel as well.

The difference is very significant for rotating non-AA filled circles.
For example, run `./out/Debug/SampleApp --slide GM:fillcircle` with AA
turned off (by pressing b).

The benchmark added reveals that increasing quad accuracy from 1/2 to
1/8 doesn't affect the performance significantly. The following is the
1/2-accuracy performance versus 1/8-accuracy performance:

curr/maxrss     loops   min     median  mean    max     stddev  samples
config  bench
7/17  MB        19      2.43µs  2.57µs  2.81µs  10.5µs  22%     16119
8888    path_fill_big_nonaacircle
7/17  MB        17      1.38µs  1.42µs  1.52µs  13µs    20%     21409
8888    path_fill_small_nonaacircle

curr/maxrss     loops   min     median  mean    max     stddev  samples
config  bench
7/17  MB        71      2.52µs  2.59µs  2.79µs  7.67µs  19%     7557
8888    path_fill_big_nonaacircle
7/17  MB        64      1.45µs  1.49µs  1.51µs  2.39µs  5%      12704
8888    path_fill_small_nonaacircle

BUG=skia:

Change-Id: I3482098aeafcc6f2ec9aa3382977c0dc1b650964
Reviewed-on: https://skia-review.googlesource.com/6699
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agoGrTessellator: fix compile when LOGGING_ENABLED.
Stephen White [Mon, 9 Jan 2017 18:11:18 +0000 (13:11 -0500)]
GrTessellator: fix compile when LOGGING_ENABLED.

BUG=skia:

Change-Id: I1f0df58ffe79e439f92a8c1cd3c39812c32d039f
Reviewed-on: https://skia-review.googlesource.com/6743
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephan White <senorblanco@chromium.org>

7 years agoOmit flaky tests.
Ben Wagner [Mon, 9 Jan 2017 16:37:04 +0000 (11:37 -0500)]
Omit flaky tests.

BUG=skia:5876,skia:6082,skia:6086,skia:6097

Change-Id: I1f302c7bb0d147d976f320e01f969a1bd693c78c
Reviewed-on: https://skia-review.googlesource.com/6804
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoSeparate SkArithmeticImageFilter from SkXfermodeImageFilter.
Brian Salomon [Mon, 9 Jan 2017 15:48:23 +0000 (10:48 -0500)]
Separate SkArithmeticImageFilter from SkXfermodeImageFilter.

Change-Id: I145eed7276456b546ca5c66bc1a0f0f74a84f138
Reviewed-on: https://skia-review.googlesource.com/6728
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoSpecify bit depth and color space in SkImage::MakeFromPicture()
Matt Sarett [Mon, 9 Jan 2017 17:38:59 +0000 (12:38 -0500)]
Specify bit depth and color space in SkImage::MakeFromPicture()

BUG=skia:

Change-Id: I1d2a2b1f97557fc3e7ca6c2bdad6329f7760dbd2
Reviewed-on: https://skia-review.googlesource.com/6685
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoRevert "Revert "Removing ref counting from GrXPFactory.""
Brian Salomon [Mon, 9 Jan 2017 16:46:10 +0000 (11:46 -0500)]
Revert "Revert "Removing ref counting from GrXPFactory.""

This reverts commit 003312a211e65f35e402d6fe80a32e23d4c94ac4.

Change-Id: Ib41065e5c356d1dd99e70fa10611ac6756c2b79d
Reviewed-on: https://skia-review.googlesource.com/6803
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoSkSplicer
Mike Klein [Mon, 9 Jan 2017 15:20:13 +0000 (10:20 -0500)]
SkSplicer

I think I may have cracked the compile-ahead-of-time-splice-at-runtime nut.

This compiles stages ahead of time using clang, then splices them together at runtime.  This means the stages can be written in simple C++, with some mild restrictions.

This performs identically to our Xbyak experiment, and already supports more stages.  As written this stands alone from SkRasterPipeline_opts.h, but I'm fairly confident that the bulk (the STAGE implementations) can ultimately be shared.

As of PS 25 or so, this also supports all the stages used by bench/SkRasterPipelineBench.cpp:

    SkRasterPipeline_…
    400  …f16_compile 1x  …f16_run 1.38x  …srgb_compile 1.89x  …srgb_run 2.21x

That is, ~30% faster than baseline for f16, ~15% faster for sRGB.

Change-Id: I1ec7dcb769613713ce56978c58038f606f87d63d
Reviewed-on: https://skia-review.googlesource.com/6733
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRevert "Removing ref counting from GrXPFactory."
Brian Salomon [Mon, 9 Jan 2017 16:00:33 +0000 (16:00 +0000)]
Revert "Removing ref counting from GrXPFactory."

This reverts commit a8f80de2bc17672b4b6f26d3cf6b38123ac850c9.

Reason for revert: nanobench failing on windows bots, possibly others

Change-Id: Iacb8c650064a28654c165665be057377ffb02ba5
Reviewed-on: https://skia-review.googlesource.com/6802
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRemoving ref counting from GrXPFactory.
Brian Salomon [Sat, 7 Jan 2017 14:37:13 +0000 (09:37 -0500)]
Removing ref counting from GrXPFactory.

All GrXPFactory instances are static constexpr.

Change-Id: If1086b08534166201e53b3fd9379104e361eb5e6
Reviewed-on: https://skia-review.googlesource.com/6701
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoMark flatennable macros as block beginning/ending in .clang-format
Brian Salomon [Mon, 9 Jan 2017 14:37:06 +0000 (09:37 -0500)]
Mark flatennable macros as block beginning/ending in .clang-format

Change-Id: I08e907cd5051d9f8cd97cdd773f9ff326cc6a0d8
Reviewed-on: https://skia-review.googlesource.com/6739
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoFix SkColorSpaceXform F16 behavior
Matt Sarett [Mon, 9 Jan 2017 14:14:28 +0000 (09:14 -0500)]
Fix SkColorSpaceXform F16 behavior

After changing the matrix representation, we are no longer guaranteed
that the "a" in "rgba" is zeroed in store_f16_1() opaque.

This fixed Gold:
https://gold.skia.org/search?blame=26a0543579cf7473de2099ce0d056ac8aba83811&head=true&include=false&limit=50&neg=false&pos=false&query=source_type%3DcolorImage&unt=true

Also tacked on an optimization.  No need to load alpha when the image
is opaque.

BUG=skia:

Change-Id: I28d80c486b6644eee4a38a7a70f94eb51474e4b0
Reviewed-on: https://skia-review.googlesource.com/6738
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoxbyak -> skia mirror, pin version
Mike Klein [Mon, 9 Jan 2017 13:36:17 +0000 (08:36 -0500)]
xbyak -> skia mirror, pin version

xbyak hasn't changed in a couple weeks, so this pinned version is likely the version all bots are already on.

Change-Id: I050e508f601838015edcb9890214bd7ee1ac1e59
Reviewed-on: https://skia-review.googlesource.com/6737
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agomake SkRBuffer always validate
Mike Reed [Sun, 8 Jan 2017 19:35:29 +0000 (14:35 -0500)]
make SkRBuffer always validate

BUG=skia:6102

Change-Id: Ic9fb259b2e980d00e179340945c50492f1803a4f
Reviewed-on: https://skia-review.googlesource.com/6736
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agomove SkBlitRow.h out of public
Mike Reed [Sun, 8 Jan 2017 15:32:57 +0000 (10:32 -0500)]
move SkBlitRow.h out of public

BUG=skia:

Change-Id: I9a9c04fdb9fcfe50d57b28fa560a9b3d5499b699
Reviewed-on: https://skia-review.googlesource.com/6734
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoUpdate SKP version
UpdateSKPs [Sun, 8 Jan 2017 06:49:05 +0000 (06:49 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

Change-Id: I65999be80e4fb702abdab31bf70fff21b7284d1e
Reviewed-on: https://skia-review.googlesource.com/6742
Reviewed-by: update-skps <update-skps@skia.org>
Commit-Queue: update-skps <update-skps@skia.org>

7 years agofix to not assign uninitialized array to string
Mike Reed [Sun, 8 Jan 2017 04:08:05 +0000 (23:08 -0500)]
fix to not assign uninitialized array to string

fixes https://skia-review.googlesource.com/c/6727/

BUG=skia:

Change-Id: I8b8f79174ec32a1fa9d17dec4f5c812f70b83fbe
Reviewed-on: https://skia-review.googlesource.com/6731
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoremove SkMemoryWStream -- unused externally
Mike Reed [Sat, 7 Jan 2017 16:16:28 +0000 (11:16 -0500)]
remove SkMemoryWStream -- unused externally

BUG=skia:

Change-Id: Idbc9af4e703238871f56f623cd616fb7a5e686d3
Reviewed-on: https://skia-review.googlesource.com/6727
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoSkXbyak: loop inside, only body
Mike Klein [Sat, 7 Jan 2017 11:09:43 +0000 (06:09 -0500)]
SkXbyak: loop inside, only body

SkXbyak_…
927  …JITCompiled 1x  …Interpreted 1.33x  …HandWritten 1.97x

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I486bbc341a38354345bfcf3d6150d1628f83f186
Reviewed-on: https://skia-review.googlesource.com/6726
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRevert "Retry "SkRasterPipelineBlitter: support A8"..."
Mike Klein [Sat, 7 Jan 2017 22:04:51 +0000 (22:04 +0000)]
Revert "Retry "SkRasterPipelineBlitter: support A8"..."

This reverts commit f55ea6a1deb21120944d406124a2984b5009260a.

Reason for revert: crbug.com/679147

Original change's description:
> Retry "SkRasterPipelineBlitter: support A8"...
>
>     ...preferring SkA8_Coverage_Blitter over SkRasterPipelineBlitter.
>
> I think we could make this work with SkRasterPipelineBlitter (tell it, draw white in Src mode with this mask), but the existing blitter is pretty hard to beat in efficiency and correctness.
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
>
>
> Change-Id: I72df9995c63f3334d8111c59711818cb5ed1e63c
> Reviewed-on: https://skia-review.googlesource.com/6627
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

TBR=mtklein@chromium.org,brianosman@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I6a36b4c087a52e54f4d591ded40e6a202fb77068
Reviewed-on: https://skia-review.googlesource.com/6760
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoremove SkDebugWStream and other cleanups
Mike Reed [Sat, 7 Jan 2017 21:16:02 +0000 (16:16 -0500)]
remove SkDebugWStream and other cleanups

BUG=skia:

Change-Id: I06c07559b24411bd8bc4cba55bd8880f56486f76
Reviewed-on: https://skia-review.googlesource.com/6729
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoFix Sk8f::Store4 (for HSW)
Matt Sarett [Fri, 6 Jan 2017 22:30:55 +0000 (17:30 -0500)]
Fix Sk8f::Store4 (for HSW)

This should fix the colorspacexform gm in Gold.
https://gold.skia.org/search?head=true&include=false&limit=50&neg=false&pos=false&query=name%3Dcolorspacexform%26source_type%3Dgm&unt=true

BUG=skia:

Change-Id: I05e2c2c0e7d7095f6935e60ff1bf89858380335f
Reviewed-on: https://skia-review.googlesource.com/6721
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agotry harder to exclude SkXbyak.cpp from Google3 build
Mike Klein [Fri, 6 Jan 2017 21:18:02 +0000 (16:18 -0500)]
try harder to exclude SkXbyak.cpp from Google3 build

Change-Id: I26ce450e00b0634deeda61815ef6d501e788c0ae
Reviewed-on: https://skia-review.googlesource.com/6700
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agozero fBuf in new SkXbyakBench
Mike Klein [Fri, 6 Jan 2017 21:21:53 +0000 (16:21 -0500)]
zero fBuf in new SkXbyakBench

MSAN's keeping me honest...

CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

Change-Id: If61f75ec919a2b5ae0e973db05760f88588fe18f
Reviewed-on: https://skia-review.googlesource.com/6702
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoMake all GrXPFactory instances statics.
Brian Salomon [Fri, 6 Jan 2017 21:17:50 +0000 (16:17 -0500)]
Make all GrXPFactory instances statics.

Change-Id: I423b821d96d483db8c43a6d5530adbc19cd68912
Reviewed-on: https://skia-review.googlesource.com/6693
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoAdd a real SkXbyak bench, implement enough to run it.
Mike Klein [Fri, 6 Jan 2017 19:54:09 +0000 (14:54 -0500)]
Add a real SkXbyak bench, implement enough to run it.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

SkXbyak_…
9320  …JITCompiled 1x  …Interpreted 1.24x  …HandWritten 2.5x

Change-Id: I37d2d255ff32dcce73d29081d506e2d67477af97
Reviewed-on: https://skia-review.googlesource.com/6697
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoexclude src/opts/SkXbyak.cpp from g3 build
Mike Klein [Fri, 6 Jan 2017 19:13:28 +0000 (14:13 -0500)]
exclude src/opts/SkXbyak.cpp from g3 build

Change-Id: I5027275446ab9cc7fc7b12b2236a9d85ac50bef1
Reviewed-on: https://skia-review.googlesource.com/6695
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoAdd in Path fuzzer
Kevin Lubick [Fri, 6 Jan 2017 18:48:19 +0000 (13:48 -0500)]
Add in Path fuzzer

BUG=skia:

Change-Id: Ic8a56448b39bf6a8c6388bffb7f3b7c5ed798a2f
Reviewed-on: https://skia-review.googlesource.com/6692
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoAdd support for 64-bit devices when using gdb on Android
Derek Sollenberger [Fri, 6 Jan 2017 18:13:50 +0000 (13:13 -0500)]
Add support for 64-bit devices when using gdb on Android

Change-Id: I25c230dc7f417f3e09a01011377e6e0c7814092a
Reviewed-on: https://skia-review.googlesource.com/6689
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>

7 years agoPurge clip masks when they are no longer findable.
Brian Salomon [Fri, 6 Jan 2017 18:54:58 +0000 (13:54 -0500)]
Purge clip masks when they are no longer findable.

This improves memory usage when the content contains frequently changing clips implemented as masks.

BUG=chromium:676459

Change-Id: I06ea5f9fe1cff9564ea136bad9fe97f6ecd77ad9
Reviewed-on: https://skia-review.googlesource.com/6629
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoAvoid SkFixed overflow in decal bitmap procs
Florin Malita [Wed, 4 Jan 2017 18:01:55 +0000 (13:01 -0500)]
Avoid SkFixed overflow in decal bitmap procs

The check for decal mode can overflow in SkFixed.  Promote to
64bit (48.16) instead.

Also update can_truncate_to_fixed_for_decal() to take SkFixed params and
used it in ClampX_ClampY_filter_scale_SSE2().

BUG=chromium:675444
R=reed@google.com

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I759464cdaa5c005159e38e32167fb1937e2a1d28
Reviewed-on: https://skia-review.googlesource.com/6538
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoRemove arithmetic mode GrXP code.
Brian Salomon [Fri, 6 Jan 2017 17:54:58 +0000 (12:54 -0500)]
Remove arithmetic mode GrXP code.

The arithmetic mode xfermode is only used as an implementation detail of SkXfermodeImageFilter which always uses the arithmetic FP.

Change-Id: I5f9607aa9731a21e6666d9c749dfa705d40d5775
Reviewed-on: https://skia-review.googlesource.com/6688
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoAdd support for tagging GrUniqueKeys with a debug string
Brian Salomon [Fri, 6 Jan 2017 17:04:19 +0000 (12:04 -0500)]
Add support for tagging GrUniqueKeys with a debug string

Change-Id: Ie7d56214fdee7a19a1e8ca3869e5e4d5e72cedf8
Reviewed-on: https://skia-review.googlesource.com/6632
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoSkXbyak basics
Mike Klein [Fri, 6 Jan 2017 17:00:31 +0000 (12:00 -0500)]
SkXbyak basics

A little JIT proof of concept for SkRasterPipeline, using xbyak, which is a header-only assembler.  It's x86-only, but supports x86 very thoroughly, and it's very user friendly (at least as far as assembler libraries go...).

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ie17e562b0f3fff5914041badfb2c1fe4f86efab8
Reviewed-on: https://skia-review.googlesource.com/5730
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRetry "SkRasterPipelineBlitter: support A8"...
Mike Klein [Fri, 6 Jan 2017 16:30:55 +0000 (11:30 -0500)]
Retry "SkRasterPipelineBlitter: support A8"...

    ...preferring SkA8_Coverage_Blitter over SkRasterPipelineBlitter.

I think we could make this work with SkRasterPipelineBlitter (tell it, draw white in Src mode with this mask), but the existing blitter is pretty hard to beat in efficiency and correctness.

CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I72df9995c63f3334d8111c59711818cb5ed1e63c
Reviewed-on: https://skia-review.googlesource.com/6627
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRevert "Get latest ANGLE as of January 6, 2017"
Mike Klein [Fri, 6 Jan 2017 17:22:00 +0000 (17:22 +0000)]
Revert "Get latest ANGLE as of January 6, 2017"

This reverts commit 151d3b18fac381bc4d3d3b9017a9673bace889e5.

Reason for revert: broken bots

Original change's description:
> Get latest ANGLE as of January 6, 2017
>
> Also add ANGLE ES3 predefined configs.
>
> BUG=skia:
>
> Change-Id: I28d87b0676395d047e49bbb926db330f76cf17bd
> Reviewed-on: https://skia-review.googlesource.com/6683
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,brianosman@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I8e893761308044abbeabf52fc8f0fc83d84b98b1
Reviewed-on: https://skia-review.googlesource.com/6687
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoAdd a script and documentation for building the Viewer APK.
Derek Sollenberger [Fri, 6 Jan 2017 16:41:56 +0000 (11:41 -0500)]
Add a script and documentation for building the Viewer APK.

BUG=skia:6009

DOCS_PREVIEW= https://skia.org/?cl=6660

Change-Id: Ibcf0d1e7f3519e703bc74f0329d0ac92110e70ec
Reviewed-on: https://skia-review.googlesource.com/6660
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoGet latest ANGLE as of January 6, 2017
Brian Osman [Fri, 6 Jan 2017 16:26:42 +0000 (11:26 -0500)]
Get latest ANGLE as of January 6, 2017

Also add ANGLE ES3 predefined configs.

BUG=skia:

Change-Id: I28d87b0676395d047e49bbb926db330f76cf17bd
Reviewed-on: https://skia-review.googlesource.com/6683
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoGet Debugger app compiling again
Robert Phillips [Fri, 6 Jan 2017 15:25:56 +0000 (10:25 -0500)]
Get Debugger app compiling again

Change-Id: I307088b2cf4fc1404313f280975ac39105f70ac0
Reviewed-on: https://skia-review.googlesource.com/6604
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agosimplify by removing _d stages
Mike Klein [Fri, 6 Jan 2017 15:21:56 +0000 (10:21 -0500)]
simplify by removing _d stages

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I75e232faee6ad48f65bac5b119a461280b27bbc8
Reviewed-on: https://skia-review.googlesource.com/6661
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRevert "Revert "Hard code bicubic coefficients in the shader""
Brian Osman [Fri, 6 Jan 2017 16:13:06 +0000 (16:13 +0000)]
Revert "Revert "Hard code bicubic coefficients in the shader""

This reverts commit b38db9a48db09b233309dca4f0858c1f0976734d.

Reason for revert: Nevermind. The regression was actually a bug fix!

Original change's description:
> Revert "Hard code bicubic coefficients in the shader"
>
> This reverts commit 81ad5f744a775826c0d68bf035e891ae178f89d2.
>
> Reason for revert: Serious regressions on Tegra3, and significant regression on Adreno 530.
>
> Original change's description:
> > Hard code bicubic coefficients in the shader
> >
> > BUG=skia:
> >
> > Change-Id: Ie231a9bd2ea2083005a595e9e426590da740b2ed
> > Reviewed-on: https://skia-review.googlesource.com/6619
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> >
>
> TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org
> BUG=skia:
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I62b26f2a67e8a245c36bb6098c5cb9fbed21bb8f
> Reviewed-on: https://skia-review.googlesource.com/6630
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I5d6d59f7079aca53b60472e1add75b319068fa67
Reviewed-on: https://skia-review.googlesource.com/6682
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoBe able to fuzz a directory of input
Kevin Lubick [Fri, 6 Jan 2017 13:26:56 +0000 (08:26 -0500)]
Be able to fuzz a directory of input

BUG=skia:5878

Change-Id: I13552948c86a83f2384b83f59432c11779f305f1
Reviewed-on: https://skia-review.googlesource.com/6528
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRevert "Hard code bicubic coefficients in the shader"
Brian Osman [Thu, 5 Jan 2017 21:54:25 +0000 (21:54 +0000)]
Revert "Hard code bicubic coefficients in the shader"

This reverts commit 81ad5f744a775826c0d68bf035e891ae178f89d2.

Reason for revert: Serious regressions on Tegra3, and significant regression on Adreno 530.

Original change's description:
> Hard code bicubic coefficients in the shader
>
> BUG=skia:
>
> Change-Id: Ie231a9bd2ea2083005a595e9e426590da740b2ed
> Reviewed-on: https://skia-review.googlesource.com/6619
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I62b26f2a67e8a245c36bb6098c5cb9fbed21bb8f
Reviewed-on: https://skia-review.googlesource.com/6630
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRevert "Explicitly fail read/writePixels in invalid color space scenarios"
Brian Osman [Thu, 5 Jan 2017 21:40:16 +0000 (21:40 +0000)]
Revert "Explicitly fail read/writePixels in invalid color space scenarios"

This reverts commit efcc41805b43347444b83c1705d3d60c8d0caa70.

Reason for revert: Possible culprit for Chromium failures.

Original change's description:
> Explicitly fail read/writePixels in invalid color space scenarios
>
> It's not well defined what to do when moving from a nullptr color space to
> a tagged destination (drawing, reading, writing, etc...). In these
> scenarios, at least, we can choose to disallow the operation (rather than
> produce an unexpected or inconsistent result).
>
> BUG=skia:
>
> Change-Id: I033b23c6f2bb00664efc8fdab1b3f52053d77695
> Reviewed-on: https://skia-review.googlesource.com/6600
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
>

TBR=mtklein@google.com,bsalomon@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I17791f9285089ede42b7921324e0dc264865be1d
Reviewed-on: https://skia-review.googlesource.com/6628
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoHard code bicubic coefficients in the shader
Brian Osman [Thu, 5 Jan 2017 20:06:58 +0000 (15:06 -0500)]
Hard code bicubic coefficients in the shader

BUG=skia:

Change-Id: Ie231a9bd2ea2083005a595e9e426590da740b2ed
Reviewed-on: https://skia-review.googlesource.com/6619
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoUse stack instead of malloc() for most calls to SkRasterPipeline::run().
Mike Klein [Thu, 5 Jan 2017 20:03:53 +0000 (15:03 -0500)]
Use stack instead of malloc() for most calls to SkRasterPipeline::run().

Also split bench into run/compile variants to measure the effect:
 Before …f16_compile 1x  …f16_run 1.02x  …srgb_compile 1.56x  …srgb_run 1.61x
 After  …f16_run 1x  …f16_compile 1.01x  …srgb_compile 1.58x  …srgb_run 1.59x

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I8e65fb2acdbb05ccc0b3894f16d7646603c3e74d
Reviewed-on: https://skia-review.googlesource.com/6621
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRevert "SkRasterPipelineBlitter: support A8"
Mike Klein [Thu, 5 Jan 2017 20:25:46 +0000 (20:25 +0000)]
Revert "SkRasterPipelineBlitter: support A8"

This reverts commit f44373c119290b501d4aec7385e16d12c28a1f0f.

Reason for revert: MSAN

Original change's description:
> SkRasterPipelineBlitter: support A8
>
> This adds support for loading and storing A8, then uses it in SkRasterPipelineBlitter.
>
> I think this handles all dst formats now: A8, 565, 8888 (by policy, sRGB only) and F16.
>
> CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
>
>
> Change-Id: Id207f6e6c56b6bfcc301d77dd23e0959bb7afba8
> Reviewed-on: https://skia-review.googlesource.com/6554
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

TBR=mtklein@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I9ead3c3335e1776e9a1639ca0481253821505d67
Reviewed-on: https://skia-review.googlesource.com/6625
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoSkRasterPipelineBlitter: support A8
Mike Klein [Wed, 4 Jan 2017 21:32:17 +0000 (16:32 -0500)]
SkRasterPipelineBlitter: support A8

This adds support for loading and storing A8, then uses it in SkRasterPipelineBlitter.

I think this handles all dst formats now: A8, 565, 8888 (by policy, sRGB only) and F16.

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Id207f6e6c56b6bfcc301d77dd23e0959bb7afba8
Reviewed-on: https://skia-review.googlesource.com/6554
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoCleanup ops that are storing GrPipelineOptimizations.
Brian Salomon [Wed, 4 Jan 2017 18:25:17 +0000 (13:25 -0500)]
Cleanup ops that are storing GrPipelineOptimizations.

This is being stored and passed in places where it is unneeded or only 1 or 2 of its flags are needed.

Change-Id: Ifded9e645c0380e792708064ad69449653668acf
Reviewed-on: https://skia-review.googlesource.com/6583
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agomonobench: don't sort the Bench vector while iterating through it...
Mike Klein [Thu, 5 Jan 2017 19:23:57 +0000 (14:23 -0500)]
monobench: don't sort the Bench vector while iterating through it...

We sort to display Bench results in an ascending order, but we're doing this while iterating through the bench vector.  This is probably undefined, and really screws up the sample distribution in practice.  Slow benches run more often.

Instead, copy the results of the benches to a new Result vector to sort and display.  Each bench now gets its fair share of samples.

Change-Id: I4ead0d9d69af271c9971eedb35604a4b3bca0784
Reviewed-on: https://skia-review.googlesource.com/6623
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agomonobench: shuffle benchmark order between samples
Mike Klein [Thu, 5 Jan 2017 19:08:50 +0000 (14:08 -0500)]
monobench: shuffle benchmark order between samples

I had the thought that going through each bench in the same order is a bias we can avoid, however slight.

Change-Id: I2ef1a6f57c4d121883250d65ea2e98ebe834925d
Reviewed-on: https://skia-review.googlesource.com/6622
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRename batch->op in GrAuditTrail json and skiaserver's url handlers
Brian Salomon [Wed, 21 Dec 2016 20:40:26 +0000 (15:40 -0500)]
Rename batch->op in GrAuditTrail json and skiaserver's url handlers

Requires Infra change https://skia-review.googlesource.com/c/6397/

Change-Id: Ic04ea07a0450a99b291f1bc06d4a501d86f65f51
Reviewed-on: https://skia-review.googlesource.com/6398
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoGN: add skia_android_serial and push_$foo targets when it's set
Mike Klein [Thu, 5 Jan 2017 17:20:41 +0000 (12:20 -0500)]
GN: add skia_android_serial and push_$foo targets when it's set

E.g.
    $ ninja -C out push_dm

By default (ninja -C out) everything is built and pushed if skia_android_serial
is set.  Dependencies are tracked, so incremental builds push only executables
that have changed.

Change-Id: I586d81791f5f877b173cf61ed68fa9aab96234d2
Reviewed-on: https://skia-review.googlesource.com/6616
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoclamp to 1.0f in sk_linear_to_srgb_needs_round()
Mike Klein [Thu, 5 Jan 2017 17:23:37 +0000 (12:23 -0500)]
clamp to 1.0f in sk_linear_to_srgb_needs_round()

It's awkward today that it can go a little over 1.0f.
This is already slow, so a clamp won't slow it signficantly.

Change-Id: I9f882804e3ee949d72b7a05ad2cbac51731f6311
Reviewed-on: https://skia-review.googlesource.com/6617
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoMinor fixes for the Linux viewer
Jim Van Verth [Thu, 5 Jan 2017 18:50:49 +0000 (13:50 -0500)]
Minor fixes for the Linux viewer

BUG=skia:6091

Change-Id: Ia954c16610634e34f10bfe4273efc6677ca9563e
Reviewed-on: https://skia-review.googlesource.com/6618
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoignore max curvature at end point
Cary Clark [Thu, 5 Jan 2017 17:08:38 +0000 (12:08 -0500)]
ignore max curvature at end point

When a stroked cubic folds back on itself, the
stroker draws a round join.
If the max curvature is at
the endpoint, skip the join.

R=reed@google.com
BUG=skia:6083

Change-Id: I45e429432fcec311fa1115058515639370fe9a16
Reviewed-on: https://skia-review.googlesource.com/6606
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoExplicitly fail read/writePixels in invalid color space scenarios
Brian Osman [Thu, 5 Jan 2017 15:41:39 +0000 (10:41 -0500)]
Explicitly fail read/writePixels in invalid color space scenarios

It's not well defined what to do when moving from a nullptr color space to
a tagged destination (drawing, reading, writing, etc...). In these
scenarios, at least, we can choose to disallow the operation (rather than
produce an unexpected or inconsistent result).

BUG=skia:

Change-Id: I033b23c6f2bb00664efc8fdab1b3f52053d77695
Reviewed-on: https://skia-review.googlesource.com/6600
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRemove SK_SUPPORT_LEGACY_EVAL_CUBIC-guarded code
Florin Malita [Thu, 5 Jan 2017 16:09:37 +0000 (11:09 -0500)]
Remove SK_SUPPORT_LEGACY_EVAL_CUBIC-guarded code

To land after http://crrev.com/2610923004.

R=caryclark@google.com

Change-Id: I0a748801be06530f98009e977e816c90f1ef5934
Reviewed-on: https://skia-review.googlesource.com/6611
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoUse nullptr to indicate C locale when using xlocale
Brian Salomon [Thu, 5 Jan 2017 15:37:24 +0000 (10:37 -0500)]
Use nullptr to indicate C locale when using xlocale

BUG=chromium:666228

Change-Id: I951102eba2b79ddaa5eb134834471a4a3ec8aed7
Reviewed-on: https://skia-review.googlesource.com/6603
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoAdd tools to support gdb and simpleperf for android executables.
Derek Sollenberger [Thu, 5 Jan 2017 16:39:04 +0000 (11:39 -0500)]
Add tools to support gdb and simpleperf for android executables.

Change-Id: I6e7f41df094ae037538ebd61e40385d7e2e9eb26
Reviewed-on: https://skia-review.googlesource.com/6615
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRemove Perf-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-Android.
Ben Wagner [Thu, 5 Jan 2017 16:35:01 +0000 (11:35 -0500)]
Remove Perf-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-Android.

BUG=skia:6095

Change-Id: I037aa94b23f22a4a7976b3acaacf25e21464d0f4
Reviewed-on: https://skia-review.googlesource.com/6614
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoGN: add test_app template
Mike Klein [Thu, 5 Jan 2017 15:54:57 +0000 (10:54 -0500)]
GN: add test_app template

This template encapsulates two common features of our test apps:
  - they set testonly, marking them as safe to use testonly libraries
  - they may want instead to be libapp.so on Android.

I plan to follow up to make test_apps push themselves to an Android device when a new argument android_serial is set.

Change-Id: I010d219c14ff6d0cd6a543dd56fd471a67ddb6f1
Reviewed-on: https://skia-review.googlesource.com/6608
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoDelete SkMakeImageFromPixelRef
Matt Sarett [Thu, 5 Jan 2017 14:32:11 +0000 (09:32 -0500)]
Delete SkMakeImageFromPixelRef

There are no callers.

BUG=skia:

Change-Id: Ie743fc61cc0a0ca755d4e3fdab8a5985fa35fbd3
Reviewed-on: https://skia-review.googlesource.com/6598
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years ago-Fast bot upgrades
Mike Klein [Thu, 5 Jan 2017 13:09:57 +0000 (08:09 -0500)]
-Fast bot upgrades

  - GCC -> Clang;
  - Add a Perf bot.

This -Fast mode is a stand-in for "how clients should/do really release code".  Today everyone uses Clang, so we should probably switch this bot too.

I also got interested in how it compares in performance to our ordinary Release build, so I've added a Perf bot.

I did try turning on link-time optimization (much slower build, somewhat faster binary), but that failed at the link step.  Going to save that for later.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Fast,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-Fast,Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-Fast

Change-Id: I58e6109f8a89799d80e769316902549131b619cf
Reviewed-on: https://skia-review.googlesource.com/6595
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRemove DMSrcSinkAndroid.
Derek Sollenberger [Thu, 5 Jan 2017 14:50:22 +0000 (09:50 -0500)]
Remove DMSrcSinkAndroid.

This code involves Skia having knowledge of HWUI internals and
causes problems with various build systems.  It is also not
currently being used and is therefore expendable.

Change-Id: I7b6a37fa4c9afcefbc6a957b49e7735da872ff14
Reviewed-on: https://skia-review.googlesource.com/6597
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoOmit GPUMemoryTest for GTX1070 Windows Vulkan.
Ben Wagner [Wed, 4 Jan 2017 21:45:26 +0000 (16:45 -0500)]
Omit GPUMemoryTest for GTX1070 Windows Vulkan.

BUG=skia:6092

Change-Id: I820a2da22a1d852091c6a3416e11f90d6f644bc6
Reviewed-on: https://skia-review.googlesource.com/6586
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoMerge SkColorSpaceXform_XYZ and SkColorSpaceXform_Pipeline
Matt Sarett [Wed, 4 Jan 2017 21:54:55 +0000 (16:54 -0500)]
Merge SkColorSpaceXform_XYZ and SkColorSpaceXform_Pipeline

Use the pipeline implementation to handle F32.

This refactor has been broken away from the following mega-CL.
https://skia-review.googlesource.com/c/6260/

Change-Id: I79d8992f8c4a7e4dbf674a78484057a6b7f4f123
Reviewed-on: https://skia-review.googlesource.com/6585
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoDisable clang -Wsigned-enum-bitfield warnings
Matt Sarett [Wed, 4 Jan 2017 22:13:44 +0000 (17:13 -0500)]
Disable clang -Wsigned-enum-bitfield warnings

Full error text:
error: enums in the Microsoft ABI are signed integers by default;
consider giving the enum Properties an unsigned underlying type
to make this code portable [-Werror,-Wsigned-enum-bitfield]

BUG=skia:

Change-Id: I1491dd94c894e383fed401880fc04562140f7a66
Reviewed-on: https://skia-review.googlesource.com/6594
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoadd writePixels to SkBitmap
Mike Reed [Wed, 4 Jan 2017 21:34:31 +0000 (16:34 -0500)]
add writePixels to SkBitmap

BUG=skia:

Change-Id: I6f4db9ddc0364d9785e0f1794d86b73e66845ea9
Reviewed-on: https://skia-review.googlesource.com/6593
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoModify GrTessellator to use a VertexList where possible.
Stephen White [Wed, 4 Jan 2017 20:43:26 +0000 (15:43 -0500)]
Modify GrTessellator to use a VertexList where possible.

Prefer VertexList to a bare Vertex*. Also fix some 100-col issues.

This should have no user-visible impact.

Change-Id: I8fa260d5417c9832256529c232f532e69238fca0
Reviewed-on: https://skia-review.googlesource.com/6502
Commit-Queue: Stephan White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRetry trim another instruction off SkRasterPipeline overhead
Mike Klein [Wed, 4 Jan 2017 16:04:01 +0000 (11:04 -0500)]
Retry trim another instruction off SkRasterPipeline overhead

This time, with manual program memory management instead of std::vector<void*>.

Using STL types from SkOpts_hsw.cpp is not safe.  Things like std::vector<void*>
are inlined but not anonymous, so they're deduped by the linker arbitrarily.  This
is bad when we pick the version compiled with AVX instructions on a machine that
doesn't support AVX...

std::vector<Stage> was safe before because Stage itself was anonymous.  While not anonymous, std::vector<Stage> is unique to the compilation unit, because you can only refer to the anonymous Stage in the compilation unit.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_asan_rel_ng;skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I015e27583b6b6ff06b5e9f63e3f40ee6b27d6dbd
Reviewed-on: https://skia-review.googlesource.com/6550
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoAdd context markup to integer texture test
Brian Osman [Wed, 4 Jan 2017 19:11:36 +0000 (14:11 -0500)]
Add context markup to integer texture test

Trying to get better information about what's failing (and make this
easier in the future).

BUG=skia:6086

Change-Id: Iedb1269abb4527170b919bd90bce625a7f78f05a
Reviewed-on: https://skia-review.googlesource.com/6584
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoUpdate Android Apps to work with GN.
Derek Sollenberger [Wed, 4 Jan 2017 19:02:52 +0000 (14:02 -0500)]
Update Android Apps to work with GN.

This also includes the removal of an old example whose instructions
are not compatible with GN.

BUG=skia:6009

Change-Id: I2807829ca12c19292ae0f5a7ea250ed453f9a182
Reviewed-on: https://skia-review.googlesource.com/5620
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRemoves tracking of whether color is ignored by XP.
Brian Salomon [Wed, 4 Jan 2017 18:22:08 +0000 (13:22 -0500)]
Removes tracking of whether color is ignored by XP.

Removes the feedback to GrDrawOp via GrPipelineOptimizations.

Change-Id: I3cb17cad41779af292a92385fcd5ac23ae5a1ffd
Reviewed-on: https://skia-review.googlesource.com/6561
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoClamp premul colors correctly after a gamut change
Brian Osman [Wed, 4 Jan 2017 17:54:07 +0000 (12:54 -0500)]
Clamp premul colors correctly after a gamut change

Textures that we sample on the GPU are always premul, so we should
actually clamp to alpha.

Colors that are xformed on the CPU are always unpremul, so clamping to
[0,1] is correct. Add a comment explaining that.

BUG=skia:

Change-Id: I180f2d410f24afc78bd03ab8636a83fb443d68e2
Reviewed-on: https://skia-review.googlesource.com/6581
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoFix color space matrix hashing to avoid hashing the typemask
Matt Sarett [Wed, 4 Jan 2017 16:05:05 +0000 (11:05 -0500)]
Fix color space matrix hashing to avoid hashing the typemask

BUG=skia:

Change-Id: I8d4594fcf0eeebf598871bfe9203ed52460c98ce
Reviewed-on: https://skia-review.googlesource.com/6558
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRemoving tracking of whether GP/FP coverage calculations are used by XP.
Brian Salomon [Wed, 4 Jan 2017 15:44:42 +0000 (10:44 -0500)]
Removing tracking of whether GP/FP coverage calculations are used by XP.

Remove readsCoverage from GrPipelineOptimizations

Remove kNone from GrDefaultGeoProc::Coverage

Remove kIgnoreCoverage from GrXferProcessor::OptFlags

Remove GrPipeline::fIgnoresCoverage

Change-Id: I8f0c9337ee98b9c77af1e9a8a184519ce63822d4
Reviewed-on: https://skia-review.googlesource.com/6552
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoImprove detection of color space transfer fns
Matt Sarett [Wed, 4 Jan 2017 15:53:31 +0000 (10:53 -0500)]
Improve detection of color space transfer fns

BUG=skia:

Change-Id: I744af0efd4d48a8932b834092ed2dbad13008c1d
Reviewed-on: https://skia-review.googlesource.com/6556
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoauto-generate _d stages
Mike Klein [Wed, 4 Jan 2017 14:59:25 +0000 (09:59 -0500)]
auto-generate _d stages

Stage foo_d should always be the same logic as stage foo swapping r and dr, g
and dg, b and db, a and da.  This means we can infer their definitions.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ia0a3abb29a201c647d9ec1860211abfbc19b56ae
Reviewed-on: https://skia-review.googlesource.com/6555
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agofix skslc crash when ternary parameter types don't match
Ethan Nicholas [Tue, 3 Jan 2017 21:44:39 +0000 (16:44 -0500)]
fix skslc crash when ternary parameter types don't match

BUG=skia:5968

Change-Id: I541c7925ac83e830bd53015961312810042046c5
Reviewed-on: https://skia-review.googlesource.com/6545
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoUse shared toSRGBD50 matrix in SkPngCodec
Matt Sarett [Wed, 4 Jan 2017 14:41:09 +0000 (09:41 -0500)]
Use shared toSRGBD50 matrix in SkPngCodec

BUG=skia:

Change-Id: I1d2629ef954d8ac7211cfbb4707125ed175af63c
Reviewed-on: https://skia-review.googlesource.com/6553
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoStage SkFontMgr factories to return smart pointers.
Ben Wagner [Tue, 3 Jan 2017 18:32:36 +0000 (13:32 -0500)]
Stage SkFontMgr factories to return smart pointers.

All the SkFontMgr factories currently return bare pointers and sometimes
even document the ownership rules. Since such factories can be
implemented by external ports, the ownership rules should be explicit in
order to prevent simple reference counting issues.

Change-Id: I25b598ce0954cd473a3fb1f8adc0cb86331583ca
Reviewed-on: https://skia-review.googlesource.com/6533
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoRemove SkImageShader -> SkColorShader optimization.
Mike Klein [Tue, 3 Jan 2017 22:17:16 +0000 (17:17 -0500)]
Remove SkImageShader -> SkColorShader optimization.

It's turned out to be surprisingly subtle to make the optimization colorspace
correct (it's not today, but with this CL the affected images become colorspace
correct).

Before implementing a colorspace correct color shader, let's check we really need this.

Update: I should say, it's hard to do this optimization and make the resulting color shader be both colorspace correct and "legacy correct".  SkColorShader and SkColor4fShader are both colorspace correct.  It's just challenging to create one shader that's correct for both modes from an image.

Change-Id: I6593b6348175a10d7cbaaf3b531d7a7e2bf2f578
Reviewed-on: https://skia-review.googlesource.com/6548
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoScale the result of TightBounds when path was inverse-scaled
Fredrik Söderquist [Wed, 4 Jan 2017 12:31:47 +0000 (13:31 +0100)]
Scale the result of TightBounds when path was inverse-scaled

When the path was "large" (as defined by ScaleFactor(...)), the computed
bounds would not be adjusted to the correct space. Make sure to scale
the result in those cases.

BUG=chromium:678162

Change-Id: Ia2eb94050c4620286e9abb69976dbc0202ecc307
Reviewed-on: https://skia-review.googlesource.com/6501
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agofix fuzz
Cary Clark [Tue, 3 Jan 2017 21:25:18 +0000 (16:25 -0500)]
fix fuzz

R=kjlubick@google.com
BUG=skia:6084

Change-Id: I5978805c8d9048e399d83a13173c6a776cabe8ac
Reviewed-on: https://skia-review.googlesource.com/6544
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoRevert "trim another instruction off SkRasterPipeline overhead"
Mike Klein [Tue, 3 Jan 2017 23:42:04 +0000 (23:42 +0000)]
Revert "trim another instruction off SkRasterPipeline overhead"

This reverts commit e61c40707e70a2be9e32227a929173864f7895e1.

Reason for revert: this and the ODR caused operations on ContiguousContainerBase::elements_, another std::vector<void*> in Chrome, to start using AVX2 instructions.  Boy this is annoying...

Change-Id: I2c4837ad70fdef8096db904022b0703b88c6fd6c
Reviewed-on: https://skia-review.googlesource.com/6549
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoSpecify "/utf-8" with Visual C++.
Ben Wagner [Tue, 3 Jan 2017 22:09:59 +0000 (17:09 -0500)]
Specify "/utf-8" with Visual C++.

This sets the source and executable character set to utf-8. This avoids
issues with local code pages and avoids adding an unwanted BOM.

Change-Id: If854c0001c2363f3262d20e28dce30c1e733536a
Reviewed-on: https://skia-review.googlesource.com/6547
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoQuality and performance fixes for AA tessellating path renderer.
Stephen White [Tue, 3 Jan 2017 21:20:01 +0000 (16:20 -0500)]
Quality and performance fixes for AA tessellating path renderer.

Use quads rather than triangles for the edge geometry. This allows
us to perform a simpler edge categorization (see below). It also
improves performance by reducing the number of edges processed during
the simplify and tessellate steps.

Label AA edges as three types: inner, outer, and connector. This
results in correct alpha values for intersected edges, even when
the top or bottom vertex has been merged with a vertex on edges
of different types.

Changed the "collinear edges" sample from the concavepaths GM for a
"fast-foward" shape, which more clearly shows the problem being fixed
here. (The collinearity from the "collinear edges" was actually being
removed earlier up the stack, causing the path to become convex and
not exercise the concave path renderers anyway.)

NOTE: this will cause changes in the "concavepaths" GM results, and
minor pixel diffs in a number of other tests.

Change-Id: I6c2b0cdb35cda42b01cf1100621271fef5be35b0
Reviewed-on: https://skia-review.googlesource.com/6430
Reviewed-by: Stephan White <senorblanco@chromium.org>
Commit-Queue: Stephan White <senorblanco@chromium.org>

7 years agoRevert "Quality and performance fixes for AA tessellating path renderer."
Stephan White [Tue, 3 Jan 2017 21:06:16 +0000 (21:06 +0000)]
Revert "Quality and performance fixes for AA tessellating path renderer."

This reverts commit d4b21552481a6d313dfa9bc14b624c9ec94b56ce.

Reason for revert: accidentally added some unwanted changes

Original change's description:
> Quality and performance fixes for AA tessellating path renderer.
>
> Use quads rather than triangles for the edge geometry. This allows
> us to perform a simpler edge categorization (see below). It also
> improves performance by reducing the number of edges processed during
> the simplify and tessellate steps.
>
> Label AA edges as three types: inner, outer, and connector. This
> results in correct alpha values for intersected edges, even when
> the top or bottom vertex has been merged with a vertex on edges
> of different types.
>
> Changed the "collinear edges" sample from the concavepaths GM for a
> "fast-foward" shape, which more clearly shows the problem being fixed
> here. (The collinearity from the "collinear edges" was actually being
> removed earlier up the stack, causing the path to become convex and
> not exercise the concave path renderers anyway.)
>
> NOTE: this will cause changes in the "concavepaths" GM results, and
> minor pixel diffs in a number of other tests.
>
> BUG=660893
>
> Change-Id: Ide49374d6d173404c7223f7316dd439df1435787
> Reviewed-on: https://skia-review.googlesource.com/6427
> Commit-Queue: Stephan White <senorblanco@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,senorblanco@chromium.org,reviews@skia.org
BUG=660893
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I06a36e397645bfc42442a5a9e7c27328f6048ab9
Reviewed-on: https://skia-review.googlesource.com/6428
Commit-Queue: Stephan White <senorblanco@chromium.org>
Reviewed-by: Stephan White <senorblanco@chromium.org>
7 years agoQuality and performance fixes for AA tessellating path renderer.
Stephen White [Tue, 3 Jan 2017 20:24:19 +0000 (15:24 -0500)]
Quality and performance fixes for AA tessellating path renderer.

Use quads rather than triangles for the edge geometry. This allows
us to perform a simpler edge categorization (see below). It also
improves performance by reducing the number of edges processed during
the simplify and tessellate steps.

Label AA edges as three types: inner, outer, and connector. This
results in correct alpha values for intersected edges, even when
the top or bottom vertex has been merged with a vertex on edges
of different types.

Changed the "collinear edges" sample from the concavepaths GM for a
"fast-foward" shape, which more clearly shows the problem being fixed
here. (The collinearity from the "collinear edges" was actually being
removed earlier up the stack, causing the path to become convex and
not exercise the concave path renderers anyway.)

NOTE: this will cause changes in the "concavepaths" GM results, and
minor pixel diffs in a number of other tests.

BUG=660893

Change-Id: Ide49374d6d173404c7223f7316dd439df1435787
Reviewed-on: https://skia-review.googlesource.com/6427
Commit-Queue: Stephan White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agofixed a divide-by-zero bug in skslc
Ethan Nicholas [Tue, 3 Jan 2017 20:16:29 +0000 (15:16 -0500)]
fixed a divide-by-zero bug in skslc

BUG=skia:5960

Change-Id: I8ace6efefd14b11c3bc2448a1ab4e3353a29075f
Reviewed-on: https://skia-review.googlesource.com/6539
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoswitched GrVkPipelineStateCache over to use SkLRUCache
Ethan Nicholas [Tue, 3 Jan 2017 19:32:01 +0000 (14:32 -0500)]
switched GrVkPipelineStateCache over to use SkLRUCache

BUG=skia:

Change-Id: I04301313132df170a16995b4830b13ffbddbed3b
Reviewed-on: https://skia-review.googlesource.com/6469
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoFix: when pos is not finite, text pointer not advanced.
Herb Derby [Tue, 3 Jan 2017 19:15:11 +0000 (14:15 -0500)]
Fix: when pos is not finite, text pointer not advanced.

This fixes a problem introduced by change https://skia-review.googlesource.com/6404.

BUG=skia:6076

Change-Id: Iabf05c40284700dc32431f92df5ba5fcdb6cac1d
Reviewed-on: https://skia-review.googlesource.com/6534
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agovalidate deserialized path verbs
Mike Reed [Tue, 3 Jan 2017 18:58:21 +0000 (13:58 -0500)]
validate deserialized path verbs

BUG=676755

Change-Id: Ie9bd70d3a130c53737756587f73c9dce4a6bcb6d
Reviewed-on: https://skia-review.googlesource.com/6529
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
7 years agoGIF: Better check for frame dependency
Leon Scroggins III [Thu, 22 Dec 2016 21:40:24 +0000 (16:40 -0500)]
GIF: Better check for frame dependency

If a frame does not have a valid transparent index and it covers the
prior frame, it does not really depend on that frame. Instead, it
depends on the frame that the prior frame depends on.

Determine this once we have parsed the local color map (if any), so a
transparent index out of range of the color map is not considered
valid.

Share code that determines whether a frame has a transparent pixel.

Add a test that we compute the dependencies correctly. randPixelsAnim.gif
has 13 frames. After the first, the frames cover all combinations of

- Whether the prior frame was keep, restoreBG or restoreToPrevious
- Whether the new frame covers the prior frame
- Whether the new frame has a transparent pixel

(It only does so when using a global color table. It may make sense to
expand the test to also cover using local color tables.)

The test caught a bug where we incorrectly reused an existing
SkColorTable for a different frame. Fix that bug by keeping track of
the transparent index associated with the current SkColorTable.

Change-Id: I3cf6be7f612990fa7a00d9e74d116d31bd227526
Reviewed-on: https://skia-review.googlesource.com/6402
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoForce classic locale when parsing floats in skslc.
Ethan Nicholas [Tue, 3 Jan 2017 18:08:34 +0000 (13:08 -0500)]
Force classic locale when parsing floats in skslc.

atof is locale dependent, which can lead to bugs when a decimal separator is something other than a dot.

BUG=skia:

Change-Id: I6f161d686ddea86ce9968e46b632bc79a99ef656
Reviewed-on: https://skia-review.googlesource.com/6532
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agofix for Vulkan SPIR-V crash on some systems
Ethan Nicholas [Thu, 29 Dec 2016 21:36:40 +0000 (16:36 -0500)]
fix for Vulkan SPIR-V crash on some systems

BUG=skia:

Change-Id: I56113409901fcee7f6523e11b3f5721822830159
Reviewed-on: https://skia-review.googlesource.com/6490
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agotrim another instruction off SkRasterPipeline overhead
Mike Klein [Thu, 29 Dec 2016 16:06:34 +0000 (11:06 -0500)]
trim another instruction off SkRasterPipeline overhead

The overhead of a stage today is 3 x86 instructions, typically looking something like this:
   - movq (%rdi), %rax  // Load the next stage function pointer.
   - addq $0x10, %rdi   // Step our progress ahead 16 bytes to that next stage.
   - jmpq *%rax         // Transfer control to that stage.

But if we make sure the pointer's in esi/rsi, we can use lodsd/lodsq to do those first two steps in one instruction:
   - lodsq (%rsi), %rax    (≈ movq (%rdi), %rax; addq $0x8, %rsi).
   - jmpq *%rax

This CL rearranges things so that we can take advantage of this and generally trim off an instruction of overhead.  Instead of a vector of {Fn, ctx} pairs, we'll flatten it down into a single interlaced program vector of void*, basically just ommitting any null context pointers.  We pass the pointer to program as the second argument to Fn, putting it in rsi.  These two changes together make getting the next Fn to call or the current context the same cheap lodsq instruction, encapsulated as load_and_increment().

Here's how the simple "modulate" blend stage changes:

    vmulps  %ymm4, %ymm0, %ymm0
    vmulps  %ymm5, %ymm1, %ymm1
    vmulps  %ymm6, %ymm2, %ymm2
    vmulps  %ymm7, %ymm3, %ymm3
    movq    (%rdi), %rax
    addq    $0x10, %rdi
    jmpq    *%rax

    ~~~~~~~~>

    vmulps  %ymm4, %ymm0, %ymm0
    vmulps  %ymm5, %ymm1, %ymm1
    vmulps  %ymm6, %ymm2, %ymm2
    vmulps  %ymm7, %ymm3, %ymm3
    lodsq   (%rsi), %rax
    jmpq    *%rax

This does make getting the current context a one-time, destructive operation. It's switched from referring to ctx as a void* directly to using ctx() as a thunk that returns a void*.  No stage so far has ever referred to ctx twice, and it all appears to inline, so this seems harmless.  "matrix_2x3" is a good example of what stages that use context pointers end up looking like:

    lodsq   (%rsi), %rax
    vbroadcastss    (%rax), %ymm9
    vbroadcastss    0x8(%rax), %ymm10
    vbroadcastss    0x10(%rax), %ymm8
    vfmadd231ps     %ymm10, %ymm1, %ymm8
    vfmadd231ps     %ymm9, %ymm0, %ymm8
    vbroadcastss    0x4(%rax), %ymm10
    vbroadcastss    0xc(%rax), %ymm11
    vbroadcastss    0x14(%rax), %ymm9
    vfmadd231ps     %ymm11, %ymm1, %ymm9
    vfmadd231ps     %ymm10, %ymm0, %ymm9
    lodsq   (%rsi), %rax
    vmovaps %ymm8, %ymm0
    vmovaps %ymm9, %ymm1
    jmpq    *%rax

We can't do this with MSVC, as there's no intrinsic for it I can find, and they disallow inline assembly, and rsi is not used to pass arguments to functions there anyway.  ARM doesn't need it... it does this in two instructions naturally anyway.  We could do this for 32-bit x86 but I'd just rather focus on x86-64.

It's unclear to me that this makes things any faster, but doesn't appear to make things any slower, and makes I think both the code and disassembly simpler.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ia7b543a6718c75a33095371924003c5402b3445a
Reviewed-on: https://skia-review.googlesource.com/6271
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>