platform/upstream/libSkiaSharp.git
8 years agoRevert of Add config options to run different GPU APIs to dm and nanobench (patchset...
rmistry [Tue, 22 Dec 2015 18:22:26 +0000 (10:22 -0800)]
Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #21 id:400001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
The Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug builder fails after this CL.

Links to specific builds:
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1689
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1690
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1691

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config: type: string default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
>          api type: string default: native.
>              Select graphics API to use with gpu backend.
>              Options:
>          native Use platform default OpenGL or OpenGL ES backend.
>          gl     Use OpenGL.
>          gles   Use OpenGL ES.
>          debug  Use debug OpenGL.
>          null   Use null OpenGL.
>          dit type: bool default: false.
>              Use device independent text.
>          nvpr type: bool default: false.
>              Use NV_path_rendering OpenGL and OpenGL ES extension.
>          samples type: int default: 0.
>              Use multisampling with N samples.
>
>         Predefined configs:
>
>          gpu       = gpu()
>          msaa4     = gpu(samples=4)
>          msaa16    = gpu(samples=16)
>          nvprmsaa4 = gpu(nvpr=true,samples=4)
>          nvprmsaa16 = gpu(nvpr=true,samples=16)
>          gpudft     = gpu(dit=true)
>          gpudebug   = gpu(api=debug)
>          gpunull    = gpu(api=null)
>          debug      = gpu(api=debug)
>          nullgpu    = gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
>
> Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

TBR=mtklein@google.com,bsalomon@google.com,joshualitt@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1548683002

8 years agorevised strokerect gm
caryclark [Tue, 22 Dec 2015 15:50:16 +0000 (07:50 -0800)]
revised strokerect gm

In service of the bug below, revise the gm to show what zero
widths draw, and what they should draw (by including rects
with fractionally tiny widths).

TBR=halcanary@google.com,reed@google.com
BUG=1294
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1548643002

Review URL: https://codereview.chromium.org/1548643002

8 years agoDocumentation: FAQ TOC
halcanary [Tue, 22 Dec 2015 15:08:12 +0000 (07:08 -0800)]
Documentation: FAQ TOC

NOTRY=true
TBR=

Review URL: https://codereview.chromium.org/1542853003

8 years agofix hair fuzz
caryclark [Tue, 22 Dec 2015 14:13:33 +0000 (06:13 -0800)]
fix hair fuzz

If the end and control points of a quad, conic, or cubic are the same,
adjust all of them when stretching the curve to account for a square
or round end cap. If all of the points are the same, move all but the
last.

Enlarge the clip check to account for the cap.

The clip bug was detected by ASAN.

R=reed@google.com, msarett@google.com
BUG=571214
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1547483003

Review URL: https://codereview.chromium.org/1547483003

8 years agomove SkParsePaint.h into views
reed [Tue, 22 Dec 2015 12:36:57 +0000 (04:36 -0800)]
move SkParsePaint.h into views

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1547653002
TBR=

Review URL: https://codereview.chromium.org/1547653002

8 years agoAdd config options to run different GPU APIs to dm and nanobench
kkinnunen [Tue, 22 Dec 2015 07:48:13 +0000 (23:48 -0800)]
Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config: type: string default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
         api type: string default: native.
             Select graphics API to use with gpu backend.
             Options:
         native Use platform default OpenGL or OpenGL ES backend.
         gl     Use OpenGL.
         gles   Use OpenGL ES.
         debug  Use debug OpenGL.
         null   Use null OpenGL.
         dit type: bool default: false.
             Use device independent text.
         nvpr type: bool default: false.
             Use NV_path_rendering OpenGL and OpenGL ES extension.
         samples type: int default: 0.
             Use multisampling with N samples.

        Predefined configs:

         gpu       = gpu()
         msaa4     = gpu(samples=4)
         msaa16    = gpu(samples=16)
         nvprmsaa4 = gpu(nvpr=true,samples=4)
         nvprmsaa16 = gpu(nvpr=true,samples=16)
         gpudft     = gpu(dit=true)
         gpudebug   = gpu(api=debug)
         gpunull    = gpu(api=null)
         debug      = gpu(api=debug)
         nullgpu    = gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

Review URL: https://codereview.chromium.org/1490113005

8 years agoremove unused SkCullPoints
reed [Tue, 22 Dec 2015 02:37:16 +0000 (18:37 -0800)]
remove unused SkCullPoints

need to remove file references from chrome before landing this
https://codereview.chromium.org/1547603002#

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541933004

TBR=scroggo

Review URL: https://codereview.chromium.org/1541933004

8 years agoFold color attachment verification bit into GrGLCaps::ConfigInfo
bsalomon [Mon, 21 Dec 2015 21:44:18 +0000 (13:44 -0800)]
Fold color attachment verification bit into GrGLCaps::ConfigInfo
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1536033003

Review URL: https://codereview.chromium.org/1536033003

8 years agoDon't ref/unref the static src-over xp
bsalomon [Mon, 21 Dec 2015 21:12:54 +0000 (13:12 -0800)]
Don't ref/unref the static src-over xp
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1540363002

bug=chromium:570301

Review URL: https://codereview.chromium.org/1540363002

8 years agohide old SaveFlags, but keep them available (for now) for Android
reed [Mon, 21 Dec 2015 21:09:44 +0000 (13:09 -0800)]
hide old SaveFlags, but keep them available (for now) for Android

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535993003

requires https://codereview.chromium.org/1537203002/# to land in chrome first (android should be safe)

Review URL: https://codereview.chromium.org/1535993003

8 years agoMove config table to GrGLCaps from GrGLGpu.
bsalomon [Mon, 21 Dec 2015 17:03:05 +0000 (09:03 -0800)]
Move config table to GrGLCaps from GrGLGpu.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535153002

Review URL: https://codereview.chromium.org/1535153002

8 years agoReland of change all factories to return their base-class (patchset #1 id:1 of https...
reed [Mon, 21 Dec 2015 16:52:45 +0000 (08:52 -0800)]
Reland of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1540203002/ )

Reason for revert:
chrome changes have landed

Original issue's description:
> Revert of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1535353002/ )
>
> Reason for revert:
> need to update some chrome/blink call-sites
>
> Original issue's description:
> > change all factories to return their base-class
> >
> > will watch DEPS roll to see if there are chrome sites needing updates
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002
> >
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2d6ba6690f8951e152d8e793191b14afd52f5506

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1533373002

