platform/upstream/libSkiaSharp.git
9 years agoSkTreatAsSprite should take AA into account
fmalita [Thu, 7 Jan 2016 18:34:46 +0000 (10:34 -0800)]
SkTreatAsSprite should take AA into account

Currently we always call SkTreatAsSprite with 0 subpixel bits, which means
subpixel translations are ignored.  This is incorrect for the anti-aliased
case (drawSprite always pixel-snaps, so we lose edge AA).

The CL updates SkTreatAsSprite to take an SkPaint argument and use 8 subpixel
bits when AA is requested.

Also remove unused SkTreatAsSpriteFilter.

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

Committed: https://skia.googlesource.com/skia/+/983dc2541a729609037a05eba731b3eb9788c517

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

9 years agoAdd sentinel to GrMemoryPool's block header
robertphillips [Thu, 7 Jan 2016 18:12:16 +0000 (10:12 -0800)]
Add sentinel to GrMemoryPool's block header

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

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

9 years agoRevert of SkTreatAsSprite should take AA into account (patchset #5 id:80001 of https...
reed [Thu, 7 Jan 2016 17:15:20 +0000 (09:15 -0800)]
Revert of SkTreatAsSprite should take AA into account (patchset #5 id:80001 of https://codereview.chromium.org/1566943002/ )

Reason for revert:
Need to use SkLeftShift since the arg could be negative

Original issue's description:
> SkTreatAsSprite should take AA into account
>
> Currently we always call SkTreatAsSprite with 0 subpixel bits, which means
> subpixel translations are ignored.  This is incorrect for the anti-aliased
> case (drawSprite always pixel-snaps, so we lose edge AA).
>
> The CL updates SkTreatAsSprite to take an SkPaint argument and use 8 subpixel
> bits when AA is requested.
>
> Also remove unused SkTreatAsSpriteFilter.
>
> BUG=skia:4761
> R=reed@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1566943002
>
> Committed: https://skia.googlesource.com/skia/+/983dc2541a729609037a05eba731b3eb9788c517

TBR=fmalita@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4761

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

9 years agoRevert of add backdrop option to SaveLayerRec (patchset #14 id:260001 of https:/...
reed [Thu, 7 Jan 2016 16:15:10 +0000 (08:15 -0800)]
Revert of add backdrop option to SaveLayerRec (patchset #14 id:260001 of https://codereview.chromium.org/1523053003/ )

Reason for revert:
serialized != direct, will investigate

Original issue's description:
> add backdrop option to SaveLayerRec
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1523053003
>
> Committed: https://skia.googlesource.com/skia/+/247415969a9a5ed6c83cc09395472416c4b7de7f

TBR=robertphillips@google.com,bsalomon@google.com,mtklein@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoSkTreatAsSprite should take AA into account
fmalita [Thu, 7 Jan 2016 16:02:25 +0000 (08:02 -0800)]
SkTreatAsSprite should take AA into account

Currently we always call SkTreatAsSprite with 0 subpixel bits, which means
subpixel translations are ignored.  This is incorrect for the anti-aliased
case (drawSprite always pixel-snaps, so we lose edge AA).

The CL updates SkTreatAsSprite to take an SkPaint argument and use 8 subpixel
bits when AA is requested.

Also remove unused SkTreatAsSpriteFilter.

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

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

9 years agoRemove SK_SUPPORT_LEGACY_BITMAP_SAMPLER_BIAS
fmalita [Thu, 7 Jan 2016 15:58:10 +0000 (07:58 -0800)]
Remove SK_SUPPORT_LEGACY_BITMAP_SAMPLER_BIAS

No longer defined in Chromium.

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

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

9 years agoadd backdrop option to SaveLayerRec
reed [Thu, 7 Jan 2016 15:44:35 +0000 (07:44 -0800)]
add backdrop option to SaveLayerRec

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

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

9 years agoDM: add a pixel check to serialize
mtklein [Thu, 7 Jan 2016 15:38:29 +0000 (07:38 -0800)]
DM: add a pixel check to serialize

If we're running through serialize and then drawing into some raster target (e.g. serialize-8888 like we run on the bots), make sure the serialized version is identical to what we'd get if we just drew into the rest of the pipeline (i.e. 8888).

Start by blacklisting all current failures.  This at least prevents further regression.

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

Committed: https://skia.googlesource.com/skia/+/6eb4e36a93ea695e7adb771ea9ac3326680a8e98

CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot

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

9 years agoAdd missing include for sleep
scroggo [Thu, 7 Jan 2016 15:28:47 +0000 (07:28 -0800)]
Add missing include for sleep

This fixes the AOSP mips build. Mirrors the same change needed in DM.cpp at crrev.com/1425843003

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

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

9 years agoFix crash when ETC1 codec is not supported.
djsollen [Thu, 7 Jan 2016 15:22:47 +0000 (07:22 -0800)]
Fix crash when ETC1 codec is not supported.

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

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

9 years agoRemove codecs and images from iOS Bazel build.
iroth [Thu, 7 Jan 2016 15:11:39 +0000 (07:11 -0800)]
Remove codecs and images from iOS Bazel build.

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

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

9 years agocmake: set SK_RELEASE to 0 if not a Release build
mtklein [Thu, 7 Jan 2016 14:56:11 +0000 (06:56 -0800)]
cmake: set SK_RELEASE to 0 if not a Release build

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

9 years agoremove dead code from SkColorMatrixFilter
reed [Thu, 7 Jan 2016 14:23:48 +0000 (06:23 -0800)]
remove dead code from SkColorMatrixFilter

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

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

9 years agoRevert of DM: add a pixel check to serialize (patchset #4 id:60001 of https://coderev...
caryclark [Thu, 7 Jan 2016 13:12:08 +0000 (05:12 -0800)]
Revert of DM: add a pixel check to serialize (patchset #4 id:60001 of https://codereview.chromium.org/1561993003/ )

Reason for revert:
breaks windows bots; additional windows specific failures need to be blacklisted

Original issue's description:
> DM: add a pixel check to serialize
>
> If we're running through serialize and then drawing into some raster target (e.g. serialize-8888 like we run on the bots), make sure the serialized version is identical to what we'd get if we just drew into the rest of the pipeline (i.e. 8888).
>
> Start by blacklisting all current failures.  This at least prevents further regression.
>
> BUG=skia:4095
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1561993003
>
> Committed: https://skia.googlesource.com/skia/+/6eb4e36a93ea695e7adb771ea9ac3326680a8e98

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

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

9 years agoRevert of Broke GrTessellatingPathRenderer's tessellator out into a separate file...
caryclark [Thu, 7 Jan 2016 13:09:48 +0000 (05:09 -0800)]
Revert of Broke GrTessellatingPathRenderer's tessellator out into a separate file. (patchset #8 id:240001 of https://codereview.chromium.org/1557083002/ )

Reason for revert:
broke valgrind bot

Original issue's description:
> Broke GrTessellatingPathRenderer's tessellator out into a separate file.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557083002
>
> Committed: https://skia.googlesource.com/skia/+/8b05cb8a00bdb82e100f1ba74bf4de4a504cceea

TBR=bsalomon@google.com,joshualitt@chromium.org,senorblanco@chromium.org,ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoMake SkGLContext lifetime more well-defined
kkinnunen [Thu, 7 Jan 2016 07:49:30 +0000 (23:49 -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

Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

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

9 years agoDM: add a pixel check to serialize
mtklein [Wed, 6 Jan 2016 22:20:29 +0000 (14:20 -0800)]
DM: add a pixel check to serialize

If we're running through serialize and then drawing into some raster target (e.g. serialize-8888 like we run on the bots), make sure the serialized version is identical to what we'd get if we just drew into the rest of the pipeline (i.e. 8888).

Start by blacklisting all current failures.  This at least prevents further regression.

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

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

9 years agoFor Google3, enable SK_SUPPORT_LEGACY_SAVEFLAGS; required by legacy webkit_headless.
benjaminwagner [Wed, 6 Jan 2016 20:51:58 +0000 (12:51 -0800)]
For Google3, enable SK_SUPPORT_LEGACY_SAVEFLAGS; required by legacy webkit_headless.

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

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

9 years agoBroke GrTessellatingPathRenderer's tessellator out into a separate file.
ethannicholas [Wed, 6 Jan 2016 19:44:34 +0000 (11:44 -0800)]
Broke GrTessellatingPathRenderer's tessellator out into a separate file.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557083002

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

9 years agoFix DM tests in the Android Framework
djsollen [Wed, 6 Jan 2016 19:38:14 +0000 (11:38 -0800)]
Fix DM tests in the Android Framework
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567693002

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

9 years agoReenable testing webp to PDF on Valgrind
scroggo [Wed, 6 Jan 2016 19:28:26 +0000 (11:28 -0800)]
Reenable testing webp to PDF on Valgrind

The errors were probably due to skbug.com/4038, which has been fixed.
Reenable the test.

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

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

9 years agoAdd Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release to the CQ
borenet [Wed, 6 Jan 2016 18:54:50 +0000 (10:54 -0800)]
Add Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release to the CQ

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

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

9 years agoFix some SkCodecPrintfs
scroggo [Wed, 6 Jan 2016 17:53:34 +0000 (09:53 -0800)]
Fix some SkCodecPrintfs

Silence the warning about peeking. Until we implement peeking for the
stream often used, it will always print, cluttering the logs.

Add some more information to the warning about failing to rewind.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1564843002

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

9 years agoOptimize SkTileImageFilter destination bitmap size.
senorblanco [Wed, 6 Jan 2016 17:46:24 +0000 (09:46 -0800)]
Optimize SkTileImageFilter destination bitmap size.

The destination bitmap size was not being clipped by the clip bounds,
so tiled rendering (ie., clipping to a small region and rendering
a SkTileImageFilter with a large dstRect) was much slower than
non-tiled rendering.

Correctness is covered by unit test ImageFilterDrawTiled, and
performance by TileImageFilterBench.

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

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

9 years agoAdd additional assert to GrSingleOwner
joshualitt [Wed, 6 Jan 2016 17:25:13 +0000 (09:25 -0800)]
Add additional assert to GrSingleOwner

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

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

9 years agoSkPDF: Change handling of large-numbers in matricies.
halcanary [Wed, 6 Jan 2016 17:02:25 +0000 (09:02 -0800)]
SkPDF: Change handling of large-numbers in matricies.

re-do http://crrev.com/1438503002 right.

Also, add a unit test that asserts without this change.

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

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

9 years agoAdd skstd::remove_pointer_t and use it.
bungeman [Wed, 6 Jan 2016 16:30:59 +0000 (08:30 -0800)]
Add skstd::remove_pointer_t and use it.

This replaces an existing incomplete implementation. This also makes
it easier to update the current use in the future when switching to
<type_traits>.

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

9 years agoadd comment
caryclark [Wed, 6 Jan 2016 16:27:44 +0000 (08:27 -0800)]
add comment

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

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

9 years agoCreate debug only SkSingleOwner
joshualitt [Wed, 6 Jan 2016 16:26:09 +0000 (08:26 -0800)]
Create debug only SkSingleOwner

This is so Gpu code can guard against improper multithreaded usage in
debug builds

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

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

9 years agofix valgrind
caryclark [Wed, 6 Jan 2016 16:15:44 +0000 (08:15 -0800)]
fix valgrind

(A recently added fuzzer test broke the valgrind bot, intentionally,
to isolate an uninitialized memory bug.)

If the conic has ordered points, but cannot be broken into parts,
treat it as if it were monotonic.

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

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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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

9 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