platform/upstream/libSkiaSharp.git
7 years agoRevert "CQ config: add gerrit CQAbility verifier."
Ravi Mistry [Fri, 17 Feb 2017 17:34:12 +0000 (17:34 +0000)]
Revert "CQ config: add gerrit CQAbility verifier."

This reverts commit 04628221324eb2e5b329a8fd9c69196ea9acb43c.

Reason for revert: Lets revert until the proto is rolled into Skia.

Original change's description:
> CQ config: add gerrit CQAbility verifier.
>
> Goal is to ensure that unreviewed and untrusted code isn't sent through
> CQ to try bots, by accident or through malicious intent.
>
> R=​rmistry@google.com
> BUG=chromium:692613
> NOTRY=True
>
> Change-Id: I750be91895f5b77229b8f4a22216f00eaa75f7a0
> Reviewed-on: https://skia-review.googlesource.com/8620
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> Commit-Queue: Ravi Mistry <rmistry@google.com>
>

TBR=rmistry@google.com,reviews@skia.org,tandrii@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:692613

Change-Id: I6d4b821b2a02ef3e097cf68cd8ebfb2b51d4d165
Reviewed-on: https://skia-review.googlesource.com/8663
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>

7 years agoAdd Flutter compile bot
Ravi Mistry [Fri, 17 Feb 2017 16:28:36 +0000 (11:28 -0500)]
Add Flutter compile bot

BUG=skia:6227

Change-Id: I997663e49c407e3ec64c8e67a2ca27700d5081b4
Reviewed-on: https://skia-review.googlesource.com/8448
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoSwitch from size_t to uint32_t to represent constraints better.
Herb Derby [Fri, 17 Feb 2017 15:45:47 +0000 (10:45 -0500)]
Switch from size_t to uint32_t to represent constraints better.

TBR=mtklein@google.com

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

7 years agoMake all of the NUC tests use the newer intel driver
Kevin Lubick [Fri, 17 Feb 2017 15:25:34 +0000 (10:25 -0500)]
Make all of the NUC tests use the newer intel driver

Also update LD_LIBRARY_PATH to include the LIBGL_DRIVERS_PATH.

BUG=skia:

Change-Id: I0b4d3237f8042ac739f184b107f1c85368b71ee2
Reviewed-on: https://skia-review.googlesource.com/8603
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agohide deprecated underline and strikethru
Mike Reed [Fri, 17 Feb 2017 14:28:22 +0000 (09:28 -0500)]
hide deprecated underline and strikethru

BUG=skia:6250

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

7 years agoCQ config: add gerrit CQAbility verifier.
Andrii Shyshkalov [Fri, 17 Feb 2017 14:17:50 +0000 (15:17 +0100)]
CQ config: add gerrit CQAbility verifier.

Goal is to ensure that unreviewed and untrusted code isn't sent through
CQ to try bots, by accident or through malicious intent.

R=rmistry@google.com
BUG=chromium:692613
NOTRY=True

Change-Id: I750be91895f5b77229b8f4a22216f00eaa75f7a0
Reviewed-on: https://skia-review.googlesource.com/8620
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>

7 years agoSkJumper: start on asm
Mike Klein [Fri, 17 Feb 2017 14:41:09 +0000 (09:41 -0500)]
SkJumper: start on asm

Will follow up with Linux, then Android aarch64 and armv7, then iOS, then Windows.

I took some opportunities to refactor.

CQ_INCLUDE_trybots=skia.primary:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug,Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug

Change-Id: Ifcf1edabdfe5df0a91bd089f09523aba95cdf5ef
Reviewed-on: https://skia-review.googlesource.com/8611
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoAdd a workaround for platforms with broken geo shader invocations
csmartdalton [Wed, 15 Feb 2017 17:41:27 +0000 (10:41 -0700)]
Add a workaround for platforms with broken geo shader invocations

BUG=skia:

