platform/upstream/libSkiaSharp.git
7 years agoSymbolize any stacktraces in DM and nanobench
Kevin Lubick [Wed, 15 Feb 2017 15:20:30 +0000 (10:20 -0500)]
Symbolize any stacktraces in DM and nanobench

As a soft rollout, this only affects the Linux NUCS
(on Ubuntu16).

BUG=skia:6206

Change-Id: Ic314e85159cd3c0d9e55bbdce412a8d61adebb33
Reviewed-on: https://skia-review.googlesource.com/8276
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoRemove GL asserts for geo shaders to not have uniforms
csmartdalton [Tue, 14 Feb 2017 17:53:41 +0000 (10:53 -0700)]
Remove GL asserts for geo shaders to not have uniforms

BUG=skia:

Change-Id: I51468c808f8a2e6593c237b4c4368df2f6729dff
Reviewed-on: https://skia-review.googlesource.com/8421
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoremoved unused code around scaled generators
Mike Reed [Wed, 15 Feb 2017 15:14:50 +0000 (10:14 -0500)]
removed unused code around scaled generators

BUG=skia:

Change-Id: I9e042cd9343e0f29032f84ee17b4b316214ec693
Reviewed-on: https://skia-review.googlesource.com/8403
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoFix Nexus 10s from shutting down too often
Kevin Lubick [Wed, 15 Feb 2017 15:08:51 +0000 (10:08 -0500)]
Fix Nexus 10s from shutting down too often

BUG=skia:

Change-Id: I373bb62c6894569a2672745ce20aa351c5893968
Reviewed-on: https://skia-review.googlesource.com/8486
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoSkPictureImageGenerator.h include guard
Hal Canary [Tue, 14 Feb 2017 21:57:42 +0000 (16:57 -0500)]
SkPictureImageGenerator.h include guard

Change-Id: I6d9894ce3db427985c000b431fb79388c211b70c
Reviewed-on: https://skia-review.googlesource.com/8455
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoMake GrPipelineInput::setToSolidCoverage set the opaque bit.
Brian Salomon [Wed, 15 Feb 2017 14:28:15 +0000 (09:28 -0500)]
Make GrPipelineInput::setToSolidCoverage set the opaque bit.

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

7 years agoSuggest P3 for wide gamut images in SkAndroidCodec
Matt Sarett [Wed, 15 Feb 2017 13:48:02 +0000 (08:48 -0500)]
Suggest P3 for wide gamut images in SkAndroidCodec

This will prevent us from clipping the gamut
to sRGB.

BUG=skia:

Change-Id: Ifc34369d96aa9dd92ae2af72aac1cfa17fdc4b94
Reviewed-on: https://skia-review.googlesource.com/8025
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoNon linear blending flag for SkColorSpace
Brian Osman [Wed, 15 Feb 2017 13:51:19 +0000 (08:51 -0500)]
Non linear blending flag for SkColorSpace

BUG=skia:6242

Change-Id: I63cce6019ce854ba807b2a819ef4fe3214898bee
Reviewed-on: https://skia-review.googlesource.com/8344
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRename SkConfig8888/SkPixelInfo to SkConvertPixels
Matt Sarett [Tue, 14 Feb 2017 19:18:27 +0000 (14:18 -0500)]
Rename SkConfig8888/SkPixelInfo to SkConvertPixels

BUG=skia:

Change-Id: I4f3c6370b3ef4247aa446716c7c154899925d089
Reviewed-on: https://skia-review.googlesource.com/8442
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoAdd a way to compute the code coverage of fuzzers
Kevin Lubick [Tue, 14 Feb 2017 18:12:37 +0000 (13:12 -0500)]
Add a way to compute the code coverage of fuzzers

This also fixes bin/coverage.

fuzz/coverage borrows heavily from bin/coverage.
BUG=skia:

Change-Id: I9e353d1f5ea3bca1d57d66b1c1ecabc6f9b23cee
Reviewed-on: https://skia-review.googlesource.com/8414
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoRemove returns at end of stage splices.
Mike Klein [Tue, 14 Feb 2017 22:54:09 +0000 (17:54 -0500)]
Remove returns at end of stage splices.

Returns?  Where we're going, we don't need returns.

I have discovered a truly marvelous alternative, a description of which
this code review is too narrow to contain.

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

7 years agoHandle collapsed drawVertices() texture coords gracefully
Florin Malita [Tue, 14 Feb 2017 21:19:49 +0000 (16:19 -0500)]
Handle collapsed drawVertices() texture coords gracefully

Detect collapsed coords and implement using a solid color shader.

Replace SkTLazy objects with a stack-based SkArenaAllocator.

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

7 years agoMove SkDOM to SkArenaAlloc from SkChunkAlloc.
Herb Derby [Tue, 14 Feb 2017 20:21:07 +0000 (15:21 -0500)]
Move SkDOM to SkArenaAlloc from SkChunkAlloc.

TBR=mtklein@google.com

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

7 years agoPicture backed images must have a bit depth and color space
Matt Sarett [Tue, 14 Feb 2017 18:50:43 +0000 (13:50 -0500)]
Picture backed images must have a bit depth and color space

Enforce that picture backed images created by the public API
must have a non-null SkColorSpace.

SkPictureShader uses a private call to get around this restriction.

BUG=skia:

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

7 years agoAdd more SampleApp support to viewer.
Jim Van Verth [Tue, 14 Feb 2017 20:16:46 +0000 (15:16 -0500)]
Add more SampleApp support to viewer.

