platform/upstream/libSkiaSharp.git
8 years agoAdd debug sentinel to GrMemoryPool to check for memory stomping
robertphillips [Wed, 6 Jan 2016 15:04:46 +0000 (07:04 -0800)]
Add debug sentinel to GrMemoryPool to check for memory stomping

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

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

8 years agoIn Google3 build, use SK_SFNTLY_SUBSETTER define to enable/disable sfntly.
benjaminwagner [Wed, 6 Jan 2016 01:00:04 +0000 (17:00 -0800)]
In Google3 build, use SK_SFNTLY_SUBSETTER define to enable/disable sfntly.

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

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

8 years agoStart using <type_traits> and <utility> (C++11).
bungeman [Tue, 5 Jan 2016 22:59:40 +0000 (14:59 -0800)]
Start using <type_traits> and <utility> (C++11).

SkUtility.h and SkTLogic.h implement a number of type traits now
available through <type_traits> and <utility>. This removes SkUtility.h,
replacing it with <utility>, and moves a number of traits in
SkTLogic.h to use the std:: equivelents. This change only uses C++11
parts of the standard library; SkTLogic.h will continue to provide
C++14 and beyond for now in the skstd namespace.

The changes to SkTLogic.h are being done gradually so that safe changes
may be landed confidently, with more risky changes in the future.

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

8 years agoAdd a bench to test SkTileImageFilter.
senorblanco [Tue, 5 Jan 2016 21:27:43 +0000 (13:27 -0800)]
Add a bench to test SkTileImageFilter.

Tests in three modes: no tiling, 32x32 tiled rendering, and 64x64 tiled
rendering.

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

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

8 years agofix nexus player
caryclark [Tue, 5 Jan 2016 20:36:09 +0000 (12:36 -0800)]
fix nexus player

The path contains test has such large numbers that it is indeterminate
whether it will return true or false. Allow either result, ensuring
that the test itself doesn't crash.

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

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

8 years agoAlso ignore sfntly for Google3/iOS.
mtklein [Tue, 5 Jan 2016 18:55:32 +0000 (10:55 -0800)]
Also ignore sfntly for Google3/iOS.

It's just complicating their build process for now.

Will follow up by removing sfntly dependency after this rolls.

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

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

8 years agoMore framework support for TransferBuffers
jvanverth [Tue, 5 Jan 2016 18:41:27 +0000 (10:41 -0800)]
More framework support for TransferBuffers

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

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

8 years agoMove read pixels format info into ConifgInfo in GrGLCaps
bsalomon [Tue, 5 Jan 2016 18:26:39 +0000 (10:26 -0800)]
Move read pixels format info into ConifgInfo in GrGLCaps
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1542813004

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

8 years agofix linear gradient assert, by explicitly clamping
reed [Tue, 5 Jan 2016 18:01:38 +0000 (10:01 -0800)]
fix linear gradient assert, by explicitly clamping

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

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

8 years agotake gr-context parameter to refEncoded, indicating a desire for only gpu-specific...
reed [Tue, 5 Jan 2016 17:16:19 +0000 (09:16 -0800)]
take gr-context parameter to refEncoded, indicating a desire for only gpu-specific formats

Prime motivator:
- we always call refEncoded on the generator when trying to upload
   - we call it *before* we ask for raster or YUV
- for blink, this call can be very slow, as they have to cons-up their SkData the first time (and grab a mutex to do it)
- this parameter will indicate to them that we're only interested in gpu formats, which they will know if they have.

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

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

8 years agoAdd assert that memory pool is empty when GrTextBlobCache frees
joshualitt [Tue, 5 Jan 2016 16:56:56 +0000 (08:56 -0800)]
Add assert that memory pool is empty when GrTextBlobCache frees

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

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

8 years agoAdd null check for bmp->tex result in SkImageFilter::filterInputGpu
bsalomon [Tue, 5 Jan 2016 16:39:28 +0000 (08:39 -0800)]
Add null check for bmp->tex result in SkImageFilter::filterInputGpu

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

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

8 years agoCMake: generate SkUserConfig.h with configure_file
mtklein [Tue, 5 Jan 2016 16:32:32 +0000 (08:32 -0800)]
CMake: generate SkUserConfig.h with configure_file

  1)  It's simpler.
  2)  It should cache correctly (and not trigger total rebuilds everytime we re-run CMake.)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1544493002
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/1544493002

8 years agoAdd comment for using infinite check in quad root
caryclark [Tue, 5 Jan 2016 16:20:48 +0000 (08:20 -0800)]
Add comment for using infinite check in quad root

TBR=reed@google.com
NOTRY=true
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556073004

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

8 years agoReturn 'correct' size from GrMemoryPool
joshualitt [Tue, 5 Jan 2016 16:07:18 +0000 (08:07 -0800)]
Return 'correct' size from GrMemoryPool

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

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

8 years agoclean up dead x86 filter opts code
mtklein [Tue, 5 Jan 2016 15:12:50 +0000 (07:12 -0800)]
clean up dead x86 filter opts code

This is dead after removing shadeSpan16().

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

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

8 years agoSpin off more thread-safe work in DM.
mtklein [Tue, 5 Jan 2016 14:20:20 +0000 (06:20 -0800)]
Spin off more thread-safe work in DM.