Change-Id: I9105b65b522d9ffac5a90ca7126bfd4ae88f8069
Reviewed-on: https://skia-review.googlesource.com/8422
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoRevert "Replace SkSpecialImage::makeTightSubset with asImage"
Robert Phillips [Fri, 17 Feb 2017 13:28:47 +0000 (13:28 +0000)]
Revert "Replace SkSpecialImage::makeTightSubset with asImage"

This reverts commit 5df6db15dc04ea7f8c8fa7a7b58ecb881d7a70fe.

Reason for revert: Possibly blocking Chrome DEPS roll

Original change's description:
> Replace SkSpecialImage::makeTightSubset with asImage
>
> This should allow the relanding of:
>
> https://skia-review.googlesource.com/c/8450/ (Remove asTextureRef from SkSpecialImage & update effects accordingly (take 2))
>
> Change-Id: I517af11036e3f44a280bbe6b9275f6c38f4a86a4
> Reviewed-on: https://skia-review.googlesource.com/8498
> 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: Ib5bebda78b2323e65a73504a61af918872ad231f
Reviewed-on: https://skia-review.googlesource.com/8607
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoRevert "Take missed opportunity: memset for A8."
Mike Klein [Fri, 17 Feb 2017 12:48:29 +0000 (12:48 +0000)]
Revert "Take missed opportunity: memset for A8."

This reverts commit 9cee33e631679fc8195e7892b5aa5fdffb0b568e.

Reason for revert: Chrome roll?

Original change's description:
> Take missed opportunity: memset for A8.
>
> Just recently noticed we weren't doing this.
> It seems to be triggering all the time.
>
> Draws the same of course.
>
> Change-Id: Ie3d869a05194a5d52d635643eba1c96c8a21ce67
> Reviewed-on: https://skia-review.googlesource.com/8471
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

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

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

7 years agoFix drawVertices() texture mapping in the presence of a local matrix
Florin Malita [Fri, 17 Feb 2017 03:12:41 +0000 (22:12 -0500)]
Fix drawVertices() texture mapping in the presence of a local matrix

Change-Id: I6379f2e7c030d7d1e0fcb2bd6ecc7d81c8a4eec5
Reviewed-on: https://skia-review.googlesource.com/8502
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoCheck for GL_EXT_geometry_shader on ES
csmartdalton [Thu, 16 Feb 2017 04:43:20 +0000 (21:43 -0700)]
Check for GL_EXT_geometry_shader on ES

BUG=skia:

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

7 years agoGrTessellator (AA): Performance tweaks and cleanup.
Stephen White [Fri, 17 Feb 2017 00:00:39 +0000 (19:00 -0500)]
GrTessellator (AA): Performance tweaks and cleanup.

The SkArenaAlloc destructor was showing up as hot in profiling,
especially on Linux.  The reason is that it was being used
incorrectly: the size estimate was being used as the chunk size. It
turns out that the best performance seems to be achieved with no
initial allocations and a fixed chunk size of 16K, as the CPU path
renderer does.

Also remove some unused code.