Fixes loading a Sample as first slide.
Adds char input.
Adds --slide and --list options.

Change-Id: I34b66818e3673fcfdc649443e7d9dfb74b478062
Reviewed-on: https://skia-review.googlesource.com/8445
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoGrContext option to prevent GPU based YUV -> RGB
Brian Osman [Tue, 14 Feb 2017 19:15:48 +0000 (14:15 -0500)]
GrContext option to prevent GPU based YUV -> RGB

Rob and I spent a long time debugging why this wasn't working for
Flutter - doing the more complex operations on the loading thread
produces a blank texture when it's used later on the drawing thread.

Limiting ourselves to just creating and uploading RGBA data fixes
that. We need to debug what's going wrong, but in the meantime, this
lets Flutter use Skia APIs to manage GPU uploading and lifetime of
texture-backed images, while still doing those uploads on their IO
thread.

BUG=skia:

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

7 years agoRemove Vulkan GalaxyS7 bot
Greg Daniel [Tue, 14 Feb 2017 19:39:51 +0000 (14:39 -0500)]
Remove Vulkan GalaxyS7 bot

These bots have never worked so we're just waisting cycles on them. The
Pixels have the same GPU and an up to date driver so we're not losing
any test coverage.

BUG=skia:

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

7 years agoRemove include/xml from public API.
Herb Derby [Tue, 14 Feb 2017 19:42:30 +0000 (14:42 -0500)]
Remove include/xml from public API.

Move SkDOM and ilk from include/xml to src/xml.

I have looked for uses of SkDOM in the depot using cs/ and have found none,
but this is not perfect. So, if this breaks external builds, revert it.

TBR=reed@google.com

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

7 years agowork on raster device clipping
Mike Reed [Tue, 14 Feb 2017 19:25:14 +0000 (14:25 -0500)]
work on raster device clipping

With the flag (SkDevice.h) enabled, I get correct drawing w/ the rasterbackend.

After this lands, hopefully we can work in parallel on gpu/pdf/svg/xps/etc.

BUG=skia:6214

Change-Id: Ie35fee818470aab57aebacca8a2a5b812a552ee2
Reviewed-on: https://skia-review.googlesource.com/8192
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agostop using SkScalarMul
Mike Reed [Tue, 14 Feb 2017 15:59:19 +0000 (10:59 -0500)]
stop using SkScalarMul

BUG=skia:

Change-Id: Ie41d8665a1c62ba8eddc93d8cfefaf64ddc52ff8
Reviewed-on: https://skia-review.googlesource.com/8411
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRemove SkSmallAllocator.
Herb Derby [Tue, 14 Feb 2017 16:14:16 +0000 (11:14 -0500)]
Remove SkSmallAllocator.

TBR=mtklein@google.com

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

7 years agoinclude what you use
Mike Reed [Mon, 13 Feb 2017 21:48:17 +0000 (16:48 -0500)]
include what you use

BUG=skia:

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

7 years agoMake raster pipeline support all pixel conversions
Matt Sarett [Tue, 14 Feb 2017 16:21:02 +0000 (11:21 -0500)]
Make raster pipeline support all pixel conversions

BUG=skia:

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

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

7 years agoSimplify code for making paints with shaders.
Herb Derby [Tue, 14 Feb 2017 16:13:26 +0000 (11:13 -0500)]
Simplify code for making paints with shaders.

Since SkAutoBitmapShaderInstall was simplified to create shaders on the
heap, it is no longer needed. Simplify to a single routine.

TBR=mtklein@google.com

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

7 years agoRemove component flags from GrPipelineInput.
Brian Salomon [Tue, 14 Feb 2017 16:33:01 +0000 (11:33 -0500)]
Remove component flags from GrPipelineInput.

We don't use these anywhere downstream except to check for opaqueness.

Change-Id: I897137135d69004ed45c0f4c1e7297183f49fc6d
Reviewed-on: https://skia-review.googlesource.com/8402
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoRemove component flags from GrXPFactory output analysis.
Brian Salomon [Tue, 14 Feb 2017 15:28:22 +0000 (10:28 -0500)]
Remove component flags from GrXPFactory output analysis.

Change-Id: Ieb8dab564e6e593dca2e092d352756052dadfd90
Reviewed-on: https://skia-review.googlesource.com/8354
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoupdate gm to test 2 unclipped layers
Mike Reed [Tue, 14 Feb 2017 15:12:34 +0000 (10:12 -0500)]
update gm to test 2 unclipped layers

BUG=skia:

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

7 years agoAdd check for finite phase to SkPath1DPathEffect::Make
Robert Phillips [Tue, 14 Feb 2017 15:03:33 +0000 (10:03 -0500)]
Add check for finite phase to SkPath1DPathEffect::Make

Change-Id: I600f2e697769ecdb9080cda1533104231e00b14c
Reviewed-on: https://skia-review.googlesource.com/8406
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoSkSplicer: implement constant_color
Mike Klein [Tue, 14 Feb 2017 14:32:43 +0000 (09:32 -0500)]
SkSplicer: implement constant_color

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

7 years agoSkSplicer: fix dstover
Mike Klein [Tue, 14 Feb 2017 14:41:17 +0000 (09:41 -0500)]
SkSplicer: fix dstover

dstover was updating the {dr,dg,db,da} registers instead of {r,g,b,a}.

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