8 years agofix stroked text underline / strikethrough
caryclark [Mon, 21 Dec 2015 16:35:51 +0000 (08:35 -0800)]
fix stroked text underline / strikethrough

Pass 1 to DrawRect for underline and strikethrough since it will
scale by the text size later.

R=reed@google.com
BUG=skia:971
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535793004

Review URL: https://codereview.chromium.org/1535793004

8 years agoCreate a hash table from id<-->key in SkImageFilter::CacheImpl
xidachen [Mon, 21 Dec 2015 15:29:03 +0000 (07:29 -0800)]
Create a hash table from id<-->key in SkImageFilter::CacheImpl

There is memory leak in the SkImageFilter::Cache. There are two sources
of memory leak:
1. The cache filling up quickly.
2. A slow small leak that never stops.
This CL solves the first issue, which prevents the cache filling up quickly.
This CL creates a new hash table that index the
SkImageFilter::uniqueID to an array of keys, and with the existing
key<-->Value hash table, we can have SkImageFilters proactively
purge content derived cached content when destroyed.

BUG=489543
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1514893003

Committed: https://skia.googlesource.com/skia/+/f5d1f8dcc841516d7ea63c151b13059af40ca76d

Review URL: https://codereview.chromium.org/1514893003

8 years agocheck in direct quad length measure
caryclark [Mon, 21 Dec 2015 13:32:53 +0000 (05:32 -0800)]
check in direct quad length measure

Add code so that it at minimum won't bit-rot.
Next: add tests to see if it works.

R=reed@google.com
BUG=skia:1036
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541523002

Review URL: https://codereview.chromium.org/1541523002

8 years agoEnable NVPR with command buffer
kkinnunen [Mon, 21 Dec 2015 12:05:53 +0000 (04:05 -0800)]
Enable NVPR with command buffer

Set Chromium command-line flag --enable-gl-path-rendering
before creating command buffer context. This is needed for
the command buffer to expose NVPR at the moment.

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1538863002

Review URL: https://codereview.chromium.org/1538863002

8 years agoRevert of change all factories to return their base-class (patchset #1 id:1 of https...
reed [Mon, 21 Dec 2015 04:08:42 +0000 (20:08 -0800)]
Revert of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1535353002/ )

Reason for revert:
need to update some chrome/blink call-sites

Original issue's description:
> change all factories to return their base-class
>
> will watch DEPS roll to see if there are chrome sites needing updates
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1540203002

8 years agochange all factories to return their base-class
reed [Mon, 21 Dec 2015 03:38:20 +0000 (19:38 -0800)]
change all factories to return their base-class

will watch DEPS roll to see if there are chrome sites needing updates

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002

TBR=

Review URL: https://codereview.chromium.org/1535353002

