platform/upstream/libSkiaSharp.git
7 years agoRevert "Make blur utils take GrTextureProxies"
Robert Phillips [Mon, 30 Jan 2017 15:58:27 +0000 (15:58 +0000)]
Revert "Make blur utils take GrTextureProxies"

This reverts commit d0dc05b98b71af43b44f13beba1292db52b75539.

Reason for revert: assertion failure on N7

Original change's description:
> Make blur utils take GrTextureProxies
>
> Change-Id: I1c5054de6d9827eece2f73c4c78818b4db0bc611
> Reviewed-on: https://skia-review.googlesource.com/7738
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>

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

Change-Id: I82d9385e23279db4c7a6757f1224e603e231354c
Reviewed-on: https://skia-review.googlesource.com/7744
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoMake blur utils take GrTextureProxies
Robert Phillips [Mon, 30 Jan 2017 14:14:04 +0000 (09:14 -0500)]
Make blur utils take GrTextureProxies

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

7 years agoRoll Recipe DEPS
Eric Boren [Mon, 30 Jan 2017 13:40:08 +0000 (08:40 -0500)]
Roll Recipe DEPS

BUG=skia:

Change-Id: I9a88c578e53f5df1ad3bf06df7469bf010bdae21
Reviewed-on: https://skia-review.googlesource.com/7736
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoPush GrTextureProxy down to more effects
Robert Phillips [Mon, 30 Jan 2017 13:06:27 +0000 (08:06 -0500)]
Push GrTextureProxy down to more effects

Change-Id: Ie3f32a88f25af082c25bc6daf3fe24e303e80f9e
Reviewed-on: https://skia-review.googlesource.com/7616
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoOmit new test from Bazel ASAN.
Ben Wagner [Mon, 30 Jan 2017 02:50:51 +0000 (21:50 -0500)]
Omit new test from Bazel ASAN.

BUG=skia:

Change-Id: Id22973cc861a41e5e72561cd47acdcc81e2824b0
Reviewed-on: https://skia-review.googlesource.com/7732
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoRevert "SkRasterPipeline shader adapter"
Florin Malita [Sun, 29 Jan 2017 16:42:42 +0000 (16:42 +0000)]
Revert "SkRasterPipeline shader adapter"

This reverts commit 6d11ed2951fadc281433606a8edc6774bed39735.

Build failure: https://chromium-swarm.appspot.com/task?id=3403da0cdee8c210&refresh=10

../../../src/core/SkOpts.cpp -o obj/src/core/libskia.SkOpts.o
In file included from ../../../src/core/SkOpts.cpp:46:
../../../src/opts/SkRasterPipeline_opts.h:1093:11: error: no member named 'Load4' in '(anonymous namespace)::SkNx<8, float>'
    SkNf::Load4(buf, &r, &g, &b, &a);
    ~~~~~~^
1 error generated.

Leak: https://chromium-swarm.appspot.com/task?id=3403df55fd5eaa10&refresh=10