7 years agoRevert "Revert "Always make SkImageShaders in heap.""
Herb Derby [Tue, 14 Feb 2017 15:06:23 +0000 (15:06 +0000)]
Revert "Revert "Always make SkImageShaders in heap.""

This reverts commit 07f665efb918f68e406b76a78d0b76d5c714f16c.

Reason for revert: Android code moved from priv api to real api

Original change's description:
> Revert "Always make SkImageShaders in heap."
>
> This reverts commit ff590a12441002d281254ec6a86070ac0a19263f.
>
> Reason for revert: This breaks the android roll because they are using
> a private call. Updating android tests to use new api.
>
> Original change's description:
> > Always make SkImageShaders in heap.
> >
> > I made a couple of measurments, and it looks like any differences is
> > well below the noise threshold.
> >
> > Just for the record run1: .9991 of baseline and run2 .9988 of baseline.
> > I was using top25 .skps as workload.
> >
> > TBR=mtklein@google.com
> >
> > Change-Id: If4fa06e5d5df72fb67dbb4bbb99c926f05765897
> > Reviewed-on: https://skia-review.googlesource.com/8341
> > Reviewed-by: Herb Derby <herb@google.com>
> > Commit-Queue: Herb Derby <herb@google.com>
> >
>
> TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: Ibdaafc796702e250933b62e5f4abb5e2ce8d40c0
> Reviewed-on: https://skia-review.googlesource.com/8393
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
>

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

Change-Id: I320b5ebf707d74ffafd8b70d69646b74a30f0ae8
Reviewed-on: https://skia-review.googlesource.com/8407
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoSkScalarMul is deprecated
Mike Reed [Tue, 14 Feb 2017 01:44:33 +0000 (20:44 -0500)]
SkScalarMul is deprecated

BUG=skia:

Change-Id: I88ecfe9d4c72506f6b1a0e0dfadd2a5c171a6cb6
Reviewed-on: https://skia-review.googlesource.com/8353
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
7 years agoSkSplicer support for 2-point gradients.
Mike Klein [Fri, 20 Jan 2017 17:51:36 +0000 (12:51 -0500)]
SkSplicer support for 2-point gradients.

Add some stages to SkSplicer:
   - seed_shader
   - matrix_2x3
   - clamp_x
   - clamp_y
   - linear_gradient_2stops

seed_shader needed new constants, 0.5f and {0,1,2,3,4,5,6,7}.

$ out/nanobench -m gradient_linear_clamp\$ --config f16 --ms 2000 -q
    Before: 612.17us
    After:  163.80us

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

7 years agoMove the rt adjust uniform into GP EmitArgs
csmartdalton [Mon, 13 Feb 2017 22:45:35 +0000 (15:45 -0700)]
Move the rt adjust uniform into GP EmitArgs

The GP will likely require this value when dealing with a geometry
shader. In the future we may wish to either switch to device-space
geometry shaders, or else put this value in an "sk_" builtin.

BUG=skia:

Change-Id: I8dff88fc219feef84d39fb7bbd08f3b5686f53d2
Reviewed-on: https://skia-review.googlesource.com/8362
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoAdd animated text samples
csmartdalton [Mon, 13 Feb 2017 21:57:28 +0000 (14:57 -0700)]
Add animated text samples

BUG=skia:

Change-Id: I0b0a00a0d5c5790a1fc963458bc90c968830afd8
Reviewed-on: https://skia-review.googlesource.com/8361
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoGrTessellator (AA): fix "Canvas Arcs" coverage artifact.
Stephen White [Mon, 13 Feb 2017 18:55:42 +0000 (13:55 -0500)]
GrTessellator (AA): fix "Canvas Arcs" coverage artifact.

When sanitizing contours, if the first and last vertices coincide,
continue with the previous vertex, not the next vertex, since we
may otherwise exit prematurely. Also, round the last vertex before
entering the loop, just in case it coincides with the first.

Add a test case to exercise the above, and another one which exercises
the intruding-vertex workaround.

BUG=691593

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

7 years agoadd gm for clipRegion
Mike Reed [Mon, 13 Feb 2017 20:33:12 +0000 (15:33 -0500)]
add gm for clipRegion

BUG=skia:

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

7 years agoEnable sse2 backend for SkSplicer.
Mike Klein [Sat, 11 Feb 2017 18:21:29 +0000 (13:21 -0500)]
Enable sse2 backend for SkSplicer.

One more piece of https://skia-review.googlesource.com/c/8230/.

-mno-red-zone makes it safe for x86 stages to use the stack on Windows
(at the expense of an extra sub and add to the stack pointer on !Windows).

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Win10-MSVC-Golo-GPU-GT610-x86_64-Release,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug

Change-Id: I81f8220e790b201757a7e1e9752b2fe94520ccbb
Reviewed-on: https://skia-review.googlesource.com/8352
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoRevert "Always make SkImageShaders in heap."
Herb Derby [Mon, 13 Feb 2017 20:04:00 +0000 (20:04 +0000)]
Revert "Always make SkImageShaders in heap."

This reverts commit ff590a12441002d281254ec6a86070ac0a19263f.

Reason for revert: This breaks the android roll because they are using
a private call. Updating android tests to use new api.

Original change's description:
> Always make SkImageShaders in heap.
>
> I made a couple of measurments, and it looks like any differences is
> well below the noise threshold.
>
> Just for the record run1: .9991 of baseline and run2 .9988 of baseline.
> I was using top25 .skps as workload.
>
> TBR=mtklein@google.com
>
> Change-Id: If4fa06e5d5df72fb67dbb4bbb99c926f05765897
> Reviewed-on: https://skia-review.googlesource.com/8341
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
>

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