8 years agoUpdate SKP version
update-skps [Sun, 20 Dec 2015 08:35:33 +0000 (00:35 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535373002

Review URL: https://codereview.chromium.org/1535373002

8 years agoremove SK_SUPPORT_LEGACY_SAVELAYERPARAMS code
reed [Sat, 19 Dec 2015 05:26:56 +0000 (21:26 -0800)]
remove SK_SUPPORT_LEGACY_SAVELAYERPARAMS code

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1537193002

TBR=

Review URL: https://codereview.chromium.org/1537193002

8 years agoRemove EGL_config from vb bot
joshualitt [Fri, 18 Dec 2015 18:19:02 +0000 (10:19 -0800)]
Remove EGL_config from vb bot

TBR=borenet@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1540583003

Review URL: https://codereview.chromium.org/1540583003

8 years agoRejigger distance field path rect calcs to avoid underflow
jvanverth [Fri, 18 Dec 2015 18:07:52 +0000 (10:07 -0800)]
Rejigger distance field path rect calcs to avoid underflow

BUG=skia:4716
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535173002

Review URL: https://codereview.chromium.org/1535173002

8 years agoAdd Drawing Manager guards against re-entrant flushes
joshualitt [Fri, 18 Dec 2015 17:59:46 +0000 (09:59 -0800)]
Add Drawing Manager guards against re-entrant flushes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1538013002

Review URL: https://codereview.chromium.org/1538013002

8 years agoFix UB function problems for shaders and mask.
herb [Fri, 18 Dec 2015 17:52:15 +0000 (09:52 -0800)]
Fix UB function problems for shaders and mask.

BUG=skia:4634
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530743002

Committed: https://skia.googlesource.com/skia/+/dafd044e4aea529f88d899247678d4549f776388

Review URL: https://codereview.chromium.org/1530743002

8 years agoRevert of Repeating SkBitmapProcState rounding bias (patchset #6 id:100001 of https...
fmalita [Fri, 18 Dec 2015 17:36:18 +0000 (09:36 -0800)]
Revert of Repeating SkBitmapProcState rounding bias (patchset #6 id:100001 of https://codereview.chromium.org/1529833003/ )

Reason for revert:
We need a SkFractionalInt auto mapper flavor, otherwise we're losing precision for some procs => seaming artifacs

(https://gold.skia.org/diff?test=giantbitmap_mirror_point_rotate&left=0dd7a412fce81586e6a142e039ec2de9&top=a706d4bb2b8e994b936445b87115b07e)

Original issue's description:
> Repeating SkBitmapProcState rounding bias
>
> Observe the bias in repeat matrix procs also.
>
> Introduce a utility class to handle device space -> bitmap space
> mapping.
>
> BUG=skia:4680,skia:4649
> R=reed@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529833003
>
> Committed: https://skia.googlesource.com/skia/+/5ae7fdcc3d7712da3193c39a751e88b092aa82db

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4680,skia:4649

Review URL: https://codereview.chromium.org/1531423003

8 years agoMove SkAndroidSDKCanvas to tools and ensure that it is built on all Android builds
djsollen [Fri, 18 Dec 2015 17:34:08 +0000 (09:34 -0800)]
Move SkAndroidSDKCanvas to tools and ensure that it is built on all Android builds
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1536013003

Review URL: https://codereview.chromium.org/1536013003

8 years agoRevert of Fix UB function problems for shaders and mask. (patchset #3 id:40001 of...
herb [Fri, 18 Dec 2015 16:50:08 +0000 (08:50 -0800)]
Revert of Fix UB function problems for shaders and mask. (patchset #3 id:40001 of https://codereview.chromium.org/1530743002/ )

Reason for revert:
Breaks man gold tests.

Original issue's description:
> Fix UB function problems for shaders and mask.
>
> BUG=skia:4634
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530743002
>
> Committed: https://skia.googlesource.com/skia/+/dafd044e4aea529f88d899247678d4549f776388

TBR=mtklein@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4634

Review URL: https://codereview.chromium.org/1534243002

8 years agoAdd visualbench as valid target to Makefile
joshualitt [Fri, 18 Dec 2015 16:05:06 +0000 (08:05 -0800)]
Add visualbench as valid target to Makefile

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530233005

Committed: https://skia.googlesource.com/skia/+/13221b83663778a2f5cbd90e51e253268755877e

Review URL: https://codereview.chromium.org/1530233005

8 years agoRepeating SkBitmapProcState rounding bias
fmalita [Fri, 18 Dec 2015 15:59:47 +0000 (07:59 -0800)]
Repeating SkBitmapProcState rounding bias

Observe the bias in repeat matrix procs also.

Introduce a utility class to handle device space -> bitmap space
mapping.

BUG=skia:4680,skia:4649
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529833003

Review URL: https://codereview.chromium.org/1529833003

8 years agoRemove GrGLGpu::configToGLFormats
bsalomon [Fri, 18 Dec 2015 15:59:41 +0000 (07:59 -0800)]
Remove GrGLGpu::configToGLFormats
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1533903004

Review URL: https://codereview.chromium.org/1533903004

8 years agoupdate androidsdk to new savelayer signature
reed [Fri, 18 Dec 2015 15:38:26 +0000 (07:38 -0800)]
update androidsdk to new savelayer signature

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1540583002

NOTRY=True
NOTREECHECKS=True
TBR=

Review URL: https://codereview.chromium.org/1540583002

8 years agoRevert of Add visualbench as valid target to Makefile (patchset #2 id:20001 of https...
joshualitt [Fri, 18 Dec 2015 15:29:39 +0000 (07:29 -0800)]
Revert of Add visualbench as valid target to Makefile (patchset #2 id:20001 of https://codereview.chromium.org/1530233005/ )

Reason for revert:
might be breaking cmakebot

Original issue's description:
> Add visualbench as valid target to Makefile
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530233005
>
> Committed: https://skia.googlesource.com/skia/+/13221b83663778a2f5cbd90e51e253268755877e

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

Review URL: https://codereview.chromium.org/1537903003

8 years agoReland of Add test for previously unflattenables (patchset #1 id:1 of https://coderev...
scroggo [Fri, 18 Dec 2015 15:14:24 +0000 (07:14 -0800)]
Reland of Add test for previously unflattenables (patchset #1 id:1 of https://codereview.chromium.org/1532753002/ )

Reason for revert:
The test should now be blacklisted.

Original issue's description:
> Revert of Add test for previously unflattenables (patchset #1 id:1 of https://codereview.chromium.org/1514373003/ )
>
> Reason for revert:
> Speculative fix for skbug.com/4709
>
> Original issue's description:
> > Add test for previously unflattenables
> >
> > BUG=skia:4613
> >
> > Committed: https://skia.googlesource.com/skia/+/061aaa79f7d8a2e93962e8296abaae13f0a7a715
>
> TBR=halcanary@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4613
>
> Committed: https://skia.googlesource.com/skia/+/c8f969309cafebeb16ad057f766b61bdc406a8b8

TBR=halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4613

Review URL: https://codereview.chromium.org/1535143002

8 years agoAdd visualbench as valid target to Makefile
joshualitt [Fri, 18 Dec 2015 15:09:40 +0000 (07:09 -0800)]
Add visualbench as valid target to Makefile

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530233005

Review URL: https://codereview.chromium.org/1530233005

8 years agochange signature for virtual related to saveLayer, passing SaveLayerRec
reed [Fri, 18 Dec 2015 15:09:18 +0000 (07:09 -0800)]
change signature for virtual related to saveLayer, passing SaveLayerRec

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1533953002

NOTREECHECKS=True

Review URL: https://codereview.chromium.org/1533953002

8 years agofix large dashed paths
caryclark [Fri, 18 Dec 2015 15:03:13 +0000 (07:03 -0800)]
fix large dashed paths

Paths with lots of points exceed the 32767 point index.
Make the index larger, add a test, and allow the
t value to use the extra bits.

R=reed@google.com,fmalita@chromium.org
BUG=skia:3501
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534223002

Review URL: https://codereview.chromium.org/1534223002

8 years agoRemove SkImageMinRowBytes
scroggo [Fri, 18 Dec 2015 14:56:01 +0000 (06:56 -0800)]
Remove SkImageMinRowBytes

As stated in the comments in crrev.com/1379193002, this method name is
misleading. It returns a larger number than the minimum rowbytes - it
increases to the next four-byte alignment. This has the effect that the
one place that calls it does not support 565 (which is not already
four-byte aligned), but does not serve any other purpose. Remove it and
the only call-site.

BUG=skia:4396
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1528383004

Review URL: https://codereview.chromium.org/1528383004

8 years agoBlacklist GLPrograms on Angle Debug bot
joshualitt [Fri, 18 Dec 2015 14:50:59 +0000 (06:50 -0800)]
Blacklist GLPrograms on Angle Debug bot

BUG=skia:4717
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1527323003

Review URL: https://codereview.chromium.org/1527323003

8 years agoUpdate dm_flags.json to match dm_flags.py
scroggo [Fri, 18 Dec 2015 14:50:53 +0000 (06:50 -0800)]
Update dm_flags.json to match dm_flags.py

dm_flags.json verifies that the changes to dm_flags.py made sense. It
was not updated in crrev.com/1537793002, making me confused why my
.py changes seemed to affect WritePixelsTest in .json.

TBR=jvanverth@google.com
BUG=skia:2733
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534043003

Review URL: https://codereview.chromium.org/1534043003

8 years agoRevert of Add config options to run different GPU APIs to dm and nanobench (patchset...
joshualitt [Fri, 18 Dec 2015 14:02:18 +0000 (06:02 -0800)]
Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #18 id:340001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
This CL changed 1200 images on gold, when I wouldn't expect any diffs from the description.

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config: type: string default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
>          api type: string default: native.
>              Select graphics API to use with gpu backend.
>              Options:
>          native Use platform default OpenGL or OpenGL ES backend.
>          gl     Use OpenGL.
>          gles   Use OpenGL ES.
>          debug  Use debug OpenGL.
>          null   Use null OpenGL.
>          dit type: bool default: false.
>              Use device independent text.
>          nvpr type: bool default: false.
>              Use NV_path_rendering OpenGL and OpenGL ES extension.
>          samples type: int default: 0.
>              Use multisampling with N samples.
>
>         Predefined configs:
>
>          gpu       = gpu()
>          msaa4     = gpu(samples=4)
>          msaa16    = gpu(samples=16)
>          nvprmsaa4 = gpu(nvpr=true,samples=4)
>          nvprmsaa16 = gpu(nvpr=true,samples=16)
>          gpudft     = gpu(dit=true)
>          gpudebug   = gpu(api=debug)
>          gpunull    = gpu(api=null)
>          debug      = gpu(api=debug)
>          nullgpu    = gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

TBR=mtklein@google.com,bsalomon@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1536963002

8 years agoRevert of Create a hash table from id<-->key in SkImageFilter::CacheImpl (patchset...
reed [Fri, 18 Dec 2015 13:23:09 +0000 (05:23 -0800)]
Revert of Create a hash table from id<-->key in SkImageFilter::CacheImpl (patchset #7 id:120001 of https://codereview.chromium.org/1514893003/ )

Reason for revert:
speculative revert to try to unblock DEPS roll

https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/94665

Original issue's description:
> Create a hash table from id<-->key in SkImageFilter::CacheImpl
>
> There is memory leak in the SkImageFilter::Cache. There are two sources
> of memory leak:
> 1. The cache filling up quickly.
> 2. A slow small leak that never stops.
> This CL solves the first issue, which prevents the cache filling up quickly.
> This CL creates a new hash table that index the
> SkImageFilter::uniqueID to an array of keys, and with the existing
> key<-->Value hash table, we can have SkImageFilters proactively
> purge content derived cached content when destroyed.
>
> BUG=489543
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1514893003
>
> Committed: https://skia.googlesource.com/skia/+/f5d1f8dcc841516d7ea63c151b13059af40ca76d

TBR=mtklein@google.com,junov@chromium.org,xidachen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=489543

Review URL: https://codereview.chromium.org/1537923002

8 years agofix bugs in path contains
caryclark [Fri, 18 Dec 2015 12:35:24 +0000 (04:35 -0800)]
fix bugs in path contains

Pull out the logic to check to see if the point is on the edge
so all curve types can share.

Reorder cubic to be like conic and quad so that mixed types
consider the curves consistently.

Don't count on curve points twice if they are on the end
and compute a zero cross product.

Remove logic that checks, when there are no roots, if the
point is closer to the top or the bottom (it's always the top).

Initialize the iterator correctly when it is accessing
the list of on point curves.

Use 'multiply' instead of 'subtract' to see if the vectors
are pointing in opposite directions.

Add more test cases.

R=reed@google.com,fs@opera.com
BUG=skia:4265
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1532003004

Review URL: https://codereview.chromium.org/1532003004

8 years agoAdd config options to run different GPU APIs to dm and nanobench
kkinnunen [Fri, 18 Dec 2015 11:27:32 +0000 (03:27 -0800)]
Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config: type: string default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
         api type: string default: native.
             Select graphics API to use with gpu backend.
             Options:
         native Use platform default OpenGL or OpenGL ES backend.
         gl     Use OpenGL.
         gles   Use OpenGL ES.
         debug  Use debug OpenGL.
         null   Use null OpenGL.
         dit type: bool default: false.
             Use device independent text.
         nvpr type: bool default: false.
             Use NV_path_rendering OpenGL and OpenGL ES extension.
         samples type: int default: 0.
             Use multisampling with N samples.

        Predefined configs:

         gpu       = gpu()
         msaa4     = gpu(samples=4)
         msaa16    = gpu(samples=16)
         nvprmsaa4 = gpu(nvpr=true,samples=4)
         nvprmsaa16 = gpu(nvpr=true,samples=16)
         gpudft     = gpu(dit=true)
         gpudebug   = gpu(api=debug)
         gpunull    = gpu(api=null)
         debug      = gpu(api=debug)
         nullgpu    = gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Review URL: https://codereview.chromium.org/1490113005

8 years agoRemove some unneeded calls to GrGLGpu::configToGLFormats
bsalomon [Fri, 18 Dec 2015 02:39:46 +0000 (18:39 -0800)]
Remove some unneeded calls to GrGLGpu::configToGLFormats
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530313005

Review URL: https://codereview.chromium.org/1530313005

8 years agoAdd field for internalFormat param to glTexImage to GrGLGpu::ConfigEntry.
bsalomon [Fri, 18 Dec 2015 02:15:11 +0000 (18:15 -0800)]
Add field for internalFormat param to glTexImage to GrGLGpu::ConfigEntry.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1532273002

Review URL: https://codereview.chromium.org/1532273002

8 years agoRemove dead code for glTexStorage
bsalomon [Thu, 17 Dec 2015 23:37:33 +0000 (15:37 -0800)]
Remove dead code for glTexStorage

This is untested and therefore would be hard to maintain as this code is modified. We can always add it back later if we decide to use it.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1531013005

Review URL: https://codereview.chromium.org/1531013005

8 years agoMake SkMatrix::get*Scale[s]() fail on NaN
bsalomon [Thu, 17 Dec 2015 23:33:13 +0000 (15:33 -0800)]
Make SkMatrix::get*Scale[s]() fail on NaN

BUG=skia:4718
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1532963002

Review URL: https://codereview.chromium.org/1532963002

8 years agoFix UB function problems for shaders and mask.
herb [Thu, 17 Dec 2015 22:22:34 +0000 (14:22 -0800)]
Fix UB function problems for shaders and mask.

BUG=skia:4634
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530743002

Review URL: https://codereview.chromium.org/1530743002

8 years agoAdd fExternalFormatForTexImage to GrGLGpu::ConfigEntry. Use it in GrGLGpu::uploadTexData.
bsalomon [Thu, 17 Dec 2015 22:17:34 +0000 (14:17 -0800)]
Add fExternalFormatForTexImage to GrGLGpu::ConfigEntry. Use it in GrGLGpu::uploadTexData.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1531343002

Review URL: https://codereview.chromium.org/1531343002

8 years agoRe-enable WritePixels test for iOS
jvanverth [Thu, 17 Dec 2015 22:17:30 +0000 (14:17 -0800)]
Re-enable WritePixels test for iOS

BUG=skia:2733
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1537793002

Review URL: https://codereview.chromium.org/1537793002

8 years agoSkMatrix::preScale() is too conservative
fmalita [Thu, 17 Dec 2015 22:12:30 +0000 (14:12 -0800)]
SkMatrix::preScale() is too conservative

SkMatrix::preScale() always sets the kScale bit, which means something
like

  m = SkMatrix::MakeScale(2, 2);
  m.preScale(0.5, 0.5);

leaves m.getType() == kScale_Mask, and can throw off the bitmap proc
heuristics.

We could detect the inverse case and clear the scale bit instead.

R=reed@google.com,caryclark@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1531323002

Review URL: https://codereview.chromium.org/1531323002

8 years agoCreate a hash table from id<-->key in SkImageFilter::CacheImpl
xidachen [Thu, 17 Dec 2015 22:12:23 +0000 (14:12 -0800)]
Create a hash table from id<-->key in SkImageFilter::CacheImpl

There is memory leak in the SkImageFilter::Cache. There are two sources
of memory leak:
1. The cache filling up quickly.
2. A slow small leak that never stops.
This CL solves the first issue, which prevents the cache filling up quickly.
This CL creates a new hash table that index the
SkImageFilter::uniqueID to an array of keys, and with the existing
key<-->Value hash table, we can have SkImageFilters proactively
purge content derived cached content when destroyed.

BUG=489543
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1514893003

Review URL: https://codereview.chromium.org/1514893003

8 years agoAdd default ctor to SkMask
robertphillips [Thu, 17 Dec 2015 19:33:12 +0000 (11:33 -0800)]
Add default ctor to SkMask

The minimal fix here seems to be handling BoxBlur's return value in SkBlurMaskFilter.cpp::GrRRectBlurEffect::Create. We seem to do enough special handling of the fImage field though that always initialializing it may not be a bad idea.

BUG=570232
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1539553002

Review URL: https://codereview.chromium.org/1539553002

8 years agoFixup GL instanced rendering commands
cdalton [Thu, 17 Dec 2015 19:11:40 +0000 (11:11 -0800)]
Fixup GL instanced rendering commands

We've ended up with a flag in both GrCaps and GrGLCaps to indicate
the same instanced rendering functionality. This change removes the
GrGLCaps version of the flag and also also fixes the interface assembler
to use the proper suffix when loading the EXT version of the extension.

BUG=skia:

Review URL: https://codereview.chromium.org/1537483002

8 years agoAdded concave paths to aaxfermodes GM
ethannicholas [Thu, 17 Dec 2015 18:58:28 +0000 (10:58 -0800)]
Added concave paths to aaxfermodes GM
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534823004

Review URL: https://codereview.chromium.org/1534823004

8 years agoupdate CMake and Google3 builds for AVX/AVX2
mtklein [Thu, 17 Dec 2015 18:18:04 +0000 (10:18 -0800)]
update CMake and Google3 builds for AVX/AVX2

The _avx.cpp code was working in a degraded (SSE2/SSSE3) mode silently.
This CL will make the _avx.cpp code start using AVX.

There is currently no _avx2.cpp code, but I'm writing some now,
and this change will make it work properly from the start.

Chrome and Android builds should already be okay.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535443003
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1535443003

8 years agoMove the GrGLGpu config stencil format index into ConfigTable
bsalomon [Thu, 17 Dec 2015 17:50:47 +0000 (09:50 -0800)]
Move the GrGLGpu config stencil format index into ConfigTable
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1526253007

Review URL: https://codereview.chromium.org/1526253007

8 years agoAdd 2 new SKPS to the buildbot repository
rmistry [Thu, 17 Dec 2015 17:40:30 +0000 (09:40 -0800)]
Add 2 new SKPS to the buildbot repository

BUG=skia:4713
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534483004
NOTRY=true

Review URL: https://codereview.chromium.org/1534483004

8 years agoDon't allow BGRA rendertargets on iOS w/ES 3.0+.
jvanverth [Thu, 17 Dec 2015 17:07:32 +0000 (09:07 -0800)]
Don't allow BGRA rendertargets on iOS w/ES 3.0+.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1531283002

Review URL: https://codereview.chromium.org/1531283002

8 years agoUse the unswapped end point y for early out case in winding_line
fs [Thu, 17 Dec 2015 17:03:27 +0000 (09:03 -0800)]
Use the unswapped end point y for early out case in winding_line

The x-coordinates are not swapped, so using the swapped y will result
in a comparison with the wrong (end) point.

BUG=skia:4265
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1533873002

Review URL: https://codereview.chromium.org/1533873002

8 years agoFix thread-unsafe construction of GrUniqueKey in GR_DEFINE_STATIC_UNIQUE_KEY
bsalomon [Thu, 17 Dec 2015 16:15:47 +0000 (08:15 -0800)]
Fix thread-unsafe construction of GrUniqueKey in GR_DEFINE_STATIC_UNIQUE_KEY
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530313002

Review URL: https://codereview.chromium.org/1530313002

8 years agoFix gaussian blur for small sigma.
senorblanco [Thu, 17 Dec 2015 16:10:17 +0000 (08:10 -0800)]
Fix gaussian blur for small sigma.

I broke this in https://skia.googlesource.com/skia/+/c57e0ded7d535523cfc6bf07c78e5f3479bb8c42.
That change added support for cropping during blur, but
did not do the correct thing for the small-sigma 2D matrix convolution
optimization when blurring from small-to-large textures.

The fix is pass the correct dstRect and srcOffset to convolve_gaussian_2d.
I also changed convolve_gaussian_1d() and convolve_gaussian_2d() to take
the original (non-negated) srcOffset, and to negate them when constructing
the local matrix.

Test: added a new (blur 0.3 0.3) column to imagefilterscropexpand, so that
GM will have to be rebaselined.

BUG=skia:4719,569883
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529313003

Review URL: https://codereview.chromium.org/1529313003

8 years agocheck bounds of each cubic segment against clip
reed [Thu, 17 Dec 2015 15:55:39 +0000 (07:55 -0800)]
check bounds of each cubic segment against clip

Timing against complex svg image (map),
no tiling: no change or very slightly faster
tiling (4x4): went from 3x slower (than untiled) to 2x slower

no gold changes expected

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1532733002

Review URL: https://codereview.chromium.org/1532733002

8 years agoremove obsolete ondrawsprite base virtual
reed [Wed, 16 Dec 2015 22:25:30 +0000 (14:25 -0800)]
remove obsolete ondrawsprite base virtual

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529283003

TBR=

Review URL: https://codereview.chromium.org/1529283003

8 years agoRevert of Add test for previously unflattenables (patchset #1 id:1 of https://coderev...
scroggo [Wed, 16 Dec 2015 22:17:58 +0000 (14:17 -0800)]
Revert of Add test for previously unflattenables (patchset #1 id:1 of https://codereview.chromium.org/1514373003/ )

Reason for revert:
Speculative fix for skbug.com/4709

Original issue's description:
> Add test for previously unflattenables
>
> BUG=skia:4613
>
> Committed: https://skia.googlesource.com/skia/+/061aaa79f7d8a2e93962e8296abaae13f0a7a715

TBR=halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4613

Review URL: https://codereview.chromium.org/1532753002

8 years agocount is an int, so constrain it to a 32-bit w-register.
mtklein [Wed, 16 Dec 2015 21:42:37 +0000 (13:42 -0800)]
count is an int, so constrain it to a 32-bit w-register.

This piece of code is already 64-bit only, so we don't need to think about ARMv7.

Hopefully this shuts up the warnings.  They were harmless.

If this doesn't work (it's relatively new modifier, so maybe some compilers barf), an alternative is to cast count to a size_t.

BUG=skia:4686
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1527123003
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1527123003

8 years agoadd fsync to try to get complete skps from webpage picture capture
caryclark [Wed, 16 Dec 2015 21:41:23 +0000 (13:41 -0800)]
add fsync to try to get complete skps from webpage picture capture

R=reed@google.com,mtklein@google.com
BUG=skia:4691
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530783003

Review URL: https://codereview.chromium.org/1530783003

8 years agoAdd VisualBench switch to extra_config
joshualitt [Wed, 16 Dec 2015 20:54:19 +0000 (12:54 -0800)]
Add VisualBench switch to extra_config

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1533523003

Review URL: https://codereview.chromium.org/1533523003

8 years agoonly call scalar finite when necessary
caryclark [Wed, 16 Dec 2015 20:28:35 +0000 (12:28 -0800)]
only call scalar finite when necessary

Mike points that the the ulps compares
rank high in path ops profiles. The
check for finite scalars is rarely
required.

Call it less by:
- specializing _pin version of compares
- checking for 0 divides up front
- handling failing cases before comparing
- casting float to double before adding

R=reed@google.com

Review URL: https://codereview.chromium.org/1522183002

8 years agoGenerate a table of config->glformat info. Precursor to lifting this to caps.
bsalomon [Wed, 16 Dec 2015 19:51:22 +0000 (11:51 -0800)]
Generate a table of config->glformat info. Precursor to lifting this to caps.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1527383003

Review URL: https://codereview.chromium.org/1527383003

8 years agoSSE 4.1 SrcOver blits: color32, blitmask.
mtklein [Wed, 16 Dec 2015 19:15:56 +0000 (11:15 -0800)]
SSE 4.1 SrcOver blits: color32, blitmask.

This is mainly warmup for an AVX2 version.
The machine I'm typing this on just doesn't support AVX2.
This strategy should translate easily down to SSSE3 and SSE2.

Xfermode_SrcOver:    2.73ms -> 2.62ms  (0.96x)   (That's Color32.)
Xfermode_SrcOver_aa: 3.48ms -> 3.09ms  (0.89x)   (That's BlitMask_D32_A8.)

AA text blits (text_16_AA_{88,FF,WT,BK}) show speedups in the range of 5 to 20%.

Unlike previous versions of this code, all the div255() are exactly (x+127)/255.
This won't fix any major bugs, but it does correct our bias in the middle.
There will be many diffs, all minor.

I've punted for now on pmaddubsw for lerping. I do intend to try that,
but I want this (relatively simple) code as my basis for comparison.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1526883004
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1526883004

8 years agoBlacklist GLInstancedArraysBench on ipad
joshualitt [Wed, 16 Dec 2015 18:38:35 +0000 (10:38 -0800)]
Blacklist GLInstancedArraysBench on ipad

TBR=jvanverth@google.com
BUG=skia:4714

Review URL: https://codereview.chromium.org/1522273006

8 years agoRemove Subset*Benches
scroggo [Wed, 16 Dec 2015 18:21:43 +0000 (10:21 -0800)]
Remove Subset*Benches

These were originally used to compare to the old implementation of
subset decoding in SkImageDecoder. The old implementation has been
removed, and they do not provide useful information that is not
covered by the BitmapRegionDecoderBenches.

This will greatly speed up some of our infra bots, which spend a lot of
time decoding interlaced PNGs repeatedly (thanks to
SubsetTranslateBench).

BUG=skia:4715
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1531833002

Review URL: https://codereview.chromium.org/1531833002

8 years agoRevert of Blacklist GLInstancedArraysBench on the ipad (patchset #1 id:1 of https...
joshualitt [Wed, 16 Dec 2015 18:20:11 +0000 (10:20 -0800)]
Revert of Blacklist GLInstancedArraysBench on the ipad (patchset #1 id:1 of https://codereview.chromium.org/1529973002/ )

Reason for revert:
Whoops, this is for nanobench

Original issue's description:
> Blacklist GLInstancedArraysBench on the ipad
>
> BUG=skia:4714
>
> Committed: https://skia.googlesource.com/skia/+/5d16fea9e22221be5fbe2866bbcfe8d6f4c6aeac

TBR=jvanverth@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4714

Review URL: https://codereview.chromium.org/1534513002

8 years agoThis brings hairlines into agreement with thick strokes.
caryclark [Wed, 16 Dec 2015 16:53:41 +0000 (08:53 -0800)]
This brings hairlines into agreement with thick strokes.

Add more testing and a pixel magnification to GM.

R=reed@google.com, fmalita@chromium.org
BUG=skia:4599
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1527083002

Review URL: https://codereview.chromium.org/1527083002

8 years agoReland of move drawSprite from canvas (patchset #1 id:1 of https://codereview.chromiu...
reed [Wed, 16 Dec 2015 16:38:15 +0000 (08:38 -0800)]
Reland of move drawSprite from canvas (patchset #1 id:1 of https://codereview.chromium.org/1529803004/ )

Reason for revert:
guard has landed in chrome

Original issue's description:
> Revert of remove drawSprite from canvas (patchset #4 id:60001 of https://codereview.chromium.org/1534443003/ )
>
> Reason for revert:
> need to remove an override in chrome
>
> Original issue's description:
> > remove drawSprite from canvas
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/4657ce2324ea197507c4ba728d81138f56da13b1
>
> TBR=fmalita@chromium.org,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/32704674f64cb6a14356dfebe060cd3484c06cc7

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

Review URL: https://codereview.chromium.org/1530203002

8 years agoRevert of remove drawSprite from canvas (patchset #4 id:60001 of https://codereview...
reed [Wed, 16 Dec 2015 16:27:10 +0000 (08:27 -0800)]
Revert of remove drawSprite from canvas (patchset #4 id:60001 of https://codereview.chromium.org/1534443003/ )

Reason for revert:
need to remove an override in chrome

Original issue's description:
> remove drawSprite from canvas
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4657ce2324ea197507c4ba728d81138f56da13b1

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

Review URL: https://codereview.chromium.org/1529803004

8 years agoremove drawSprite from canvas
reed [Wed, 16 Dec 2015 15:52:46 +0000 (07:52 -0800)]
remove drawSprite from canvas

BUG=skia:

Review URL: https://codereview.chromium.org/1534443003

8 years agoUse SK_BUILD_FOR_ANDROID_FRAMEWORK in compose
scroggo [Wed, 16 Dec 2015 15:34:21 +0000 (07:34 -0800)]
Use SK_BUILD_FOR_ANDROID_FRAMEWORK in compose

We are trying to support the behavior provided by the Android
framework. Other developers do not necessarily need this behavior.

BUG=skia:4296

Review URL: https://codereview.chromium.org/1518933002

8 years agoAvoid pixel GPU readback in saveLayerWithPickup
robertphillips [Wed, 16 Dec 2015 13:08:27 +0000 (05:08 -0800)]
Avoid pixel GPU readback in saveLayerWithPickup

When the default framebuffer is wrapped in a device for rendering we don't get a GrTexture. This CL adds a copy to a temporary texture in this instance so the rest of the Ganesh pipeline can continue on as usual.

Review URL: https://codereview.chromium.org/1531493002

8 years agoBlacklist GLInstancedArraysBench on the ipad
joshualitt [Tue, 15 Dec 2015 21:07:21 +0000 (13:07 -0800)]
Blacklist GLInstancedArraysBench on the ipad

BUG=skia:4714

Review URL: https://codereview.chromium.org/1529973002

8 years agoSet GL_PACK_ALIGNMENT before calling glReadPixels
bsalomon [Tue, 15 Dec 2015 20:37:38 +0000 (12:37 -0800)]
Set GL_PACK_ALIGNMENT before calling glReadPixels

Review URL: https://codereview.chromium.org/1525193002

8 years agoMake draw* lines responsible for cache management
joshualitt [Tue, 15 Dec 2015 19:33:19 +0000 (11:33 -0800)]
Make draw* lines responsible for cache management

TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1521613002

8 years agoFix for GrAALinearizingConvexPathRenderer incorrectly drawing non-convex paths
ethannicholas [Tue, 15 Dec 2015 19:01:12 +0000 (11:01 -0800)]
Fix for GrAALinearizingConvexPathRenderer incorrectly drawing non-convex paths

BUG=552080

Review URL: https://codereview.chromium.org/1522973002

8 years agoPorting Skia for newlib compatibility.
smklein [Tue, 15 Dec 2015 18:52:51 +0000 (10:52 -0800)]
Porting Skia for newlib compatibility.

"locale_t" is not defined for Newlib.

BUG=https://github.com/domokit/mojo/issues/431

Review URL: https://codereview.chromium.org/1526703003

8 years agoBlacklist AndroidOne + WritePixelsTest
joshualitt [Tue, 15 Dec 2015 18:46:21 +0000 (10:46 -0800)]
Blacklist AndroidOne + WritePixelsTest

BUG=skia:4711

Review URL: https://codereview.chromium.org/1528033002

8 years agoAdd helper for determining whether to use sized internal format in GL
bsalomon [Tue, 15 Dec 2015 17:25:06 +0000 (09:25 -0800)]
Add helper for determining whether to use sized internal format in GL

Fix case where texture format and data format are different.

Use helper when createing a testing "backend" texture.

BUG=skia:

Review URL: https://codereview.chromium.org/1527753002

8 years agoTests: reduce verbosity
halcanary [Tue, 15 Dec 2015 17:20:19 +0000 (09:20 -0800)]
Tests: reduce verbosity

Review URL: https://codereview.chromium.org/1526943003

8 years agoSkPreConfig.h: Allow defined(__unix__) to imply SK_BUILD_FOR_UNIX
mseaborn [Tue, 15 Dec 2015 15:52:31 +0000 (07:52 -0800)]
SkPreConfig.h: Allow defined(__unix__) to imply SK_BUILD_FOR_UNIX

This is more general than checking for __linux, __FreeBSD__, etc.  (In
principle we could remove some of the existing checks such as
__FreeBSD__, but I have not tried that so far.)

In particular, it allows Skia to build with the NaCl or PNaCl
toolchains, which is something we would like for Mojo.

BUG=https://github.com/domokit/mojo/issues/431
TEST=none

Review URL: https://codereview.chromium.org/1523733003

8 years agoSpecialize Sk2d for SSE2
mtklein [Tue, 15 Dec 2015 15:38:54 +0000 (07:38 -0800)]
Specialize Sk2d for SSE2

Given the autovectorization we've seen, I wouldn't expect big speedups
from this, but it does give us a point of control over what's going on.

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1526923003

8 years agoRevert of In BUILD.public, enable SK_SUPPORT_LEGACY_HAIR_IGNORES_CAPS. (patchset...
benjaminwagner [Tue, 15 Dec 2015 15:13:21 +0000 (07:13 -0800)]
Revert of In BUILD.public, enable SK_SUPPORT_LEGACY_HAIR_IGNORES_CAPS. (patchset #1 id:1 of https://codereview.chromium.org/1516863007/ )

Reason for revert:
The failing test has been blacklisted. The issue was not caused by this CL.

Original issue's description:
> In BUILD.public, enable SK_SUPPORT_LEGACY_HAIR_IGNORES_CAPS.
>
> Somehow https://codereview.chromium.org/1491843006 causes fills to change in one test.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b6c77f6d62a62db3aec483e0a995ca30b9c97f0b

TBR=mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1530533003

8 years agoSkBitmapProcState rounding bias
fmalita [Tue, 15 Dec 2015 14:48:48 +0000 (06:48 -0800)]
SkBitmapProcState rounding bias

Epsilon bias to keep bitmap sample rounding consistent with geometry
rounding.

Also update the GM to draw an outer border + drop uninteresting
scales in favor of negative scale variants.

BUG=skia:4680,skia:4649
R=reed@google.com,caryclark@google.com,mtklein@google.com

Review URL: https://codereview.chromium.org/1527633002

8 years agoAdd link to Gold trybot runs in every uploaded Skia CL
rmistry [Tue, 15 Dec 2015 14:23:33 +0000 (06:23 -0800)]
Add link to Gold trybot runs in every uploaded Skia CL

BUG=skia:4433
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1521913005

Review URL: https://codereview.chromium.org/1521913005

8 years agoadb_wait_for_device: More fixes
borenet [Tue, 15 Dec 2015 12:25:39 +0000 (04:25 -0800)]
adb_wait_for_device: More fixes

BUG=skia:4690

Review URL: https://codereview.chromium.org/1527713002

8 years agoFix valgrind suppressions for libjpeg-turbo warning
msarett [Mon, 14 Dec 2015 22:14:06 +0000 (14:14 -0800)]
Fix valgrind suppressions for libjpeg-turbo warning

BUG=skia:

Review URL: https://codereview.chromium.org/1518393003

8 years agoUpdate sync_google3.sh to match autoroller.py.
benjaminwagner [Mon, 14 Dec 2015 20:41:10 +0000 (12:41 -0800)]
Update sync_google3.sh to match autoroller.py.

BUG=skia:

Review URL: https://codereview.chromium.org/1526593003

8 years agoAdd option to control maximum GrBatch lookback
bsalomon [Mon, 14 Dec 2015 20:13:09 +0000 (12:13 -0800)]
Add option to control maximum GrBatch lookback

Review URL: https://codereview.chromium.org/1498653002

8 years agoSwitch fragment coordinate to 'highp' to fix various broken GMs.
ethannicholas [Mon, 14 Dec 2015 19:37:55 +0000 (11:37 -0800)]
Switch fragment coordinate to 'highp' to fix various broken GMs.

BUG=skia:4693

Review URL: https://codereview.chromium.org/1523793002

8 years agoUnify some SkNx code
mtklein [Mon, 14 Dec 2015 19:25:18 +0000 (11:25 -0800)]
Unify some SkNx code

 - one base case and one N=1 case instead of two each (or three with doubles)
 - use SkNx_cast instead of FromBytes/toBytes
 - 4-at-a-time Sk4f::ToBytes becomes a special standalone Sk4f_ToBytes

If I did everything right, this'll be perf- and pixel- neutral.

https://gold.skia.org/search2?issue=1526523003&unt=true&query=source_type%3Dgm&master=false

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1526523003

8 years agoRevert of SkTime updates (patchset #2 id:20001 of https://codereview.chromium.org...
mtklein [Mon, 14 Dec 2015 18:54:24 +0000 (10:54 -0800)]
Revert of SkTime updates (patchset #2 id:20001 of https://codereview.chromium.org/1521293002/ )

Reason for revert:
linux Canary builder has no std::steady_clock.  Weird...

Original issue's description:
> SkTime updates
>
> 1) Use steady_clock instead of high_resolution_clock. If we don't have a
> guarantee of monotonicity, it's pretty much useless for timing things.
>
> 2) Implement Mac/iOS with <chrono> too.  This was waiting on C++11 library support.
>
> Both high_resolution_clock and steady_clock are (still) busted on MSVC 2013,
> so no change there.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/6a20871e5aeaa7e61f3348694bf436af16f824b9

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

Review URL: https://codereview.chromium.org/1529603002