Even in GPU configs, encoding a .png and writing to disk is thread safe.
This CL moves that work to an SkTaskGroup, offloading it from the GPU
thread to a threadpool.

In my brief local testing, this makes DM run in about half the time
for GPU-bound work, e.g.

    $ out/Release/dm --src gm --config gpudft -w output
    Before: 43.79 real        37.01 user         4.28 sys
    After : 23.64 real        39.31 user         4.46 sys

This won't affect the bots much, as they already skip .png generation
when gold.skia.org already has a .png of an image with a given hash.
(Most of the time saved here is under WriteToDisk() after the
gUninterestingHashes check.)

CQ_EXTRA_TRYBOTS=client.skia:Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Release-Trybot

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

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

8 years agogive up on quad root if infinite
caryclark [Tue, 5 Jan 2016 14:20:09 +0000 (06:20 -0800)]
give up on quad root if infinite

SkPath::contains() uses SkFindUnitQuadRoots to see
which side of a curve a point is on. If the
intermediate exceeds a float, return no found root.

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

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

8 years agoremove shadeSpan16 from shader
reed [Tue, 5 Jan 2016 13:10:33 +0000 (05:10 -0800)]
remove shadeSpan16 from shader

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

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

8 years agodf generation: single allocation with calloc
mtklein [Tue, 5 Jan 2016 13:06:26 +0000 (05:06 -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

Committed: https://skia.googlesource.com/skia/+/12204d90337656542a42fa0fcccb7bec13af0cce

CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Release-Trybot

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

8 years agoupdate nanobench Valgrind suppression
mtklein [Tue, 5 Jan 2016 12:42:29 +0000 (04:42 -0800)]
update nanobench Valgrind suppression

start_keepalive is static, so it's likely inlined.
We'll put a ... where it goes to allow that.

C.f. https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/builds/529/steps/nanobench%20--abandonGpuContext/logs/stdio

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

TBR=egdaniel@google.com

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

8 years agoRevert of Make SkGLContext lifetime more well-defined (patchset #7 id:120001 of https...
jcgregorio [Tue, 5 Jan 2016 12:15:23 +0000 (04:15 -0800)]
Revert of Make SkGLContext lifetime more well-defined (patchset #7 id:120001 of https://codereview.chromium.org/1511773005/ )

Reason for revert:
Broke tests on Android, iOS, Mac and Windows.

Original issue's description:
> Make SkGLContext lifetime more well-defined
>
> Remove refcounting from SkGLContext.
>
> SkGLContext is expected to behave like GrContextFactory would own
> it, as implied by the GrContextFactory function.
>
> If it is refcounted, this does not hold.
>
> Also other use sites, such as in SkOSWindow_win (command buffer gl
> object), confirm the behavior. The object is explicitly owned and
> destroyed, not shared.
>
> Also fixes potential crashes from using GL context of an abandoned
> context.
>
> Also fixes potential crashes in DM/nanobench, if the GrContext lives
> longer than GLContext through internal refing of GrContext.
>
> Moves the non-trivial implementations from GrContextFactory.h to
> .cpp, just for consistency sake.
>
> Changes pathops_unittest.gyp. The pathops_unittest uses
> GrContextFactory, but did not link to its implementation. The reason
> they worked was that the implementation used (constructors, destructors)
> happened to be in the .h file.
>
> This works towards being able to use command buffer and NVPR from
> the SampleApp.
>
> BUG=skia:2992
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005
>
> Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

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

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

8 years agoTake care fall-through case of switch in skia
tzik [Tue, 5 Jan 2016 08:35:50 +0000 (00:35 -0800)]
Take care fall-through case of switch in skia

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

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

8 years agoMake SkGLContext lifetime more well-defined
kkinnunen [Tue, 5 Jan 2016 08:30:32 +0000 (00:30 -0800)]
Make SkGLContext lifetime more well-defined

Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

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

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

8 years agoSampleApp: remove Picture_DeviceType
kkinnunen [Tue, 5 Jan 2016 08:04:32 +0000 (00:04 -0800)]
SampleApp: remove Picture_DeviceType

Remove Picture_DeviceType from SampleApp SampleWindow DeviceType
enumeration.

Use a bool variable to control whether the drawing happens via
MultiPictureDraw.

The MultiPictureDraw mode can be activated by 'M', and title
is updated to contain "<MPD>". Previously the MPD mode was
inaccessible.

This works towards removing backend specific code from
SampleApp and VisualBench with the aim to move the code
to the common SkView framework (SkWindow in particular).
The grand goal is to be able to use command buffer GPU
API and NVPR in these apps.

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

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

8 years agoIf we swap its arguments, SkTaskGroup::batch() _is_ sk_parallel_for.
mtklein [Tue, 5 Jan 2016 03:13:19 +0000 (19:13 -0800)]
If we swap its arguments, SkTaskGroup::batch() _is_ sk_parallel_for.

Why have two names if we can get away with one?

This kills off sk_parallel_for_thread_count(), which was only used to avoid forcing a deadlock in OncePtrTest on multicore machines in singlethreaded mode... a really niche use case.  Instead just don't explicitly force a race.

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

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

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