Change-Id: Ibdaafc796702e250933b62e5f4abb5e2ce8d40c0
Reviewed-on: https://skia-review.googlesource.com/8393
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoFix stack alignment in Windows before_loop/after_loop.
Mike Klein [Tue, 14 Feb 2017 00:00:09 +0000 (19:00 -0500)]
Fix stack alignment in Windows before_loop/after_loop.

This should land as a no-op, as nothing using the stack yet.
It will allow us to land the SSE2 code, which does spill in to_srgb.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Win10-MSVC-Golo-GPU-GT610-x86_64-Release

Change-Id: Ie8000d50a85d56ad6229736d79f3a947f06a808c
Reviewed-on: https://skia-review.googlesource.com/8389
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agotools/git-sync-deps: less verbose when fetch is needed
Hal Canary [Mon, 13 Feb 2017 18:40:56 +0000 (13:40 -0500)]
tools/git-sync-deps: less verbose when fetch is needed

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

7 years agoMake SkAutoTMalloc movable
csmartdalton [Mon, 13 Feb 2017 18:54:37 +0000 (11:54 -0700)]
Make SkAutoTMalloc movable

BUG=skia:

Change-Id: I683407659c252656445b92734484170587c2f75a
Reviewed-on: https://skia-review.googlesource.com/8360
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agofiddle: Fix JSON output logic.
Joe Gregorio [Mon, 13 Feb 2017 18:55:17 +0000 (13:55 -0500)]
fiddle: Fix JSON output logic.

BUG=skia:

Change-Id: Ia17b8328f692881282be15afa5e7f661ddc83318
Reviewed-on: https://skia-review.googlesource.com/8388
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>

7 years agoSkPDF: skip shader lookup for SkShader::kColor_GradientType
Hal Canary [Mon, 13 Feb 2017 01:29:12 +0000 (20:29 -0500)]
SkPDF: skip shader lookup for SkShader::kColor_GradientType

Also: SkPDFShader::State isi now zero-initilized.

No change in PDF tests.

BUG=chromium:690875
Change-Id: Ibc56cc9435362733adf50cbb51b11c9413572e7f
Reviewed-on: https://skia-review.googlesource.com/8355
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoMove GrTessellator from SkChunckAlloc to SkArenaAlloc.
Herb Derby [Mon, 13 Feb 2017 17:10:46 +0000 (12:10 -0500)]
Move GrTessellator from SkChunckAlloc to SkArenaAlloc.

TBR=ethannicholas@google.com

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

7 years agoSkPDF: better tolerance path conversion to quadratics
Hal Canary [Mon, 13 Feb 2017 16:03:23 +0000 (11:03 -0500)]
SkPDF: better tolerance path conversion to quadratics

BUG=chromium:691386
Change-Id: I2cb9be7dd606b2ba61ff609f9fd81a55655901f6
Reviewed-on: https://skia-review.googlesource.com/8381
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
7 years agoA simple gradient test
Tenghui Zhu [Fri, 10 Feb 2017 01:45:46 +0000 (17:45 -0800)]
A simple gradient test

Change-Id: Ic3e53f7eab747f63641e0eb6a1c73ad0833acef6
Reviewed-on: https://skia-review.googlesource.com/8158
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Tenghui Zhu <ztenghui@google.com>

7 years agoAdd preserves premul and modulate optimization to compose fragment processors.
Brian Salomon [Mon, 13 Feb 2017 17:41:44 +0000 (12:41 -0500)]
Add preserves premul and modulate optimization to compose fragment processors.

Fixes out of range colors produced by matrix convolution and dither effects. Adds modulate optimization to matrix convolution.

Change-Id: I8424250a52e864f4b5feaf4474293695c26039d8
Reviewed-on: https://skia-review.googlesource.com/8351
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoAdd plumbing for text only fiddles.
Joe Gregorio [Mon, 13 Feb 2017 16:39:43 +0000 (11:39 -0500)]
Add plumbing for text only fiddles.

BUG=skia:

Change-Id: If3967f868c482bbded7185a0ed7c6559cd2858c5
Reviewed-on: https://skia-review.googlesource.com/8334
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>

7 years agoAlways make SkImageShaders in heap.
Herb Derby [Mon, 13 Feb 2017 16:36:14 +0000 (11:36 -0500)]
Always make SkImageShaders in heap.

I made a couple of measurments, and it looks like any differences is
well below the noise threshold.

Just for the record run1: .9991 of baseline and run2 .9988 of baseline.
I was using top25 .skps as workload.

TBR=mtklein@google.com

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

7 years agoBlacklist arithmetic jpeg on WIC
Matt Sarett [Mon, 13 Feb 2017 17:04:20 +0000 (12:04 -0500)]
Blacklist arithmetic jpeg on WIC

NOTRY=true

BUG=skia:

Change-Id: I2c455f596b516108e2a74a69f29f4f7d2c1e6e4f
Reviewed-on: https://skia-review.googlesource.com/8382
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoClean up hack of run api
Kevin Lubick [Mon, 13 Feb 2017 15:35:39 +0000 (10:35 -0500)]
Clean up hack of run api

Also fix such that the Nexus Players get kicked three times
not one and a half times.

BUG=skia:6045