Original change's description:
> SkRasterPipeline shader adapter
>
> (lifted from https://skia-review.googlesource.com/c/7088/)
>
> R=​mtklein@google.com,herb@google.com,reed@google.com
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
>
> Change-Id: Idddb84069423c5fc535bea0a65a5b21a4d07084d
> Reviewed-on: https://skia-review.googlesource.com/7615
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I68c0be3398bde93cd0842baf25b025c5fe1c3df7
Reviewed-on: https://skia-review.googlesource.com/7730
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoSkRasterPipeline shader adapter
Florin Malita [Fri, 27 Jan 2017 21:41:22 +0000 (16:41 -0500)]
SkRasterPipeline shader adapter

(lifted from https://skia-review.googlesource.com/c/7088/)

R=mtklein@google.com,herb@google.com,reed@google.com

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

Change-Id: Idddb84069423c5fc535bea0a65a5b21a4d07084d
Reviewed-on: https://skia-review.googlesource.com/7615
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoRename GrFragmentProcessor::MulOutputByInputUnpremulColor to MakeInputPremulAndMulByO...
Brian Salomon [Thu, 26 Jan 2017 16:25:12 +0000 (11:25 -0500)]
Rename GrFragmentProcessor::MulOutputByInputUnpremulColor to MakeInputPremulAndMulByOutput.

Change-Id: I33d74ddb8a7836e8f1922a5ae73f0adb74d59db3
Reviewed-on: https://skia-review.googlesource.com/7609
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoMake SkSmallAllocator obey alignment properties of objects.
herb [Sat, 28 Jan 2017 20:42:16 +0000 (15:42 -0500)]
Make SkSmallAllocator obey alignment properties of objects.

TBR=mtklein@google.com

Change-Id: I505590f18a7e5babc9f0fc8af07d89b774d267bf
Reviewed-on: https://skia-review.googlesource.com/7728
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoUpdate SkJPEGImageEncoder
Matt Sarett [Fri, 27 Jan 2017 23:16:40 +0000 (18:16 -0500)]
Update SkJPEGImageEncoder

(1) Use libjpeg-turbo color space extensions when possible.
(2) Use transform_scanline_procs when pre-libjpeg-turbo transformation
    are required.
(3) Add support for Gray and F16.

BUG=skia:

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

7 years agoAdd missing nextafter() clamping to SkLinearBitmapPipeline tile procs
Florin Malita [Fri, 27 Jan 2017 20:39:32 +0000 (15:39 -0500)]
Add missing nextafter() clamping to SkLinearBitmapPipeline tile procs

Fixes the asserts trigered in
https://skia-review.googlesource.com/c/7615

Change-Id: I7e1802bc699becf85396445fe0df4cb110ab69c4
Reviewed-on: https://skia-review.googlesource.com/7720
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoAA GrTessellator: fix bevelling of acute angles.
Stephen White [Fri, 27 Jan 2017 15:53:15 +0000 (10:53 -0500)]
AA GrTessellator: fix bevelling of acute angles.

The code to handle acute outer angles in generated geometry was pretty
broken: it did a simple runnning average of consecutive acute vertices,
and didn't handle acute angles between the last and first edges.
Replaced it with something simpler that does proper bevelling for
angles less than 2.5 degrees.

This revealed a bug with thin path segments, exposed by the thinconcavepaths
test. This will be fixed by upcoming changes, but I've also dded a few more
test cases to make it clearer.

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

7 years agoexperimental/documentation/gerrit.md
Hal Canary [Fri, 27 Jan 2017 18:33:55 +0000 (13:33 -0500)]
experimental/documentation/gerrit.md

NOTRY=true
Change-Id: I5f429b48732ca99409cb923c2a3d7bf5f4189d24
Reviewed-on: https://skia-review.googlesource.com/7723
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoverify that glyph position rect is non-empty in GrAtlasTextBlob::appendGlyph
Lee Salzman [Fri, 27 Jan 2017 19:31:10 +0000 (14:31 -0500)]
verify that glyph position rect is non-empty in GrAtlasTextBlob::appendGlyph

BUG=skia:

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

7 years agoGenerate Android build targets for dm and nanobench
Leon Scroggins III [Thu, 26 Jan 2017 22:21:27 +0000 (17:21 -0500)]
Generate Android build targets for dm and nanobench

Generate targets for dm and nanobench from ninja and add them to the
generated Android.bp file.

Remove nanobenchAndroid and SkAndroidSDKCanvas. These rely on HWUI
internals and are currently unused.

Update gyp file references to removed files, just in case.

Change-Id: Ic6ae18a70bfd0c33804e7996d077f2081dfdfe07
Reviewed-on: https://skia-review.googlesource.com/7635
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoAdd geometric version of spot shadow
Jim Van Verth [Fri, 27 Jan 2017 19:15:54 +0000 (14:15 -0500)]
Add geometric version of spot shadow

BUG=skia:6119

Change-Id: Ib9770bd88f4eebd68f2d893c5788f966d89f193c
Reviewed-on: https://skia-review.googlesource.com/7585
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoRemove old generator code
Leon Scroggins III [Thu, 26 Jan 2017 22:28:35 +0000 (17:28 -0500)]
Remove old generator code

We're generating Android.bp from BUILD.gn, so no need for the old
version.

Change-Id: Ie5bcec1d4f15d0e9a178feb9191e42c872bd8e08
Reviewed-on: https://skia-review.googlesource.com/7639
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoSet fOptions in SkCodec::getPixels
Leon Scroggins III [Fri, 27 Jan 2017 18:16:28 +0000 (13:16 -0500)]
Set fOptions in SkCodec::getPixels

Subclasses sometimes try to read fOptions, but it used to not get set
for full decodes. As a result, they might be reading the Options from a
previous scanline/incremental decode. In addition to being wrong, this
is bad in the case of an fSubset pointing to a rectangle that no longer
exists.

So set fOptions in getPixels, prior to any attempts to read it by sub-
classes. Use a different workaround for the webp/incomplete bug. Set
fSubset to null prior to calling fillIncompleteImage. It can only be
non-null for webp, and in that case we do not want the fill call to
be using the subset width.

Modify the Codec_jpeg_rewind test to use an incomplete image, so that
it will also test fillIncompleteImage.

DM tests of inc0.webp and inc1.webp will verify that the incomplete
bug has not resurfaced.

BUG=skia:5772

Change-Id: If5e1e3c9a7f337183783299c0a9e58dcbbc84119
Reviewed-on: https://skia-review.googlesource.com/7682
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agogive up on big cubics (for now) and just draw a line
Mike Reed [Fri, 27 Jan 2017 16:59:07 +0000 (11:59 -0500)]
give up on big cubics (for now) and just draw a line

BUG=683631, skia:6152

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

7 years agoSkTScopedComPtr: implicit nullptr cast to SkTScopedComPtr<T>()
Hal Canary [Fri, 27 Jan 2017 13:20:17 +0000 (08:20 -0500)]
SkTScopedComPtr: implicit nullptr cast to SkTScopedComPtr<T>()

Change-Id: Ic09da242650eb20164f31333e912fc899428c548
Reviewed-on: https://skia-review.googlesource.com/7634
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoRemove SkBlitter:resetShaderContext()
Florin Malita [Fri, 27 Jan 2017 17:05:27 +0000 (12:05 -0500)]
Remove SkBlitter:resetShaderContext()

Refactor SkDraw::drawVertices() to reset the whole blitter instead.

No noticeable bench diff.

  out/Release/nanobench --config 8888 -m patch_grid_colors_tex

Before:

   9/9   MB 1 9.24ms 11.4ms 11.5ms 15ms 16% █▆▅▄▄▃▂▂▁▁ 8888 patch_grid_colors_texs_big
   9/9   MB 1 5.2ms 5.2ms 5.2ms 5.21ms 0% █▃▂▁▂▂▃▂▂▁ 8888 patch_grid_colors_texs_medium
   9/9   MB 2 378µs 380µs 380µs 382µs 0% █▆▅▄▄▁▄▄▆▄ 8888 patch_grid_colors_texs_small

After:
   9/9   MB 1 9.29ms 11.5ms 11.6ms 15.3ms 17% █▇▅▄▄▃▂▂▁▁ 8888 patch_grid_colors_texs_big
   9/9   MB 1 5.15ms 5.16ms 5.16ms 5.18ms 0% █▄▁▁▄▂▁▂▃▂ 8888 patch_grid_colors_texs_medium
   9/9   MB 2 378µs 380µs 380µs 382µs 0% █▅▄▃▁▄▄▄▃▄ 8888 patch_grid_colors_texs_small

R=reed@google.com,mtklein@google.com,herb@google.com
BUG=skia:6168

Change-Id: I0b6b7d1297323681d8d2838040450c4e1afabc17
Reviewed-on: https://skia-review.googlesource.com/7626
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agotools/git-sync-deps improvements
Hal Canary [Fri, 27 Jan 2017 16:57:13 +0000 (11:57 -0500)]
tools/git-sync-deps improvements

  * Use `/usr/bin/env python` patten: more robust on non-standard systems.
  * Factor out status line, make formatting clearer.
  * Alwyas call `git remote set-url origin $repo` since it is quick.
  * Find `fetch-gn` script more robustly.
  * `--help` works again.
  * handling deps_os better
  * check to see that directories don't include each other

Change-Id: I06806226e2c263147723c6326c09c5e385abc68d
Reviewed-on: https://skia-review.googlesource.com/7646
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoAdd utilities to create GrSurfaceProxy & GrSurfaceContext from backend descs
Robert Phillips [Fri, 27 Jan 2017 15:58:31 +0000 (10:58 -0500)]
Add utilities to create GrSurfaceProxy & GrSurfaceContext from backend descs

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

7 years agoRaster pipeline support for SkLocalMatrixShader composition
Florin Malita [Fri, 27 Jan 2017 15:51:58 +0000 (10:51 -0500)]
Raster pipeline support for SkLocalMatrixShader composition

Plumb a local matrix arg to onAppendStages, similar to onCreateContext's
ContextRec::fLocalMatrix.

Change-Id: I6db3706918733b35eb7a3ae2cc65503223d0cf2d
Reviewed-on: https://skia-review.googlesource.com/7653
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoAdd offset to uniform blocks in Vulkan
Greg Daniel [Tue, 24 Jan 2017 20:12:12 +0000 (15:12 -0500)]
Add offset to uniform blocks in Vulkan

This is the first step to being able to use push constants.

BUG=skia:5039

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

7 years agoRevert "Revert "Start of rewrite of GrFragmentProcessor optimizations.""
Brian Salomon [Fri, 27 Jan 2017 15:59:27 +0000 (10:59 -0500)]
Revert "Revert "Start of rewrite of GrFragmentProcessor optimizations.""

This reverts commit 052fd5158f7f85e478a9f87c45fecaacf7d0f5f3.

Disables the test (of unused code) until platform-specific issues are addressed.

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

7 years agobin/sync : call tools/git-sync-deps now
Hal Canary [Fri, 27 Jan 2017 15:59:40 +0000 (10:59 -0500)]
bin/sync : call tools/git-sync-deps now

Also, update some docs.

NOTRY=true
Change-Id: I7ad3375fc1cbf8f71ed42a460ecfe29ef6c1d85e
Reviewed-on: https://skia-review.googlesource.com/7657
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoConsolidate read/write-Pixels testing code - take 2
Robert Phillips [Fri, 27 Jan 2017 15:11:42 +0000 (10:11 -0500)]
Consolidate read/write-Pixels testing code - take 2

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

7 years agoRevert "Start of rewrite of GrFragmentProcessor optimizations."
Ethan Nicholas [Fri, 27 Jan 2017 15:34:34 +0000 (15:34 +0000)]
Revert "Start of rewrite of GrFragmentProcessor optimizations."

This reverts commit 85eb4226a4cd8c10a0e3f3ba2f3a60efbb2dd61b.

Reason for revert: test failures on Windows, e.g. https://chromium-swarm.appspot.com/task?id=33f9527484414110&refresh=10

Original change's description:
> Start of rewrite of GrFragmentProcessor optimizations.
>
> This adds a replacement for computeInvariantOutput buts does not use it yet. The replacement allows for three types of optimizations:
>
> * known input color -> known output color for GrFP elimination
> * tracking of whether all color processors modulate their input for the "tweak alpha" optimziation
> * opaqueness tracking
>
> This loses some of the generality of computInvariantOutput. It does not track the known output status of individual color components (other than opaque alpha). It does not track whether GrFragmentProcessors read their input color. It doesn't allow a processor that will receive non-constant output to advertise that it produces a constant output. These could probably be added back in the unlikely case that they prove valuable.
>
> Unlike computeInvariantOutput the optimizations are decided at instantiation time and constant colors are expressed as GrColor4f rather than GrColor.
>
> Change-Id: I684d3f9050693dde2d28154fa695e049ed8cf61a
> Reviewed-on: https://skia-review.googlesource.com/7481
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>

TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I2390df257456013fa74137cb5d7b5a93820c291e
Reviewed-on: https://skia-review.googlesource.com/7652
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
7 years agoStart of rewrite of GrFragmentProcessor optimizations.
Brian Salomon [Thu, 26 Jan 2017 22:35:06 +0000 (17:35 -0500)]
Start of rewrite of GrFragmentProcessor optimizations.

This adds a replacement for computeInvariantOutput buts does not use it yet. The replacement allows for three types of optimizations:

* known input color -> known output color for GrFP elimination
* tracking of whether all color processors modulate their input for the "tweak alpha" optimziation
* opaqueness tracking

This loses some of the generality of computInvariantOutput. It does not track the known output status of individual color components (other than opaque alpha). It does not track whether GrFragmentProcessors read their input color. It doesn't allow a processor that will receive non-constant output to advertise that it produces a constant output. These could probably be added back in the unlikely case that they prove valuable.

Unlike computeInvariantOutput the optimizations are decided at instantiation time and constant colors are expressed as GrColor4f rather than GrColor.

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

7 years agoRevert "Revert "SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER""
Ravi Mistry [Fri, 27 Jan 2017 14:39:46 +0000 (14:39 +0000)]
Revert "Revert "SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER""

This reverts commit 156a749eb15d18539a58436d767e9401de413eb3.

Reason for revert: Reverting this makes it much easier to test the merge_into_android.py script. I also stopped the Android autoroller for now.

Original change's description:
> Revert "SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER"
>
> This reverts commit 68fc549e840d1efc6285c301da1bf52c04e57e0a.
>
> Reason for revert: Breaking the Android roll.
>
> (The change is fine, but the script for merging did not consider that we might edit this file. We can reland this after we update the script.)
>
> Original change's description:
> > SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER
> >
> > Change-Id: I6894fe43de071999e4923e1515a951b73e2ba0b1
> > Reviewed-on: https://skia-review.googlesource.com/7619
> > Reviewed-by: Ben Wagner <bungeman@google.com>
> > Commit-Queue: Hal Canary <halcanary@google.com>
> >
>
> TBR=halcanary@google.com,bungeman@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: Ib1a2c9faa79d1186705d87c5e17f20fe49b82bb1
> Reviewed-on: https://skia-review.googlesource.com/7641
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
>

TBR=mtklein@chromium.org,halcanary@google.com,bungeman@google.com,scroggo@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ifa42e4fb48bbe9dac40c57cf09cf9586ca86c6df
Reviewed-on: https://skia-review.googlesource.com/7649
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoRevert "Consolidate read/write-Pixels testing code"
Robert Phillips [Fri, 27 Jan 2017 14:28:29 +0000 (14:28 +0000)]
Revert "Consolidate read/write-Pixels testing code"

This reverts commit 0bd4a23ef40d74ef051eb7f457c133d5febc377d.

Reason for revert: What?!?

Original change's description:
> Consolidate read/write-Pixels testing code
>
> Change-Id: I853f8f747ed0040333473fbc722cabac84e6ac83
> Reviewed-on: https://skia-review.googlesource.com/7560
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
>

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

Change-Id: I9cb049a4f86350f849d00839a55b55fb07e861b0
Reviewed-on: https://skia-review.googlesource.com/7648
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoremove SK_SUPPORT_LEGACY_GETCLIPBOUNDS
Mike Reed [Fri, 27 Jan 2017 13:21:36 +0000 (08:21 -0500)]
remove SK_SUPPORT_LEGACY_GETCLIPBOUNDS

BUG=skia:6166

Change-Id: I5c8035ee172e14a7a769baff45392a29014d09cb
Reviewed-on: https://skia-review.googlesource.com/7645
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoConsolidate read/write-Pixels testing code
Robert Phillips [Fri, 27 Jan 2017 12:51:23 +0000 (07:51 -0500)]
Consolidate read/write-Pixels testing code

Change-Id: I853f8f747ed0040333473fbc722cabac84e6ac83
Reviewed-on: https://skia-review.googlesource.com/7560
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRevert "SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER"
Leon Scroggins [Thu, 26 Jan 2017 23:51:57 +0000 (23:51 +0000)]
Revert "SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER"

This reverts commit 68fc549e840d1efc6285c301da1bf52c04e57e0a.

Reason for revert: Breaking the Android roll.

(The change is fine, but the script for merging did not consider that we might edit this file. We can reland this after we update the script.)

Original change's description:
> SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER
>
> Change-Id: I6894fe43de071999e4923e1515a951b73e2ba0b1
> Reviewed-on: https://skia-review.googlesource.com/7619
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
>

TBR=halcanary@google.com,bungeman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ib1a2c9faa79d1186705d87c5e17f20fe49b82bb1
Reviewed-on: https://skia-review.googlesource.com/7641
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoDelete SkAutoTime from jpeg encoder
Matt Sarett [Thu, 26 Jan 2017 23:13:11 +0000 (18:13 -0500)]
Delete SkAutoTime from jpeg encoder

We use nanobench instead to measure encode performance.

BUG=skia:

Change-Id: I4f0b43b7e09f99967889e941cb6947433033006a
Reviewed-on: https://skia-review.googlesource.com/7640
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoKeep valgrind happen by purging caches.
Herb Derby [Thu, 26 Jan 2017 21:48:28 +0000 (16:48 -0500)]
Keep valgrind happen by purging caches.

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

7 years agoImplement getFamilyName for stream fonts on Linux.
Ben Wagner [Wed, 25 Jan 2017 16:15:50 +0000 (11:15 -0500)]
Implement getFamilyName for stream fonts on Linux.

When SkFontMgr_fontconfig and SkFontMgr_FontConfigInterface create a
typeface from data they do not store the default font name and
getFamilyName will return the empty string. All of the code to handle
this properly now exists, it just needs to be hooked up.

BUG=skia:1508

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

7 years agoSimplify SkShader::ContextRec::fLocalMatrix handling
Florin Malita [Thu, 26 Jan 2017 21:23:06 +0000 (16:23 -0500)]
Simplify SkShader::ContextRec::fLocalMatrix handling

Minor cleanup.

R=robertphillips@google.com,reed@google.com

Change-Id: I1a27af61e3e3bb5e895c9a3265da6b0408234165
Reviewed-on: https://skia-review.googlesource.com/7632
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoReally use vpmaddwd in hsw::convolve_vertical().
Mike Klein [Thu, 26 Jan 2017 20:46:02 +0000 (15:46 -0500)]
Really use vpmaddwd in hsw::convolve_vertical().

No pixel diffs.
Performance on 8888 looks like an overall win.

Before:
    micros  bench
    222.41  bitmap_scale_filter_64_256
     40.06  bitmap_scale_filter_256_64
      8.17  bitmap_scale_filter_90_10
     10.32  bitmap_scale_filter_90_30
     22.50  bitmap_scale_filter_90_80
      1.80  bitmap_scale_filter_90_90
     57.51  bitmap_scale_filter_80_90
     41.99  bitmap_scale_filter_30_90
     31.51  bitmap_scale_filter_10_90

After:
    micros  bench
    193.60  bitmap_scale_filter_64_256
     46.26  bitmap_scale_filter_256_64
      7.81  bitmap_scale_filter_90_10
      9.99  bitmap_scale_filter_90_30
     22.05  bitmap_scale_filter_90_80
      1.96  bitmap_scale_filter_90_90
     52.07  bitmap_scale_filter_80_90
     37.73  bitmap_scale_filter_30_90
     27.63  bitmap_scale_filter_10_90

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

7 years agoGraceful degredation for SkOpts_hsw.
Mike Klein [Thu, 26 Jan 2017 21:23:26 +0000 (16:23 -0500)]
Graceful degredation for SkOpts_hsw.

__AVX2__ will not be defined if you omit -mavx2.  Android does this
intentionally for x86 builds.  (No mobile CPU supports AVX2 AFAIK.)

This should fix the Android roll.

Change-Id: Ib94c862641abc11fbb46863afc53bcc049f362ad
Reviewed-on: https://skia-review.googlesource.com/7633
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoReland "remove clipbounds flag"
Ben Wagner [Thu, 26 Jan 2017 21:40:03 +0000 (21:40 +0000)]
Reland "remove clipbounds flag"

This reverts commit 2aa26abe6daad2fc933ef638992cce71cb65f458.

Reason for revert: CL this depends on has now landed.

Original change's description:
> Revert "remove clipbounds flag"
>
> This reverts commit 7e0489da25c578bd04ce74d03ad48198280ca3fd.
>
> Reason for revert: missed a headless
>
> Original change's description:
> > remove clipbounds flag
> >
> > BUG=skia:
> >
> > Change-Id: I55b3098abd5e566e9f8bf27988c33e531d2ea54d
> > Reviewed-on: https://skia-review.googlesource.com/7618
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> >
>
> TBR=reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: Id1310372499905dddcca4b9454f6a81d192a1e32
> Reviewed-on: https://skia-review.googlesource.com/7629
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

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

Change-Id: I593bdad8d654e272e772559aa0fccafcce8ff541
Reviewed-on: https://skia-review.googlesource.com/7636
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agoFix gradients gm
Matt Sarett [Thu, 26 Jan 2017 20:14:56 +0000 (15:14 -0500)]
Fix gradients gm

Some of my local changes slipped into the tree.

BUG=skia:

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

7 years agoRevert "remove clipbounds flag"
Mike Reed [Thu, 26 Jan 2017 20:49:22 +0000 (20:49 +0000)]
Revert "remove clipbounds flag"

This reverts commit 7e0489da25c578bd04ce74d03ad48198280ca3fd.

Reason for revert: missed a headless

Original change's description:
> remove clipbounds flag
>
> BUG=skia:
>
> Change-Id: I55b3098abd5e566e9f8bf27988c33e531d2ea54d
> Reviewed-on: https://skia-review.googlesource.com/7618
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

Change-Id: Id1310372499905dddcca4b9454f6a81d192a1e32
Reviewed-on: https://skia-review.googlesource.com/7629
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoFix variable names in convolve_vertical().
Mike Klein [Thu, 26 Jan 2017 19:58:42 +0000 (14:58 -0500)]
Fix variable names in convolve_vertical().

These new names reflect the actual pixels stored in each register.

Change-Id: I8e626196cd8bcbef622e4fb87ac3566a79d3573a
Reviewed-on: https://skia-review.googlesource.com/7624
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoextend clipper for lines, for uniformity, and so curves can call itself with lines
Mike Reed [Thu, 26 Jan 2017 19:21:26 +0000 (14:21 -0500)]
extend clipper for lines, for uniformity, and so curves can call itself with lines

BUG=skia:

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

7 years agoSkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER
Hal Canary [Thu, 26 Jan 2017 18:53:57 +0000 (13:53 -0500)]
SkUserConfig.h: remove out-of-date comment on SK_SFNTLY_SUBSETTER

Change-Id: I6894fe43de071999e4923e1515a951b73e2ba0b1
Reviewed-on: https://skia-review.googlesource.com/7619
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoexclude *hsw* source files on Android/iOS G3 build.
Mike Klein [Thu, 26 Jan 2017 19:40:53 +0000 (14:40 -0500)]
exclude *hsw* source files on Android/iOS G3 build.

Like *sse2*, *avx*, etc, these are x86-specific and
even there must be compiled with particular flags.

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

7 years agoAdd SkICC::rawTransferFnData()
Matt Sarett [Thu, 26 Jan 2017 18:10:49 +0000 (13:10 -0500)]
Add SkICC::rawTransferFnData()

BUG=skia:

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

7 years agoremove clipbounds flag
Mike Reed [Thu, 26 Jan 2017 18:21:29 +0000 (13:21 -0500)]
remove clipbounds flag

BUG=skia:

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

7 years agoremove obsolete flag
Cary Clark [Thu, 26 Jan 2017 16:42:52 +0000 (11:42 -0500)]
remove obsolete flag

Added by humper in 2013, it is not
referenced anywhere I can find.

R=reed@google.com

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

7 years agoSkOpts_hsw ODR paranoia
Mike Klein [Thu, 26 Jan 2017 16:41:03 +0000 (11:41 -0500)]
SkOpts_hsw ODR paranoia

I'm warming back up to the idea of very careful use of SkOpts_hsw.
But if we're going to do that, we need a strict header discipline.
No header can be assumed to be safe without vetting, and most aren't.

Today there's only one function defined in SkOpts_hsw, so this CL mostly
rewrites that convolve_vertically() to use no headers beyond immintrin.h
and stdint.h, both safe.  It shared very little code with the others
anyway, so we're not losing anything by putting it directly into
SkOpts_hsw.cpp.  I have also streamlined the implementation considerably
to improve maintainability and readability.

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

7 years agoRemove SkBlitter::getShaderContext()
Florin Malita [Thu, 26 Jan 2017 17:33:20 +0000 (12:33 -0500)]
Remove SkBlitter::getShaderContext()

Unused.  Also ComposeShaderContext::getShaderContext{A,B}.

R=reed@google.com,mtklein@google.com

Change-Id: I36a8346f0c7e842455774339f388c04920db0040
Reviewed-on: https://skia-review.googlesource.com/7613
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoFix extension suffic for getting procs from GL_EXT_debug_marker on ES
Brian Salomon [Thu, 26 Jan 2017 14:16:02 +0000 (09:16 -0500)]
Fix extension suffic for getting procs from GL_EXT_debug_marker on ES

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

7 years agoadd test for big cubic -- currently disabled
Mike Reed [Thu, 26 Jan 2017 16:03:50 +0000 (11:03 -0500)]
add test for big cubic -- currently disabled

BUG=skia:

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

7 years agoMove SkGammaColorFilter to tools, limit to sRGB
Brian Osman [Thu, 26 Jan 2017 14:32:33 +0000 (09:32 -0500)]
Move SkGammaColorFilter to tools, limit to sRGB

Similarly, limit GrGammaEffect to sRGB (and rename it).

BUG=skia:

Change-Id: I88feef11ab7040bca2fa4c2eed71923ded87a0d0
Reviewed-on: https://skia-review.googlesource.com/7375
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoremove legacy clipbounds flag for android
Mike Reed [Wed, 25 Jan 2017 22:05:46 +0000 (17:05 -0500)]
remove legacy clipbounds flag for android

BUG=skia:

Change-Id: Ie13c85bfbb5b1b173e8ac6a2fb0c9a23ea8ba7de
Reviewed-on: https://skia-review.googlesource.com/7583
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoMove GrDrawingManager pointer to GrSurfaceContext
Robert Phillips [Wed, 25 Jan 2017 22:31:35 +0000 (17:31 -0500)]
Move GrDrawingManager pointer to GrSurfaceContext

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

7 years agoCheck that the upper bits are correct in the SkArenaAlloc footer.
herb [Thu, 26 Jan 2017 01:37:09 +0000 (20:37 -0500)]
Check that the upper bits are correct in the SkArenaAlloc footer.

TBR=mtklein@google.com

Change-Id: I8dc21778d1b8b24dd9d7b6919bb7e2bcfe090e82
Reviewed-on: https://skia-review.googlesource.com/7588
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoFix clang warning about unused lambda capture.
Brian Salomon [Thu, 26 Jan 2017 00:26:59 +0000 (19:26 -0500)]
Fix clang warning about unused lambda capture.

This was found by a tip of tree build of clang.

Change-Id: I9aa3fecd47ae69350e8d58e796f960a991b7759e
Reviewed-on: https://skia-review.googlesource.com/7586
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRemove redundant caps field from GrProcessorTestData
Brian Salomon [Wed, 25 Jan 2017 19:58:24 +0000 (14:58 -0500)]
Remove redundant caps field from GrProcessorTestData

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

7 years agoSimplify Footers in SkArenaAlloc to 64-bit values using pointers.
Herb Derby [Wed, 25 Jan 2017 22:05:05 +0000 (17:05 -0500)]
Simplify Footers in SkArenaAlloc to 64-bit values using pointers.

TBR=mtklein@google.com

Change-Id: I72c6cf6857b2bb00f4259cc9c4de2d51d454e6ab
Reviewed-on: https://skia-review.googlesource.com/7582
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoSwitch GrConfigConversionEffect over to taking GrTextureProxies
Robert Phillips [Wed, 25 Jan 2017 20:48:30 +0000 (15:48 -0500)]
Switch GrConfigConversionEffect over to taking GrTextureProxies

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

7 years agoutils/win/SkTScopedComPtr<T>: Add C++11ish move semantics
Hal Canary [Tue, 24 Jan 2017 16:11:31 +0000 (11:11 -0500)]
utils/win/SkTScopedComPtr<T>: Add C++11ish move semantics

Change-Id: I026ffa81d583fddc4a2c7238a176232ef98fcd89
Reviewed-on: https://skia-review.googlesource.com/7434
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoUse GrSurfaceContext::read/write-Pixels more
Robert Phillips [Wed, 25 Jan 2017 17:10:37 +0000 (12:10 -0500)]
Use GrSurfaceContext::read/write-Pixels more

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

7 years agoAdd test for bad reuse of SkJpegCodec internal state
Matt Sarett [Wed, 25 Jan 2017 16:58:11 +0000 (11:58 -0500)]
Add test for bad reuse of SkJpegCodec internal state

This is a test for the following fix:
https://skia-review.googlesource.com/c/7451/

b/34637813

Change-Id: I3fdb0d7d50537948039b75c3a22454e789ca810a
Reviewed-on: https://skia-review.googlesource.com/7454
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoMove SkShadowTessellator to GrShadowTessellator
Jim Van Verth [Wed, 25 Jan 2017 16:05:01 +0000 (11:05 -0500)]
Move SkShadowTessellator to GrShadowTessellator

BUG=skia:6119

Change-Id: I9756b5aeaced1f21a65063470ccb013c7b856f28
Reviewed-on: https://skia-review.googlesource.com/7505
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoRoll recipe DEPS
Eric Boren [Wed, 25 Jan 2017 15:33:57 +0000 (10:33 -0500)]
Roll recipe DEPS

BUG=skia:

Change-Id: If10fe8b3691c8a71b52774f763a08120ef20dfd8
Reviewed-on: https://skia-review.googlesource.com/7502
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoAdd geometric implementation for ambient shadows
Jim Van Verth [Wed, 25 Jan 2017 14:39:46 +0000 (09:39 -0500)]
Add geometric implementation for ambient shadows

Original: https://skia-review.googlesource.com/7273

BUG=skia:6119

Change-Id: Ie7debd7727768f55dafad922a2b8b9fd3a638fda
Reviewed-on: https://skia-review.googlesource.com/7500
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRevert "Remove SkImage::MakeTextureFromPixmap"
Brian Osman [Wed, 25 Jan 2017 14:13:00 +0000 (14:13 +0000)]
Revert "Remove SkImage::MakeTextureFromPixmap"

This reverts commit 8ccbbb455c6ef194920c47e846b95b50f5017138.

Reason for revert: Chrome perf regression

BUG=chrome:684483

Original change's description:
> Remove SkImage::MakeTextureFromPixmap
>
> Another step towards reducing the number of texture upload paths.
>
> BUG=skia:
>
> Change-Id: Ica185e7334f52dc9ebf87e21fe6f60589ef87bb3
> Reviewed-on: https://skia-review.googlesource.com/7346
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,cblume@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:

Change-Id: I8bf6970b764018f3ebcac8123e4d6a8ad05317ff
Reviewed-on: https://skia-review.googlesource.com/7484
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRevert "Add geometric implementation for ambient shadows"
Ethan Nicholas [Wed, 25 Jan 2017 04:33:07 +0000 (04:33 +0000)]
Revert "Add geometric implementation for ambient shadows"

This reverts commit fdb1bdf1aa4e7f14befcb3acc3f586e7734190ea.

Reason for revert: Breaking the roll (see e.g. https://codereview.chromium.org/2652833006)

Original change's description:
> Add geometric implementation for ambient shadows
>
> BUG=skia:6119
>
> Change-Id: I3140522f223c35fc059a33b593064897485dff7c
> Reviewed-on: https://skia-review.googlesource.com/7273
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
>

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

Change-Id: I307f6084c40e5ba305c38d15b6b433465295553c
Reviewed-on: https://skia-review.googlesource.com/7480
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
7 years agoAdd geometric implementation for ambient shadows
Jim Van Verth [Tue, 24 Jan 2017 21:27:57 +0000 (16:27 -0500)]
Add geometric implementation for ambient shadows

BUG=skia:6119

Change-Id: I3140522f223c35fc059a33b593064897485dff7c
Reviewed-on: https://skia-review.googlesource.com/7273
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoRevert "Remove sentinal GLContext used in early days of Vulkan in our tools"
Brian Salomon [Tue, 24 Jan 2017 22:22:05 +0000 (22:22 +0000)]
Revert "Remove sentinal GLContext used in early days of Vulkan in our tools"

This reverts commit bfd97c59350c112ad85301eb6ff6005ae4fd9e8c.

Reason for revert: Windows bots crashing.

Original change's description:
> Remove sentinal GLContext used in early days of Vulkan in our tools
>
> I've ran this through multiple variations of dm and nanobench on Linux
> and no longer see any crash/hangs. I forget what the original repo case
> for the bug was, but I'm at least not seeing it now with updated drivers.
>
> BUG=skia:
>
> Change-Id: I6b7129a4c4d67938baa35d2e2c720cb078fc4c18
> Reviewed-on: https://skia-review.googlesource.com/7441
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
>

TBR=egdaniel@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I94a16b2b13d09182232061b0aebd0d58df96db8a
Reviewed-on: https://skia-review.googlesource.com/7453
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoAllow GrSingleTextureEffect to take GrTextureProxies
Robert Phillips [Tue, 24 Jan 2017 21:24:41 +0000 (16:24 -0500)]
Allow GrSingleTextureEffect to take GrTextureProxies

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

7 years agoUse appropriate options in SkJpegCodec readRows()
Matt Sarett [Tue, 24 Jan 2017 21:16:33 +0000 (16:16 -0500)]
Use appropriate options in SkJpegCodec readRows()

b/34637813

Change-Id: Ibebac2ef8cfe004beb2272c266b580946cedcb08
Reviewed-on: https://skia-review.googlesource.com/7451
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoMake the footer big to handle bug 684061.
Herb Derby [Tue, 24 Jan 2017 20:59:51 +0000 (15:59 -0500)]
Make the footer big to handle bug 684061.

R=mtklein@google.com

BUG=chromium:684061

Change-Id: I210ca93e00ec6fa5d166c0fde5cdcff0f60c26ca
Reviewed-on: https://skia-review.googlesource.com/7450
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRemove sentinal GLContext used in early days of Vulkan in our tools
Greg Daniel [Tue, 24 Jan 2017 18:13:30 +0000 (13:13 -0500)]
Remove sentinal GLContext used in early days of Vulkan in our tools

I've ran this through multiple variations of dm and nanobench on Linux
and no longer see any crash/hangs. I forget what the original repo case
for the bug was, but I'm at least not seeing it now with updated drivers.

BUG=skia:

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

7 years agoSkPixelInfo::CopyPixels() refactor part 0: only one memcpy() case
Matt Sarett [Tue, 24 Jan 2017 17:43:41 +0000 (12:43 -0500)]
SkPixelInfo::CopyPixels() refactor part 0: only one memcpy() case

I envision this eventually looking like the following:
Fast Path 1: memcpy
Fast Path 2: Legacy RGBA/BGRA unpremul/premul
Fast Path 3: SkColorSpaceXform
Fallback: Raster pipeline

BUG=skia:6021

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

7 years agomove sk_memset16,32,64 out-of-line
Mike Klein [Wed, 4 Jan 2017 19:44:20 +0000 (14:44 -0500)]
move sk_memset16,32,64 out-of-line

This helps pick it out on profiles and when debugging.

This will have a negligible impact on speed in most cases (small memsets are always fast, large memsets dwarf function call overhead), and clients like Chrome that use link-time optimization should see exactly zero impact.

This does however affect code size: it makes libskia 43K smaller on my laptop.

Change-Id: I55bdc75b7429a63024ab3b7d55dc1f886bde102a
Reviewed-on: https://skia-review.googlesource.com/6589
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoMake GrConvolutionEffect only support Gaussian kernels and rename.
Brian Salomon [Tue, 24 Jan 2017 17:29:36 +0000 (12:29 -0500)]
Make GrConvolutionEffect only support Gaussian kernels and rename.

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

7 years agoRemove SkTDict and calls from SkView.
Herb Derby [Tue, 24 Jan 2017 16:44:52 +0000 (11:44 -0500)]
Remove SkTDict and calls from SkView.

R=reed@google.com

Change-Id: Iebfddf752a2ac210a3f5c69de8decd06d0c35617
Reviewed-on: https://skia-review.googlesource.com/7436
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoDo not embed glyph image data in SkGlyphCache.
Herb Derby [Tue, 24 Jan 2017 16:01:59 +0000 (11:01 -0500)]
Do not embed glyph image data in SkGlyphCache.

Instead of allocating memory for glyph images eagerly by embedding
the memory in the glyph cache, allocate memory dynamically on need.

TBR=bungeman@google.com

BUG=chromium:684366

Change-Id: If32bbc4d2608c976b93868feb519dcfa1212ce59
Reviewed-on: https://skia-review.googlesource.com/7433
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoconservativelyContainsRect is asserting
Mike Reed [Tue, 24 Jan 2017 15:12:53 +0000 (10:12 -0500)]
conservativelyContainsRect is asserting

BUG=skia:6156

Change-Id: Iea571f001e9a4c4e70313c1bd49fb4e3c598869a
Reviewed-on: https://skia-review.googlesource.com/7423
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoAdd F16 and gamma correct support to webp encoder
Matt Sarett [Tue, 24 Jan 2017 00:37:37 +0000 (19:37 -0500)]
Add F16 and gamma correct support to webp encoder

BUG=skia:

Change-Id: Ib788466fa1e2bed26e7ffd8f03bee42930eae1d6
Reviewed-on: https://skia-review.googlesource.com/7425
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agorestore bool version of clip-bounds
Mike Reed [Tue, 24 Jan 2017 14:13:40 +0000 (09:13 -0500)]
restore bool version of clip-bounds

BUG=skia:

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

7 years agoReenable index8 dsts
Matt Sarett [Mon, 23 Jan 2017 23:54:45 +0000 (18:54 -0500)]
Reenable index8 dsts

This is causing problems with image-cacherator-from-ctable gm.

In that gm, we use an index8->index8 readPixels() to take
a subset.

I think we need to keep this as long as we support index8 in the
generator/cacherator.  Though it's really strange because
we don't really bother to verify that color tables are the same
and we don't try to overwrite the dst color table...

BUG=skia:

Change-Id: Icf008caa571c4b81a52a23b8b7d9226789626ef5
Reviewed-on: https://skia-review.googlesource.com/7424
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoMake GrYUVEffect take GrTextureProxies
Robert Phillips [Mon, 23 Jan 2017 20:30:35 +0000 (15:30 -0500)]
Make GrYUVEffect take GrTextureProxies

This opens the door for swapping all the effects over to taking GrTextureProxies.

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

7 years agoUpdate SkAndroidSDKCanvas.
Mike Klein [Tue, 24 Jan 2017 02:41:46 +0000 (21:41 -0500)]
Update SkAndroidSDKCanvas.

Hope that's right... nothing but the Android roll builds this code.

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

7 years agoTemporarily restore colorcube bench and GM files.
Mike Klein [Tue, 24 Jan 2017 02:14:08 +0000 (21:14 -0500)]
Temporarily restore colorcube bench and GM files.

Just the usual... we don't generate .bp for DM or nanobench yet.

See https://skia-review.googlesource.com/c/7363/ and
https://googleplex-android-review.git.corp.google.com/#/c/1819530/-1..1

Change-Id: If0098ed8a71a170d5efa773495d5bbf02a1e13fc
Reviewed-on: https://skia-review.googlesource.com/7427
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoFix comparison that overflows for addresses near uint max.
Herb Derby [Mon, 23 Jan 2017 21:57:09 +0000 (16:57 -0500)]
Fix comparison that overflows for addresses near uint max.
- Fix Assert

TBR=mtklein@google.com
BUG=chromium:683578

Change-Id: Iba503d1febace367c71f79a3b9accc0ec3e50f11
Reviewed-on: https://skia-review.googlesource.com/7418
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agomake SkPath::conservativelyContainsRect consume degenerate segments
Lee Salzman [Thu, 12 Jan 2017 18:06:21 +0000 (13:06 -0500)]
make SkPath::conservativelyContainsRect consume degenerate segments

BUG=skia:

Change-Id: I3a39318bceaf6c95a50d84961d93af4ba62550e3
Reviewed-on: https://skia-review.googlesource.com/6900
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agorename virtuals for clipbounds, and deprecate older bool/var-arg pattern
Mike Reed [Mon, 23 Jan 2017 19:09:13 +0000 (14:09 -0500)]
rename virtuals for clipbounds, and deprecate older bool/var-arg pattern

BUG=skia:

Change-Id: I08bcc2d0559e02838772538816b928e0716dd3aa
Reviewed-on: https://skia-review.googlesource.com/7412
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRevert "Update libwebp to 0.6.0-pre"
Ethan Nicholas [Mon, 23 Jan 2017 20:47:36 +0000 (20:47 +0000)]
Revert "Update libwebp to 0.6.0-pre"

This reverts commit e2f6ffbf49671713356881af70a093e99e80bd31.

Reason for revert:

iOS build failures, see https://luci-milo.appspot.com/swarming/task/33e5e02cf8419d10/steps/build_iOSShell/0/stdout

Original change's description:
> Update libwebp to 0.6.0-pre
>
> Corresponds with Android change
> https://android-review.googlesource.com/#/c/326439/
>
> "this prerelease snapshot includes encoder and performance
> improvements"
>
> Update build file
> * Many files have been renamed from
>     src/<subdir>/<name>.c
>       to
>     src/<subdir>/<name>_<subdir>.c
>
> * Build new files (*_msa.c, *_neon.c, predictor_enc.c)
>
> This should fix issue 5876, which was caused by a compiler bug.
> With the added NEON implementation, we will no longer trigger
> the bug.
>
> BUG=skia:5876
>
> Change-Id: I0fcce4362ee70138547b1d23aa9ef537a4126e73
> Reviewed-on: https://skia-review.googlesource.com/7376
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
>

TBR=msarett@google.com,scroggo@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:5876

Change-Id: Ib81f63861d9f1c6936bd7f790b5e16a9544a4df0
Reviewed-on: https://skia-review.googlesource.com/7420
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
7 years agoUpdate libwebp to 0.6.0-pre
Leon Scroggins III [Mon, 23 Jan 2017 15:24:19 +0000 (10:24 -0500)]
Update libwebp to 0.6.0-pre

Corresponds with Android change
https://android-review.googlesource.com/#/c/326439/

"this prerelease snapshot includes encoder and performance
improvements"

Update build file
* Many files have been renamed from
    src/<subdir>/<name>.c
      to
    src/<subdir>/<name>_<subdir>.c

* Build new files (*_msa.c, *_neon.c, predictor_enc.c)

This should fix issue 5876, which was caused by a compiler bug.
With the added NEON implementation, we will no longer trigger
the bug.

BUG=skia:5876

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

7 years agoStop tracking whether GrFragmentProcessors read their input
Brian Salomon [Mon, 23 Jan 2017 19:35:25 +0000 (14:35 -0500)]
Stop tracking whether GrFragmentProcessors read their input

Change-Id: Id5338901978b97289798eaef873527597bd8dfd6
Reviewed-on: https://skia-review.googlesource.com/7414
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoMove shader register setup to SkRasterPipelineBlitter.
Mike Klein [Fri, 20 Jan 2017 20:11:54 +0000 (15:11 -0500)]
Move shader register setup to SkRasterPipelineBlitter.

We've been seeding the initial values of our registers to x+0.5,y+0.5,
1,0, 0,0,0,0 (useful values for shaders to start with) in all pipelines.
This CL changes that to do so only when blitting, and only when we have
a shader.

The nicest part of this change is that SkRasterPipeline itself no longer
needs to have a concept of y, or what x means.  It just marches x
through [x,x+n), and the blitter handles y and layers the meaning of
"dst x coordinate" onto x.

This ought to make SkSplicer a little easier to work with too.

dm --src gm --config f16 srgb 565 all draws the same.

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

7 years agoRevert "Fix comparison that overflows for addresses near uint max."
Ethan Nicholas [Mon, 23 Jan 2017 19:59:26 +0000 (19:59 +0000)]
Revert "Fix comparison that overflows for addresses near uint max."

This reverts commit db8b8376b09cec9656b0ab864413b7911d81a84c.

Reason for revert:

Assertion failure, see https://luci-milo.appspot.com/swarming/task/33e5ae4d2bb25210/steps/dm/0/stdout

Original change's description:
> Fix comparison that overflows for addresses near uint max.
>
> BUG=chromium:683578
>
> Change-Id: I3f9b79eeeba3c68cccb72bd6423811c8ff8f2067
> Reviewed-on: https://skia-review.googlesource.com/7410
> Commit-Queue: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:683578

Change-Id: I198ea4c7209d060d0d15dfa3f6e555fa06e1a632
Reviewed-on: https://skia-review.googlesource.com/7415
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
7 years agoSkRasterPipeline: implement support for SkTableColorFilter
Mike Klein [Mon, 23 Jan 2017 19:06:55 +0000 (14:06 -0500)]
SkRasterPipeline: implement support for SkTableColorFilter

This adds and uses a byte_tables stage that converts to bytes, looks up
in the tables, then converts back to floats.

We treat this as color filter as pure math, not considering anything
colorspace related: no transfer functions, no gamut to change, etc.

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

7 years agoGN: add 32-bit and Release iOS builders.
Mike Klein [Mon, 23 Jan 2017 16:58:53 +0000 (11:58 -0500)]
GN: add 32-bit and Release iOS builders.

And roll recipes to the point where they pass target_cpu to GN,
adding x86_64 as an alias for x64.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-GN_iOS,Build-Mac-Clang-arm64-Release-GN_iOS,Build-Mac-Clang-arm-Debug-GN_iOS,Build-Mac-Clang-arm-Release-GN_iOS

Change-Id: I1933d5803ec7f59f78576c5a7b16489362905a97
Reviewed-on: https://skia-review.googlesource.com/7403
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoFix comparison that overflows for addresses near uint max.
Herb Derby [Mon, 23 Jan 2017 18:59:05 +0000 (13:59 -0500)]
Fix comparison that overflows for addresses near uint max.

BUG=chromium:683578

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