(This is a partial re-land of https://skia-review.googlesource.com/c/8560/)

TBR=bsalomon@google.com

Change-Id: I277eb1a6e5718a221974cd694c8a7e481e432ca6
Reviewed-on: https://skia-review.googlesource.com/8561
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>

7 years agoRevert "GrTessellator (AA): Performance tweaks and cleanup."
Ben Wagner [Thu, 16 Feb 2017 22:28:02 +0000 (22:28 +0000)]
Revert "GrTessellator (AA): Performance tweaks and cleanup."

This reverts commit e595bbfba6e7dcdda0d7d700343e9d814a406771.

Reason for revert: Breaking roll into Chromium.

virtual/gpu/fast/canvas/canvas-arc-circumference-fill.html
virtual/gpu/fast/canvas/canvas-ellipse-circumference-fill.html

https://build.chromium.org/p/tryserver.blink/builders/linux_trusty_blink_rel/builds/5170

https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/5170/layout-test-results/results.html

Original change's description:
> GrTessellator (AA): Performance tweaks and cleanup.
>
> The SkArenaAlloc destructor was showing up as hot in profiling,
> especially on Linux.  The reason is that it was being used
> incorrectly: the size estimate was being used as the chunk size. It
> turns out that the best performance seems to be achieved with no
> initial allocations and a fixed chunk size of 16K, as the CPU path
> renderer does.
>
> Also, allocate the bisectors used for edge inversions on the
> stack, not the heap. And remove some unused code.
>
> BUG=skia:
>
> Change-Id: I754531c753c9e602713bf2c8bb5a0eaf174bb962
> Reviewed-on: https://skia-review.googlesource.com/8560
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Stephen White <senorblanco@chromium.org>
>

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

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

7 years agoReplace SkSpecialImage::makeTightSubset with asImage
Robert Phillips [Thu, 16 Feb 2017 18:39:44 +0000 (13:39 -0500)]
Replace SkSpecialImage::makeTightSubset with asImage

This should allow the relanding of:

https://skia-review.googlesource.com/c/8450/ (Remove asTextureRef from SkSpecialImage & update effects accordingly (take 2))

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

7 years agoLet DFPathRenderer accept smaller paths.
Jim Van Verth [Thu, 16 Feb 2017 20:21:27 +0000 (15:21 -0500)]
Let DFPathRenderer accept smaller paths.

BUG=chromium:682918

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

7 years agoReplace use of SkBitmap::eraseRGB with eraseColor.
Ben Wagner [Thu, 16 Feb 2017 18:59:09 +0000 (13:59 -0500)]
Replace use of SkBitmap::eraseRGB with eraseColor.

SkBitmap::eraseRGB is marked as deprecated. After this CL the code
should have the exact same behavior as previously, but without calling
the deprecated function. The presence of this deprecated call is
causing extra warnings in the iOS build.

Change-Id: I0770ca0a7e9884e7122f431a9ed2d3fdb2bbd6f8
Reviewed-on: https://skia-review.googlesource.com/8581
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoFixed a couple of spots where sksl didn't have proper array support.
Ethan Nicholas [Thu, 16 Feb 2017 19:49:57 +0000 (14:49 -0500)]
Fixed a couple of spots where sksl didn't have proper array support.

vec2 x[3] worked, but vec2[3] x didn't. Interface blocks also did
not work with array sizes.

BUG=skia:

Change-Id: I45b424891db46804f1e3c1f4793470b7b501a6de
Reviewed-on: https://skia-review.googlesource.com/8523
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agoRemove third_party/ktx from Skia.
Herb Derby [Fri, 10 Feb 2017 16:15:17 +0000 (11:15 -0500)]
Remove third_party/ktx from Skia.

Change-Id: I3a1f68b0528f8789af5ccc0704b0a68fe14f52d3
Reviewed-on: https://skia-review.googlesource.com/8319
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoadd device-clipping to gpudevice
Mike Reed [Thu, 16 Feb 2017 16:04:52 +0000 (11:04 -0500)]
add device-clipping to gpudevice

BUG=skia:

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

7 years agoGrTessellator (AA): Performance tweaks and cleanup.
Stephen White [Thu, 16 Feb 2017 16:27:01 +0000 (11:27 -0500)]
GrTessellator (AA): Performance tweaks and cleanup.

The SkArenaAlloc destructor was showing up as hot in profiling,
especially on Linux.  The reason is that it was being used
incorrectly: the size estimate was being used as the chunk size. It
turns out that the best performance seems to be achieved with no
initial allocations and a fixed chunk size of 16K, as the CPU path
renderer does.

Also, allocate the bisectors used for edge inversions on the
stack, not the heap. And remove some unused code.

BUG=skia:

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

7 years agoremove code for TextDecorations
Mike Reed [Thu, 16 Feb 2017 17:45:51 +0000 (12:45 -0500)]
remove code for TextDecorations

BUG=skia:6250

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

7 years agoSkPDF/font subsetting: Use new version of SfntlyWrapper::SubsetFont
Hal Canary [Thu, 16 Feb 2017 15:33:49 +0000 (10:33 -0500)]
SkPDF/font subsetting: Use new version of SfntlyWrapper::SubsetFont

Change-Id: Ib4bddcedb09b50556e8e1f02926c443870f46a09
Reviewed-on: https://skia-review.googlesource.com/8544
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoSkJumper: everyone gets a start_pipeline().
Mike Klein [Thu, 16 Feb 2017 15:17:00 +0000 (10:17 -0500)]
SkJumper: everyone gets a start_pipeline().

Windows needs this as a shim to switch to the System V ABI and back.

Other platforms need it too, if only to make UBSAN happy about calling
functions through the correct function pointers.

One day maybe we can move the looping logic inside start_pipeline?

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

7 years agoDisable DFPathRenderTest for now.
Jim Van Verth [Thu, 16 Feb 2017 16:44:52 +0000 (11:44 -0500)]
Disable DFPathRenderTest for now.

It's unclear what this test should be -- or even if it's valid any more.

Change-Id: I62b5d99ad19c9b2813ef5a3c34c9b11991c01c5f
Reviewed-on: https://skia-review.googlesource.com/8494
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoTake missed opportunity: memset for A8.
Mike Klein [Thu, 16 Feb 2017 12:43:40 +0000 (07:43 -0500)]
Take missed opportunity: memset for A8.

Just recently noticed we weren't doing this.
It seems to be triggering all the time.

Draws the same of course.

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

7 years agoSkJumper: fma() -> mad()
Mike Klein [Thu, 16 Feb 2017 15:21:29 +0000 (10:21 -0500)]
SkJumper: fma() -> mad()

mad (Multiply-anD-Add) conveys the desired behavior better than fma...
we don't particularly care about the fusedness of the mad, only that
we're doing the fastest multiply-add available.

This also avoids conflicts with fma() that may be defined in <math.h>.

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

7 years agoFix DistanceFieldPathRenderer assert.
Jim Van Verth [Thu, 16 Feb 2017 15:01:46 +0000 (10:01 -0500)]
Fix DistanceFieldPathRenderer assert.

If there's a reflection in the matrix, the scales
could be negative.

BUG=chromium:682918

Change-Id: Ifde42c3bc8b1f2938009b47d3a8380cf871448e9
Reviewed-on: https://skia-review.googlesource.com/8541
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoFiddle: Remove extraneous newline from SkDebugf output.
Joe Gregorio [Thu, 16 Feb 2017 14:30:58 +0000 (09:30 -0500)]
Fiddle: Remove extraneous newline from SkDebugf output.

BUG=skia:6247

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

7 years agoSkJumper: make some room for wider instructions.
Mike Klein [Thu, 16 Feb 2017 14:00:15 +0000 (09:00 -0500)]
SkJumper: make some room for wider instructions.

No real change here.

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

7 years agoremove unneeded android flags
Mike Reed [Thu, 16 Feb 2017 13:50:18 +0000 (08:50 -0500)]
remove unneeded android flags

BUG=skia:

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

7 years agoUse non-linear color spaces for Android decode outputs
Matt Sarett [Thu, 16 Feb 2017 13:14:27 +0000 (08:14 -0500)]
Use non-linear color spaces for Android decode outputs

BUG=skia:

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

7 years agoRevert "Turn on SkJumper except on Windows."
Mike Klein [Thu, 16 Feb 2017 14:02:50 +0000 (14:02 +0000)]
Revert "Turn on SkJumper except on Windows."

This reverts commit 957cf4594964c8f30e623d8c1b28ff63bef4ab33.

Reason for revert: crashes

Original change's description:
> Turn on SkJumper except on Windows.
>
> ...only for our local testing.  No Skia users should be affected yet.
>
> Change-Id: If1c46efe418458f747aafd6be8e2ae799c74b1c4
> Reviewed-on: https://skia-review.googlesource.com/8470
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

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

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

7 years agoUpdate libwebp to 0.6.0
scroggo [Thu, 16 Feb 2017 13:57:41 +0000 (05:57 -0800)]
Update libwebp to 0.6.0

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

"this version 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

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm-Debug-iOS

Review-Url: https://codereview.chromium.org/2689283007

7 years agoremove unneeded flags
Mike Reed [Thu, 16 Feb 2017 13:18:13 +0000 (08:18 -0500)]
remove unneeded flags

BUG=skia:

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

7 years agoTurn on SkJumper except on Windows.
Mike Klein [Thu, 16 Feb 2017 12:31:35 +0000 (07:31 -0500)]
Turn on SkJumper except on Windows.

...only for our local testing.  No Skia users should be affected yet.

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

7 years agoUse SDF path miplevels based on the original path's size
Jim Van Verth [Wed, 15 Feb 2017 20:46:52 +0000 (15:46 -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.

Was: https://skia-review.googlesource.com/c/8328/

BUG=chromium:682918, skia:6238

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

7 years agoFlush to zero when loading f16 with sse2/sse4.1.
Mike Klein [Thu, 16 Feb 2017 11:21:54 +0000 (06:21 -0500)]
Flush to zero when loading f16 with sse2/sse4.1.

The multiply by 0x77800000 is quite slow when the input is denormalized.
We don't mind flushing those values (in the range of 1e-5) to zero.

Implement portable load_f16() / store_f16() too.

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

7 years agoSimplify more: remove SkRasterPipeline::compile().
Mike Klein [Thu, 16 Feb 2017 11:51:48 +0000 (06:51 -0500)]
Simplify more: remove SkRasterPipeline::compile().

It's easier to work on SkJumper if everything funnels through run().

I don't anticipate huge benefit from compile() without JITing,
but it's something we can always put back if we find a need.

Change-Id: Id5256fd21495e8195cad1924dbad81856416d913
Reviewed-on: https://skia-review.googlesource.com/8468
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoImplement SkHighContrastFilter
Dominic Mazzoni [Tue, 14 Feb 2017 19:15:31 +0000 (11:15 -0800)]
Implement SkHighContrastFilter

This is a color filter to apply several contrast adjustments for users
with low vision, including inverting the colors (in either RGB or HSL
space), applying gamma correction, converting to grayscale, and increasing
the contrast.

BUG=skia:6235

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

Change-Id: Icb8f3e290932d8bcd9387fb1f39dd20767e15cf6
Reviewed-on: https://skia-review.googlesource.com/7460
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoSkJumper
Mike Klein [Wed, 15 Feb 2017 18:31:12 +0000 (13:31 -0500)]
SkJumper

Change-Id: If9f73e712e429564fef58ccb838c212ec8d2e68c
Reviewed-on: https://skia-review.googlesource.com/8525
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoWork around Mac x- and cap-height calculation.
bungeman [Wed, 15 Feb 2017 22:49:12 +0000 (17:49 -0500)]
Work around Mac x- and cap-height calculation.

With at least some system fonts and apparently all fonts from data the
x-height and cap-height on at least 10.12.3 are always 0.6666 and .8888
of the ascent, respectively. The values from the 'OS/2' table appear
to be read, but then the values are overwritten. Work around this by
using the values from the 'OS/2' table when available.

This also removes fFUnitMatrix as it is no longer used.

BUG=skia:6203

Change-Id: Ib79d9d32bca77797de043499c854c35e5ef3aa4b
Reviewed-on: https://skia-review.googlesource.com/8452
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoUse non-linear blending flag in raster pipeline blitter
Matt Sarett [Wed, 15 Feb 2017 20:54:35 +0000 (15:54 -0500)]
Use non-linear blending flag in raster pipeline blitter

BUG=skia:

Change-Id: I00b52e6de3b46b7d26c1df2aa63c521b6c7ece2d
Reviewed-on: https://skia-review.googlesource.com/8526
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoClean up SkSplicer.
Mike Klein [Wed, 15 Feb 2017 20:51:47 +0000 (15:51 -0500)]
Clean up SkSplicer.

SkJumper's looking promising enough that I want this further out of my face.

Change-Id: I6dbe71aeabe32f7f4258ba157460e6985733b0ce
Reviewed-on: https://skia-review.googlesource.com/8528
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoUpdate intel linux vulkan driver
Greg Daniel [Wed, 15 Feb 2017 19:41:48 +0000 (14:41 -0500)]
Update intel linux vulkan driver

BUG=skia:

Change-Id: I2bb32aa02719c6cb1f3fccecfa5fbec7af74eb90
Reviewed-on: https://skia-review.googlesource.com/8503
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoreturn and take SkImageGenerator as unique_ptr
Mike Reed [Wed, 15 Feb 2017 20:14:16 +0000 (15:14 -0500)]
return and take SkImageGenerator as unique_ptr

BUG=skia:

Change-Id: I4bc11042dd1dbf1eabd40af206027bc65acc3186
Reviewed-on: https://skia-review.googlesource.com/8444
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoCheck that coverage FPs are compatible with alpha as coverage
Brian Salomon [Wed, 15 Feb 2017 19:12:26 +0000 (14:12 -0500)]
Check that coverage FPs are compatible with alpha as coverage

Change-Id: Ic3b6a02248d571e82f6729827c199d358fb75114
Reviewed-on: https://skia-review.googlesource.com/8508
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoTighten up GrSurfaceProxy typing
Robert Phillips [Wed, 15 Feb 2017 19:19:01 +0000 (14:19 -0500)]
Tighten up GrSurfaceProxy typing

This may reduce the number of "why not GrTextureProxy" issues

Change-Id: I9e0e5042f5801ba9a933b697a380cb0cb54b4522
Reviewed-on: https://skia-review.googlesource.com/8510
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoMove documentation to use the embedded fiddle elements.
Joe Gregorio [Wed, 15 Feb 2017 17:54:08 +0000 (12:54 -0500)]
Move documentation to use the embedded fiddle elements.

Now code and images will always be in sync, and
users can edit and run the fiddles that are inline with
the docs.

Previews:
  https://skia.org/user/api/skcanvas?cl=8507
  https://skia.org/user/api/skpaint?cl=8507

BUG=skia:

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

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

7 years agoimproved performance of parsing SkSLLayout flags
Ethan Nicholas [Wed, 15 Feb 2017 17:33:30 +0000 (12:33 -0500)]
improved performance of parsing SkSLLayout flags

BUG=skia:

Change-Id: Ib0e1393fb44f5f934ad2f88fed638ef7a0fa7393
Reviewed-on: https://skia-review.googlesource.com/8463
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agofiddle: use sstream for text, code cleanup
Hal Canary [Wed, 15 Feb 2017 15:20:30 +0000 (10:20 -0500)]
fiddle: use sstream for text, code cleanup

Change-Id: I57cbb33688f1cd97a2172160d06e4bdd468880d1
Reviewed-on: https://skia-review.googlesource.com/8489
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoRevert "Revert "make SkClipStack.h private (in src)""
Mike Reed [Wed, 15 Feb 2017 19:15:55 +0000 (19:15 +0000)]
Revert "Revert "make SkClipStack.h private (in src)""

This reverts commit 1c8e82b72bfeb1a02297688cf082c365b62705f7.

Reason for revert: previous reason to revert fixed. relanding.

Original change's description:
> Revert "make SkClipStack.h private (in src)"
>
> This reverts commit 3efca0a2a8fc412a318199fa386c1375b55ee81e.
>
> Reason for revert: update caller in GraphicsContext.cpp
>
> Original change's description:
> > make SkClipStack.h private (in src)
> >
> > BUG=skia:
> >
> > Change-Id: I05f1140fe483f4a92093cb9783c6e9f067420d30
> > Reviewed-on: https://skia-review.googlesource.com/8481
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Commit-Queue: Mike Reed <reed@google.com>
> >
>
> TBR=fmalita@chromium.org,reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: Iff1138d72ff2d1187d522487fe76ea293f706f60
> Reviewed-on: https://skia-review.googlesource.com/8501
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

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

Change-Id: If7e54653c00a0c57ffa60b0c9f40dd0ffad2fe42
Reviewed-on: https://skia-review.googlesource.com/8522
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoAdd GrMakeCachedBitmapProxy
Robert Phillips [Wed, 15 Feb 2017 18:18:21 +0000 (13:18 -0500)]
Add GrMakeCachedBitmapProxy

This is split out of https://skia-review.googlesource.com/c/7889/ (Remove SkSpecialImage's GrTexture-based ctors) to allow focusing on the caching/subsetting changes.

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

7 years agoAvoid constant view inflation on viewer sample app
Chet Haase [Wed, 15 Feb 2017 01:56:34 +0000 (17:56 -0800)]
Avoid constant view inflation on viewer sample app

The previous approach re-inflated views on every frame simply because the FPS
number changed (which was passed in a JSON object and used to check whether
the old view matched the new one based on a tag on the view that was set by
the previous FPS string).

The new approach is not pretty (there's no reason to even re-populate the
views when the only thing that needs to happen is to set the appropriate
FPS info in the floating TextView), but at least this avoids the inflation
overhead of the previous approach.

BUG=skia:

Change-Id: Ide1c736c49663cfcf478653a7cdaa99c736f1783
Reviewed-on: https://skia-review.googlesource.com/8461
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Chet Haase <chet@google.com>

7 years agoDisable SkSplicer.
Mike Klein [Wed, 15 Feb 2017 17:58:18 +0000 (12:58 -0500)]
Disable SkSplicer.

Easier to work on SkJumper with SkSplicer out of my hair.

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

7 years agoGrTessellator (AA): null GrGeometryProcessor crash fix.
Stephen White [Wed, 15 Feb 2017 16:45:16 +0000 (11:45 -0500)]
GrTessellator (AA): null GrGeometryProcessor crash fix.

Add a null-check on geometry processor creation.

Add a test which exercises it: AA tessellator, with a non-invertible
matrix and a fragment processor which needs local coords (e.g., linear
gradient).

BUG=691902

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

7 years agoRevert "make SkClipStack.h private (in src)"
Mike Reed [Wed, 15 Feb 2017 17:27:54 +0000 (17:27 +0000)]
Revert "make SkClipStack.h private (in src)"

This reverts commit 3efca0a2a8fc412a318199fa386c1375b55ee81e.

Reason for revert: update caller in GraphicsContext.cpp

Original change's description:
> make SkClipStack.h private (in src)
>
> BUG=skia:
>
> Change-Id: I05f1140fe483f4a92093cb9783c6e9f067420d30
> Reviewed-on: https://skia-review.googlesource.com/8481
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

Change-Id: Iff1138d72ff2d1187d522487fe76ea293f706f60
Reviewed-on: https://skia-review.googlesource.com/8501
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoClarify when tweak alpha for coverage optimizaton can occur.
Brian Salomon [Wed, 15 Feb 2017 15:22:23 +0000 (10:22 -0500)]
Clarify when tweak alpha for coverage optimizaton can occur.

Also refer to it directly rather than using the term "modulate"

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

7 years agomuch better idea
Mike Klein [Tue, 14 Feb 2017 21:42:11 +0000 (16:42 -0500)]
much better idea

Instead of trying to genereate snippets of code that an work when
splicing and when interpreting, let's just make one snippet for each.
And then, let's add one more portable single float version!

Why build one when you can have three at thrice the price?

This doesn't make these new strategies active, but does start moving the
code in build_stages.py and SkSplicer_stages.cpp towards that.

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

7 years agomake SkClipStack.h private (in src)
Mike Reed [Wed, 15 Feb 2017 01:34:41 +0000 (20:34 -0500)]
make SkClipStack.h private (in src)

BUG=skia:

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

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>