Change-Id: Ie9142f809a979a46b17a8ad9a205279d6fcb9bd5
Reviewed-on: https://skia-review.googlesource.com/8266
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoRevert "Revert "IWYU""
Mike Reed [Mon, 13 Feb 2017 14:32:54 +0000 (09:32 -0500)]
Revert "Revert "IWYU""

This reverts commit 3c727d2386059c1d7cbdcdc9bef5fa18ed33667e.

BUG=skia:

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

7 years agoMake header files idempotent; script to check
Hal Canary [Fri, 10 Feb 2017 14:06:38 +0000 (09:06 -0500)]
Make header files idempotent; script to check

Change-Id: I960ded854e6bc7cdee029a7393cac2a686c41754
Reviewed-on: https://skia-review.googlesource.com/8308
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoUpdate libjpeg-turbo to 1.5.1, enable arithmetic decoding
Matt Sarett [Fri, 10 Feb 2017 22:47:51 +0000 (17:47 -0500)]
Update libjpeg-turbo to 1.5.1, enable arithmetic decoding

BUG=skia:4710

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

7 years agoRemove GrFragmentProcessor::computeInvariantOutput
Brian Salomon [Sun, 12 Feb 2017 14:28:54 +0000 (09:28 -0500)]
Remove GrFragmentProcessor::computeInvariantOutput

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

7 years agoInitialize test textures for ProcessorOptimizationValidationTest.
Brian Salomon [Fri, 10 Feb 2017 17:39:26 +0000 (12:39 -0500)]
Initialize test textures for ProcessorOptimizationValidationTest.

Ensure the data in the RGBA texture is premul.

Reenable the "modulation" optimization flag on GrAlphaThresholdFragmentProcessor.

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

7 years agoPixel zoomer in viewer
Brian Osman [Mon, 13 Feb 2017 14:39:57 +0000 (09:39 -0500)]
Pixel zoomer in viewer

Made it a separate ImGui window (rather than part of the debug window).
Bring it up with 'z'. Draggable/resizable. Variable zoom scale. Enjoy.

BUG=skia:

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

7 years agoReplaced all calls to fragmentPosition() with sk_FragCoord
Ethan Nicholas [Thu, 9 Feb 2017 22:01:22 +0000 (17:01 -0500)]
Replaced all calls to fragmentPosition() with sk_FragCoord

Change-Id: I2ed4558aea74b3ae7ee11dfe4736cdbcb16ae49e
Reviewed-on: https://skia-review.googlesource.com/8278
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoRemove unused/barely-supported compressed GrPixelConfigs
Robert Phillips [Fri, 10 Feb 2017 19:44:58 +0000 (14:44 -0500)]
Remove unused/barely-supported compressed GrPixelConfigs

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

7 years agoOnly use DeviceCM->fNext if the layer doesn't affect the clip
Mike Reed [Sat, 11 Feb 2017 15:18:58 +0000 (10:18 -0500)]
Only use DeviceCM->fNext if the layer doesn't affect the clip

Before this, fNext always pointed at the next (prev) saveLayer in the stack.
Typically each layer is isolated, as it is defined to "consume" the current clip.
Android has an option to not affect/consume the clip, hence the support for looping
through this link-list in updateMC().

The current code always executes this loop, subtracting the current layer's clip from
the global clip, so typically the 2nd iteration will see an empty remaining clip and
draw nothing ... but we still pay for the subtract and the draw-overhead.

This change makes fNext point to the next layer ONLY if the current layer was marked
as non-consuming.

As a side-effect, this change also now detects the "last" restore by looking for
fMCRec == null, rather than fNext == nullptr. fMCRec was always null on the last
layer, so this change is safe, and could have landed independently.

BUG=skia:6214

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

