platform/upstream/libSkiaSharp.git
8 years agoRevert of df generation: single allocation with calloc (patchset #2 id:20001 of https...
mtklein [Tue, 5 Jan 2016 03:02:52 +0000 (19:02 -0800)]
Revert of df generation: single allocation with calloc (patchset #2 id:20001 of https://codereview.chromium.org/1544983004/ )

Reason for revert:
Crashing multiple bots, e.g.
https://uberchromegw.corp.google.com/i/client.skia.android/builders/Perf-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release/builds/3525

Original issue's description:
> df generation: single allocation with calloc
>
> The dfStorage DFData allocation can never fit in its stack space: 5px padding on each side always implies at least a 10x10 DFData allocation, but the stack space only fits 64 DFData.
>
> So we've always been spilling to the heap.
>
> If we're going to spill to the heap, we might as well allocate/free all our temporary memory in one block, and since we want it zeroed, might as well calloc.
>
> So in practice this replaces 1-2 malloc, 1-2 free, and 2 bzeros with 1 calloc and 1 free.
>
>
> BUG=skia:4729
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1544983004
>
> Committed: https://skia.googlesource.com/skia/+/12204d90337656542a42fa0fcccb7bec13af0cce

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

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

8 years agoTwo malloc+bzero -> calloc.
mtklein [Tue, 5 Jan 2016 02:56:57 +0000 (18:56 -0800)]
Two malloc+bzero -> calloc.

I was profiling DM and noticed a couple spots where we malloc then bzero.
These might as well call calloc instead:
   - any time DM itself allocates bitmaps for raster drawing;
   - any time Skia allocates memory for a raster SkSurface.

We could use malloc for opaque surfaces, but it seems simpler to always calloc.

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

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

8 years agoremove use of malloc.h
mtklein [Tue, 5 Jan 2016 02:50:42 +0000 (18:50 -0800)]
remove use of malloc.h

It's non-portable, commented out, and those asserts are not important.
Let's just blow it away.

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

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

8 years agodf generation: single allocation with calloc
mtklein [Tue, 5 Jan 2016 02:40:07 +0000 (18:40 -0800)]
df generation: single allocation with calloc

The dfStorage DFData allocation can never fit in its stack space: 5px padding on each side always implies at least a 10x10 DFData allocation, but the stack space only fits 64 DFData.

So we've always been spilling to the heap.

If we're going to spill to the heap, we might as well allocate/free all our temporary memory in one block, and since we want it zeroed, might as well calloc.

So in practice this replaces 1-2 malloc, 1-2 free, and 2 bzeros with 1 calloc and 1 free.

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

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

8 years agoRevert of Try using std::call_once (patchset #1 id:1 of https://codereview.chromium...
mtklein [Tue, 5 Jan 2016 02:18:50 +0000 (18:18 -0800)]
Revert of Try using std::call_once (patchset #1 id:1 of https://codereview.chromium.org/1550893002/ )

Reason for revert:
Can't use on XP.  :(

Original issue's description:
> Try using std::call_once
>
> Now that we've got std library support, perhaps we should start using it.
> This CL acts as a little canary, and may help fix the linked bug.
>
> I'm not really sure what's going on in the linked bug, but using
> std::call_once over homegrown atomics has to be the right answer...
>
> BUG=chromium:418041
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1550893002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Going to land this ahead of review while the tree is quiet to see how it rolls.
> TBR=herb@google.com
>
> Committed: https://skia.googlesource.com/skia/+/8895b72f789e5dc8bb99cb9727875439005fc919

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

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

8 years agohandle halfway case in scan converter
caryclark [Mon, 4 Jan 2016 22:17:47 +0000 (14:17 -0800)]
handle halfway case in scan converter

Scan edges that start at exactly -0.5 aren't trimmed by
clipping or by rounding, triggering a debug assert.

One way to fix this is to round the top and left
down instead of up.

Also, move the path initialization of gm/composeshader.cpp
to make debugging other path problems easier.

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

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

8 years agoremove now defunct get_paint_offset
reed [Mon, 4 Jan 2016 22:11:31 +0000 (14:11 -0800)]
remove now defunct get_paint_offset

This used to be used when we wanted to know where the paint was, so we could perform peep-hole optimizations.

We no longer do that on this (older) picture format, so now this function only serves to clog up the file with asserts.

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

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

8 years agoAndroid bots: set battery threshold to 80%
borenet [Mon, 4 Jan 2016 20:33:26 +0000 (12:33 -0800)]
Android bots: set battery threshold to 80%

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

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

8 years agoOn Valgrind bots, print a message every 20 minutes
msarett [Mon, 4 Jan 2016 19:35:43 +0000 (11:35 -0800)]
On Valgrind bots, print a message every 20 minutes

I believe that the timeout failure on the Valgrind bot occurs
because we skip many tests consecutively without printing any
output.  Skipping these tests requires non-trivial work.

Printing a message every 20 minutes will avoid timeouts.

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

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

8 years agoAdd unit test for crbug.com/570232
robertphillips [Mon, 4 Jan 2016 19:20:25 +0000 (11:20 -0800)]
Add unit test for crbug.com/570232

This is the promised followup to https://codereview.chromium.org/1539553002/ (Add default ctor to SkMask) and would've caught the bug before it got out into the wild.

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

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

8 years agoAndroid devices: wait for 100% charge
borenet [Mon, 4 Jan 2016 18:44:03 +0000 (10:44 -0800)]
Android devices: wait for 100% charge

Some devices are getting pretty low by the end of the build (3%).  No reason to cut it close, bump to 100% charge.  This will cause some devices to sit for a while as they charge up.

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

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

8 years ago[Reland] Repeating SkBitmapProcState rounding bias
fmalita [Mon, 4 Jan 2016 18:28:11 +0000 (10:28 -0800)]
[Reland] Repeating SkBitmapProcState rounding bias

1) observe the bias in repeat matrix procs also.
2) add utility for device space -> bitmap space mapping.
3) remove unneeded filter bias

This is a reland of https://codereview.chromium.org/1529833003/. The
main difference (and the fix) vs. the prev version is increased
precision: the mapper now operates with SkFractionalInts.

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

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

8 years agoremove 565 effects shaders
caryclark [Mon, 4 Jan 2016 17:54:55 +0000 (09:54 -0800)]
remove 565 effects shaders

This removes the 565 optimization for radial,
linear, sweep, and picture shaders. The
optimization gets little real-world use and
has a reasonable fallback. This also permits
removing the square root table for the radial
gradient case.

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

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

8 years agoMove path fallback for AA rect out of SkGpuDevice
cdalton [Mon, 4 Jan 2016 17:48:25 +0000 (09:48 -0800)]
Move path fallback for AA rect out of SkGpuDevice

The AA rect batches currently in Skia have view matrix restrictions. If
a view matrix is not supported, we have to draw the rect as a path
instead. This changes moves the decision to draw as a path out of
SkGpuDevice and into GrDrawContext.

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

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

8 years agoDon't preserve buggy Android behavior of ignoring the paint's alpha.
djsollen [Mon, 4 Jan 2016 16:16:38 +0000 (08:16 -0800)]
Don't preserve buggy Android behavior of ignoring the paint's alpha.

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

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

8 years agoChange use of LoadLibrary to LoadLibraryA
jvanverth [Mon, 4 Jan 2016 16:14:18 +0000 (08:14 -0800)]
Change use of LoadLibrary to LoadLibraryA

This allows Skia to be built with UNICODE defined.

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

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

8 years ago[SkDebugger] Display run glyph positioning modes
fmalita [Mon, 4 Jan 2016 16:08:04 +0000 (08:08 -0800)]
[SkDebugger] Display run glyph positioning modes

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

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

8 years agoAdd conversion from SaveLayerFlags to SaveFlags
scroggo [Mon, 4 Jan 2016 15:16:32 +0000 (07:16 -0800)]
Add conversion from SaveLayerFlags to SaveFlags

Needed for SkiaAndroidProxy::getSaveLayerStrategy.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1559873003

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

8 years agomove SkDither.h to private, remove unused shadeSpan16
reed [Mon, 4 Jan 2016 13:06:07 +0000 (05:06 -0800)]
move SkDither.h to private, remove unused shadeSpan16

Since perlin noise shader never set the kHasShad16 flag, its shadeSpan16 method was never called.

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

TBR=

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

8 years agoremove forth experiment
reed [Mon, 4 Jan 2016 02:41:43 +0000 (18:41 -0800)]
remove forth experiment

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

TBR=

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

8 years agomove SkTDict and SkTSearch into private
reed [Mon, 4 Jan 2016 02:36:05 +0000 (18:36 -0800)]
move SkTDict and SkTSearch into private

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

TBR=

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

8 years agoFix -Wunused-function warnings in chrome/ios builds.
thakis [Sun, 3 Jan 2016 20:44:43 +0000 (12:44 -0800)]
Fix -Wunused-function warnings in chrome/ios builds.

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

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

8 years agoUpdate SKP version
update-skps [Sun, 3 Jan 2016 08:36:36 +0000 (00:36 -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=1551273002

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

8 years agoreplace older/slower/scaler version of conic evalAt
reed [Fri, 1 Jan 2016 21:05:10 +0000 (13:05 -0800)]
replace older/slower/scaler version of conic evalAt

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

TBR=

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

8 years agochange factory to method, to parallel pattern in imagefilters. no functionality change.
reed [Wed, 30 Dec 2015 21:39:41 +0000 (13:39 -0800)]
change factory to method, to parallel pattern in imagefilters. no functionality change.

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

TBR=

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

8 years agoUse device-independent text for nvprmsaa4/16 in nanobench and dm
kkinnunen [Tue, 29 Dec 2015 16:57:32 +0000 (08:57 -0800)]
Use device-independent text for nvprmsaa4/16 in nanobench and dm

Use device-independent text rendering in nanobench and dm when
using configs nvprmsaa4 or nvprmsaa16.

This was turned on for dm in commit:
"Re-enable nvpr text rendering in DM"
https://codereview.chromium.org/1306733007

This regressed in commit:
"Add config options to run different GPU APIs to dm and nanobench"
https://codereview.chromium.org/1490113005/

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

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

8 years agoTry using std::call_once
mtklein [Tue, 29 Dec 2015 06:27:18 +0000 (22:27 -0800)]
Try using std::call_once

Now that we've got std library support, perhaps we should start using it.
This CL acts as a little canary, and may help fix the linked bug.

I'm not really sure what's going on in the linked bug, but using
std::call_once over homegrown atomics has to be the right answer...

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

Going to land this ahead of review while the tree is quiet to see how it rolls.
TBR=herb@google.com

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

8 years agoinitialize offscreen in StrokeZeroGM
mtklein [Mon, 28 Dec 2015 19:15:46 +0000 (11:15 -0800)]
initialize offscreen in StrokeZeroGM

Valgrind's complaining that we're drawing uninitialized source pixels
from that offscreen via drawBitmap():
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind/builds/736/steps/dm/logs/stdio

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

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

8 years agoDisable ES2 on Linux SDL
joshualitt [Mon, 28 Dec 2015 16:44:26 +0000 (08:44 -0800)]
Disable ES2 on Linux SDL

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

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

8 years agoReland of Make draw* lines responsible for cache management (patchset #1 id:1 of...
joshualitt [Mon, 28 Dec 2015 15:23:58 +0000 (07:23 -0800)]
Reland of Make draw* lines responsible for cache management (patchset #1 id:1 of https://codereview.chromium.org/1552513003/ )

Reason for revert:
might have been premature

Original issue's description:
> Revert of Make draw* lines responsible for cache management (patchset #1 id:1 of https://codereview.chromium.org/1521613002/ )
>
> Reason for revert:
> seeing crashes on android and linux
>
> Original issue's description:
> > Make draw* lines responsible for cache management
> >
> > TBR=bsalomon@google.com
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/66957946c0c418e71c0f36bb2904cc38c334eba4
>
> TBR=bsalomon@google.com,jvanverth@google.com,joshualitt@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/90e293dae4990a86cb952663ccde8fae55112d7d

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

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

8 years agoRevert of Make draw* lines responsible for cache management (patchset #1 id:1 of...
joshualitt [Mon, 28 Dec 2015 15:14:52 +0000 (07:14 -0800)]
Revert of Make draw* lines responsible for cache management (patchset #1 id:1 of https://codereview.chromium.org/1521613002/ )

Reason for revert:
seeing crashes on android and linux

Original issue's description:
> Make draw* lines responsible for cache management
>
> TBR=bsalomon@google.com
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/66957946c0c418e71c0f36bb2904cc38c334eba4

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

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

8 years agoremove cruft from SkTypes.h, including SkBool
reed [Sun, 27 Dec 2015 20:47:25 +0000 (12:47 -0800)]
remove cruft from SkTypes.h, including SkBool

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

TBR=

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

8 years agoUpdate SKP version
update-skps [Sun, 27 Dec 2015 08:34:44 +0000 (00:34 -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=1550663002

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

8 years agoremove deprecated annotation helper
reed [Sun, 27 Dec 2015 03:00:01 +0000 (19:00 -0800)]
remove deprecated annotation helper

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

TBR=

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

8 years agomake GrRect.h private
reed [Sun, 27 Dec 2015 02:20:00 +0000 (18:20 -0800)]
make GrRect.h private

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

TBR=bsalomon

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

8 years agoremove unused SkAutoROCanvasPixels
reed [Fri, 25 Dec 2015 20:56:03 +0000 (12:56 -0800)]
remove unused SkAutoROCanvasPixels

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

TBR=

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

8 years agoremove dead flags
reed [Thu, 24 Dec 2015 03:53:29 +0000 (19:53 -0800)]
remove dead flags

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

TBR=

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

8 years agoremove unused SkCubicInterval
reed [Wed, 23 Dec 2015 19:21:39 +0000 (11:21 -0800)]
remove unused SkCubicInterval

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

TBR=scroggo

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

8 years agoAdd config options to run different GPU APIs to dm and nanobench
kkinnunen [Wed, 23 Dec 2015 09:33:00 +0000 (01:33 -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

Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

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

8 years agoAppend '\n' character to nanobench error message
cdalton [Tue, 22 Dec 2015 18:50:56 +0000 (10:50 -0800)]
Append '\n' character to nanobench error message

This prevents the error message from inserting itself on a line before
a bench result, which can mess up parsing.

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

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

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