7 years agoUpdate SKP version
UpdateSKPs [Sun, 12 Feb 2017 07:07:06 +0000 (07:07 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

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

7 years agoRefactor without turning on sse2/sse41.
Mike Klein [Sat, 11 Feb 2017 16:58:38 +0000 (11:58 -0500)]
Refactor without turning on sse2/sse41.

This is another slice of https://skia-review.googlesource.com/c/8230/.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Win10-MSVC-Golo-GPU-GT610-x86_64-Release

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

7 years agoMake Win before_loop/after_loop SSE compatible.
Mike Klein [Sat, 11 Feb 2017 16:09:56 +0000 (11:09 -0500)]
Make Win before_loop/after_loop SSE compatible.

This is one little slice of https://skia-review.googlesource.com/c/8230/.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Win10-MSVC-Golo-GPU-GT610-x86_64-Release

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

7 years agoRevert "Generate sse2/sse4.1 splices, use them."
Mike Klein [Sat, 11 Feb 2017 14:01:52 +0000 (14:01 +0000)]
Revert "Generate sse2/sse4.1 splices, use them."

This reverts commit 1fe55dc9fa47a73d470438d6298dc3fa959e4528.

Reason for revert: breaking Win GPU bots?

Original change's description:
> Generate sse2/sse4.1 splices, use them.
>
> While we're at it, tidy up build_stages.py a bit.
> Redirecting stdout seems a lot easier than print >>f all over the place.
>
> TODO: non-VEX-encoded before_loop() and after_loop()
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug
>
> Change-Id: I3f38e55f081670dd598c6050435466d9f394e5be
> Reviewed-on: https://skia-review.googlesource.com/8230
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>
>

TBR=mtklein@chromium.org,herb@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: Iba1905c54cb2dc42a880b9e6a8093835ffd530a2
Reviewed-on: https://skia-review.googlesource.com/8347
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRevert "IWYU"
Robert Phillips [Sat, 11 Feb 2017 01:25:00 +0000 (01:25 +0000)]
Revert "IWYU"

This reverts commit 2aeae78a2ce3b036f0401fd0381d6fd6e2a7a1fc.

Reason for revert: It looks like this is breaking the android roll

out/target/product/angler/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_graphics_Canvas.o frameworks/base/core/jni/android_graphics_Canvas.cpp"
frameworks/base/core/jni/android_graphics_Canvas.cpp:178:15: error: incomplete type 'SkRegion' named in nested name specifier

Original change's description:
> IWYU
>
> BUG=skia:
>
> Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee
> Reviewed-on: https://skia-review.googlesource.com/8231
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

Change-Id: If979c3dd9dc3fe08ac450ced113b3d1e9a86f02a
Reviewed-on: https://skia-review.googlesource.com/8346
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRevert "More non-invertible shader local matrix guards"
Robert Phillips [Sat, 11 Feb 2017 01:19:30 +0000 (01:19 +0000)]
Revert "More non-invertible shader local matrix guards"

This reverts commit 368af4605db18f7197ed3289d2ebdc93bbb5879b.

Reason for revert: checking to see if this is breaking the Chrome DEPS roll
Original change's description:
> More non-invertible shader local matrix guards
>
> Change-Id: Ida9a300420ff1d883e617cdaadb80e88c99ad226
> Reviewed-on: https://skia-review.googlesource.com/8333
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
>

TBR=brianosman@google.com,fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Id0a771342b9be27c85d91f511d814297b8c3e0b8
Reviewed-on: https://skia-review.googlesource.com/8345
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoDelete legacy named color space API
Matt Sarett [Fri, 10 Feb 2017 20:11:12 +0000 (15:11 -0500)]
Delete legacy named color space API

BUG=skia:

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

7 years agoAdd GrGLSLShaderBuilder::declareGlobal
csmartdalton [Thu, 9 Feb 2017 14:47:21 +0000 (09:47 -0500)]
Add GrGLSLShaderBuilder::declareGlobal

BUG=skia:

Change-Id: I75eeb7cbd1bf157c463e5e80b4560a953b7883e8
Reviewed-on: https://skia-review.googlesource.com/8245
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoEnable threaded SkTaskGroup in Viewer
csmartdalton [Fri, 10 Feb 2017 22:05:14 +0000 (17:05 -0500)]
Enable threaded SkTaskGroup in Viewer

BUG=skia:

Change-Id: I7f467c094fb0bcb983bd86d07cb9bd7be34666b3
Reviewed-on: https://skia-review.googlesource.com/8332
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRemove unused field, and use official size.
Herb Derby [Fri, 10 Feb 2017 21:57:57 +0000 (16:57 -0500)]
Remove unused field, and use official size.

TBR=reed@google.com

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

7 years agoRe-enable ProcessorOptimizationValidationTest on iOS.
Brian Salomon [Fri, 10 Feb 2017 21:16:21 +0000 (16:16 -0500)]
Re-enable ProcessorOptimizationValidationTest on iOS.

Change-Id: I05aae2e86cd7a219ab98e882bb6041263b4aca71
Reviewed-on: https://skia-review.googlesource.com/8318
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoUpdate codesearch docs.
Ben Wagner [Fri, 10 Feb 2017 16:44:55 +0000 (11:44 -0500)]
Update codesearch docs.

BUG=skia:

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=8321

Change-Id: Ia8c87fbb3b2380c18d27bffbbd060a0d77194f7d
Reviewed-on: https://skia-review.googlesource.com/8321
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoRevert "Use SDF path miplevels based on the original path's size."
Jim Van Verth [Fri, 10 Feb 2017 21:45:43 +0000 (21:45 +0000)]
Revert "Use SDF path miplevels based on the original path's size."

This reverts commit 6e83b13c226246041a33dc7bf0e92626581b5e79.

Reason for revert: Fractional path sizes are causing asserts on the bots.

Original change's description:
> Use SDF path miplevels based on the original path's size.
>
> Should produce sharper results than arbitrary fixed sizes.
> Adds a new test to pathfill GM.
>
> BUG=chromium:682918
>
> Change-Id: I5a394098665d01e995a244fde278236f1471e6c9
> Reviewed-on: https://skia-review.googlesource.com/8328
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
>

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

Change-Id: I4a52df808ef3f769d0e6f75785148d46936a6747
Reviewed-on: https://skia-review.googlesource.com/8342
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
7 years agoUse SDF path miplevels based on the original path's size.
Jim Van Verth [Fri, 10 Feb 2017 20:24:39 +0000 (15:24 -0500)]
Use SDF path miplevels based on the original path's size.

Should produce sharper results than arbitrary fixed sizes.
Adds a new test to pathfill GM.

BUG=chromium:682918

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

7 years agoMore non-invertible shader local matrix guards
Florin Malita [Fri, 10 Feb 2017 20:34:27 +0000 (15:34 -0500)]
More non-invertible shader local matrix guards

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

7 years agoGenerate sse2/sse4.1 splices, use them.
Mike Klein [Thu, 9 Feb 2017 03:53:41 +0000 (22:53 -0500)]
Generate sse2/sse4.1 splices, use them.

While we're at it, tidy up build_stages.py a bit.
Redirecting stdout seems a lot easier than print >>f all over the place.

TODO: non-VEX-encoded before_loop() and after_loop()

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: I3f38e55f081670dd598c6050435466d9f394e5be
Reviewed-on: https://skia-review.googlesource.com/8230
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years ago'gasp' to control symmetric rendering on Windows.
Ben Wagner [Thu, 9 Feb 2017 18:41:45 +0000 (13:41 -0500)]
'gasp' to control symmetric rendering on Windows.

Currently Skia tries hard to use symmetric rendering with DirectWrite
as often as possible. However, particularly on Windows 7 with CJK fonts,
thin horizontal strokes can be rendered without sufficient contrast
because the font was relying on the 6x1 oversampling for what is
effecitvely drop-out control. This change will only allow symmetric
rendering if the font allows it in the 'gasp' table.

BUG=chromium:645055

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

7 years agoUse new fragment processor optimization queries.
Brian Salomon [Fri, 10 Feb 2017 19:29:38 +0000 (14:29 -0500)]
Use new fragment processor optimization queries.

This doesn't yet delete the old virtuals.

It still uses the color and component flags model for the pipeline input and blended output but I'm planning to change those as well.

Change-Id: I64e2ec0fe9ed9fae3aabf1ca8c9bc0582fc7565a
Reviewed-on: https://skia-review.googlesource.com/7760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoIWYU
Mike Reed [Fri, 10 Feb 2017 18:11:53 +0000 (13:11 -0500)]
IWYU

BUG=skia:

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

7 years agoIntegrate the ImGui library with viewer
Brian Osman [Fri, 10 Feb 2017 18:36:16 +0000 (13:36 -0500)]
Integrate the ImGui library with viewer

Code and docs are at: https://github.com/ocornut/imgui

ImGui is an open source immediate mode GUI library that's
lightweight and fairly simply to integrate. Widget functions
return their state, and the library emits vertex and index
data to render everything. It's got a huge set of built-in
widgets and really robust layout control.

For the initial integration, I had to fix up event handling
in the viewer's app framework (to get mouse wheel and more
keys, etc...).

The new viewer 'Debug' window is toggled with the space bar.
For this change, I've added one feature to that window: the
slide picker. It's got a list of all slides, with filtering
support, and the ability to click to switch slides.

I also included the ImGui 'Demo' window (toggled with 'g').
This is nicely laid out, and includes examples of pretty
much everything the library can do. It also serves as good
documentation - find something that looks like what you want,
and then go look at the corresponding code (all of it is in
imgui_demo.cpp).

I have other CLs with other features (like directly editing
the primaries of the working color space), but I wanted to
land this chunk first, then start adding more features.

Other than adding new debugging features, there are few
more outstanding work items:

1) Raster doesn't render the GUI correctly, due to non-
invertible pos -> UV matrices. Florin is working on that.
2) Touch inputs aren't being routed yet, so the GUI isn't
usable on Android yet. Might also be tough to work with,
given the size.
3) ImGui has clipboard integration (that's why it wants
the C, X, and V keys), but we need to wire it up to the
OS' clipboard functions.
4) Draw commands can carry a void* payload to support
drawing images (using whatever mechanism the engine has).
I'd like to set that up (probably using SkImage*), which
makes it really easy to add visualization of off-screen
images in GMs, etc...

BUG=skia:

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

7 years agoCompile SkJpegCodec on bzl iOS build
Matt Sarett [Fri, 10 Feb 2017 14:42:54 +0000 (09:42 -0500)]
Compile SkJpegCodec on bzl iOS build

BUG=skia:

Change-Id: I7ffb33bc4b215874821d6797e7795e8dd59467ee
Reviewed-on: https://skia-review.googlesource.com/8312
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoMarker for driver upgrade.
Ben Wagner [Fri, 10 Feb 2017 16:57:58 +0000 (11:57 -0500)]
Marker for driver upgrade.

After https://skia-review.googlesource.com/c/8267/, I accidentally downgraded the driver on HD Graphics 4600. This CL marks reverting to the previous driver.

BUG=skia:
NOTRY=true

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

7 years agoRemove declaration of non-existent constructor
Brian Osman [Fri, 10 Feb 2017 17:10:54 +0000 (12:10 -0500)]
Remove declaration of non-existent constructor

BUG=skia:

Change-Id: If60588d5b6e960f2fb89cc24296cea7606fa189a
Reviewed-on: https://skia-review.googlesource.com/8324
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRemove SkTextureCompressor.
Herb Derby [Fri, 10 Feb 2017 16:47:58 +0000 (11:47 -0500)]
Remove SkTextureCompressor.

This is the ultimate state of what it looks like to remove
SkTextureCompressor.

This end result will result from the following steps.

1) Remove Skia dep on ktx (done)
2) Move format over to ktx (done)
3) Remove all SkTexture compressor code

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

Change-Id: I3ad7a6abbea006a3034d95662c652d6db90b86ef
Reviewed-on: https://skia-review.googlesource.com/8272
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoAdd support for RG float textures
csmartdalton [Wed, 8 Feb 2017 21:14:11 +0000 (16:14 -0500)]
Add support for RG float textures

Adds kRG_float_GrPixelConfig.

Also removes default labels from switches on GrPixelConfig, in order
to help guide future enumerals to handle them properly.

BUG=skia:

Change-Id: Ie80b9413b4002b666df3ef1a7a8ea4c9c29ce43b
Reviewed-on: https://skia-review.googlesource.com/8226
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoAdd GM to test ETC1
Robert Phillips [Fri, 10 Feb 2017 15:45:59 +0000 (10:45 -0500)]
Add GM to test ETC1

I don't think ETC1 currently gets tested any other way.

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

7 years agoFix size of vertices GM to show all content
Brian Salomon [Fri, 10 Feb 2017 15:48:15 +0000 (10:48 -0500)]
Fix size of vertices GM to show all content

Change-Id: Ib0c567da03fe9373cdfeb23291c1f448571668b3
Reviewed-on: https://skia-review.googlesource.com/8317
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFixed3232 overflow in LinearGradientContext::shadeSpan()
Florin Malita [Fri, 10 Feb 2017 15:42:49 +0000 (10:42 -0500)]
Fixed3232 overflow in LinearGradientContext::shadeSpan()

Speculative fix for TAP ubsan failures.

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

7 years agoDisable processor optimization on iOS
Brian Salomon [Fri, 10 Feb 2017 15:13:50 +0000 (10:13 -0500)]
Disable processor optimization on iOS

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

7 years agoStrip dead code on all Release builds.
Mike Klein [Fri, 10 Feb 2017 12:59:39 +0000 (07:59 -0500)]
Strip dead code on all Release builds.

Today we do this only on Windows (/OPT:REF).

This extends to Mac-likes (-dead_strip) and non-Macs
(-ffunction-sections, -fdata-sections, -Wl,--gc-sections).

Should be no harm passing -ffunction-sections and -fdata-sections on Mac too.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini

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

7 years agoChange the Sprite portion of SkBlitter use SkArenaAlloc.
Herb Derby [Thu, 9 Feb 2017 22:25:43 +0000 (17:25 -0500)]
Change the Sprite portion of SkBlitter use SkArenaAlloc.

The semantics of createT and make are the same with respect to
dtors, so it just a simple replacement of calls.

TBR=reed@google.com

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

7 years agoFix GrRenderTargetContext::drawArc's abandoned Context handling
Robert Phillips [Fri, 10 Feb 2017 14:31:01 +0000 (09:31 -0500)]
Fix GrRenderTargetContext::drawArc's abandoned Context handling

This was causing a crash in --preAbandonGpuContext mode

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

7 years agoMarker for Win Intel driver update.
Ben Wagner [Thu, 9 Feb 2017 18:16:48 +0000 (13:16 -0500)]
Marker for Win Intel driver update.

BUG=skia:

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

7 years agoFix new_texture_image in "preAbandonGpuContext" mode
Robert Phillips [Fri, 10 Feb 2017 13:04:06 +0000 (08:04 -0500)]
Fix new_texture_image in "preAbandonGpuContext" mode

This fixes a valgrind complaint

Change-Id: I0f51168b2835b83d2bb5580257b02a105e249e31
Reviewed-on: https://skia-review.googlesource.com/8306
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoRevert "Roll minimum picture version up to 44."
Robert Phillips [Fri, 10 Feb 2017 12:32:08 +0000 (12:32 +0000)]
Revert "Roll minimum picture version up to 44."

This reverts commit e037d12625b1dbb7952ae8a6553d6830e8b3ebbf.

Reason for revert: Checking to see if this broke the Chrome DEPS roll

Original change's description:
> Roll minimum picture version up to 44.
>
> This is the version produced by Chrome M54.  M56 is stable now.
>
> I am most interested in deleting SkBitmapSourceDeserializer,
> because it awkwardly calls from core into effects (SkImageSource).
>
> Change-Id: I58b8b990017ba43372ab3333a4ef8312e75abc61
> Reviewed-on: https://skia-review.googlesource.com/8286
> 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: I9202591c7945c9421f335e544bf12461e38acdc6
Reviewed-on: https://skia-review.googlesource.com/8305
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoAdd a -Mini build bot to build the smallest Skia possible.
Mike Klein [Thu, 9 Feb 2017 20:22:53 +0000 (15:22 -0500)]
Add a -Mini build bot to build the smallest Skia possible.

This bot wants everything possible to turn off turned off.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini

Change-Id: Ida7ee2406f8fecda9bd408cd9880a3838590a81b
Reviewed-on: https://skia-review.googlesource.com/8280
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoMake header files self-sufficient
Hal Canary [Tue, 7 Feb 2017 19:09:38 +0000 (14:09 -0500)]
Make header files self-sufficient

Change-Id: Ice7d761b1023da77e50e5d6aa597964f7d9aa1d8
Reviewed-on: https://skia-review.googlesource.com/8302
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoFix CopyPixels() bug
Matt Sarett [Thu, 9 Feb 2017 23:35:14 +0000 (18:35 -0500)]
Fix CopyPixels() bug

BUG=skia:

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

7 years agoReplace kCTFontXXXOrientation with kCTFontOrientationXXX.
bungeman [Thu, 9 Feb 2017 22:15:59 +0000 (17:15 -0500)]
Replace kCTFontXXXOrientation with kCTFontOrientationXXX.

English has a quite complex order of adjectives, and adjectives come
before the noun.  However, this order often clashes with the desire for
clear hierarchy in naming. In the kingdom of nouns the nouns come first.
A great eye at Apple noticed a lack of dicipline in the naming of the
orientation constants and ranamed them to conform, deprecating the
original names. To avoid warnings which become errors, Skia must now
use the new names for these constants.

BUG=chromium:408571

Change-Id: I5ccce4a3353157e1e8780c3a169099cec76b7637
Reviewed-on: https://skia-review.googlesource.com/8300
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>