platform/upstream/libSkiaSharp.git
8 years agoAdd instructions to authenticate for fetch.
herb [Fri, 21 Aug 2015 15:38:06 +0000 (08:38 -0700)]
Add instructions to authenticate for fetch.

BUG=skia:

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

8 years agoReturn failure if getInputResultsGPU fails in SkXfermodeImageFilter
robertphillips [Fri, 21 Aug 2015 15:24:22 +0000 (08:24 -0700)]
Return failure if getInputResultsGPU fails in SkXfermodeImageFilter

SkXfermodeImageFilter::filterImageGPU is the only call site that does anything fancy when getInputResultsGPU fails. It seems like we can just return like everyone else (for uniformity).

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

8 years agoadd old fix for iOS SampleApp
caryclark [Fri, 21 Aug 2015 15:08:07 +0000 (08:08 -0700)]
add old fix for iOS SampleApp

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

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

8 years agoGMs: change some GMs to use SkImage over SkBitmap
halcanary [Fri, 21 Aug 2015 14:47:23 +0000 (07:47 -0700)]
GMs: change some GMs to use SkImage over SkBitmap

Also, add GetResourceAsImage() to Resources.h

Motivation:  test drawImage() as much as we test drawBitmap()

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

8 years agoClean up ifdefs in SkGifCodec
msarett [Fri, 21 Aug 2015 13:58:43 +0000 (06:58 -0700)]
Clean up ifdefs in SkGifCodec

Since codec uses the same version of giflib everywhere,
I believe these are unnecessary.

BUG=skia:

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

8 years agoThis code should've been part of the CL that added registerChildProcessor(); without...
wangyix [Fri, 21 Aug 2015 13:56:49 +0000 (06:56 -0700)]
This code should've been part of the CL that added registerChildProcessor(); without updating fUsesLocalCoords in the parent when a child proc is registered, batching will not work properly.

BUG=skia:4182

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

8 years agoUse stencil ops that don't issue writes whenever possible
vbuzinov [Fri, 21 Aug 2015 12:24:24 +0000 (05:24 -0700)]
Use stencil ops that don't issue writes whenever possible

Minimize the number of stencil writes by using GL_KEEP whenever possible.
This can positively affect the HW performance of the stencil test.

BUG=skia:3952

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

8 years agoadd gm for image->newShader
reed [Thu, 20 Aug 2015 19:30:20 +0000 (12:30 -0700)]
add gm for image->newShader

BUG=skia:
TBR=

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

8 years agoSkCanvas::onDrawPicture() quick-reject
fmalita [Thu, 20 Aug 2015 19:08:18 +0000 (12:08 -0700)]
SkCanvas::onDrawPicture() quick-reject

R=reed@google.com,mtklein@google.com

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

8 years agoReland of Implement canComputeFastBounds() for image filters. (patchset #1 id:1 of...
senorblanco [Thu, 20 Aug 2015 18:10:41 +0000 (11:10 -0700)]
Reland of Implement canComputeFastBounds() for image filters. (patchset #1 id:1 of https://codereview.chromium.org/1300403003/ )

Reason for revert:
The Mac compile issue was fixed here: https://chromium.googlesource.com/chromium/src/+/fdd331a42ae0b9a6909a121020735161ab61c6e5

Original issue's description:
> Revert of Implement canComputeFastBounds() for image filters. (patchset #8 id:130001 of https://codereview.chromium.org/1296943002/ )
>
> Reason for revert:
> This causes a syntax error.
>
> http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/87819/steps/compile%20%28with%20patch%29/logs/stdio
>
> Original issue's description:
> > Implement canComputeFastBounds() for image filters.
> >
> > Image filters have never implemented this check, which means that
> > filters which affect transparent black falsely claim they can compute
> > their bounds.
> >
> > Implemented an affectsTransparentBlack() virtual for image
> > filters, and a similar helper function for color filters.
> >
> > This will affect the following GMs: imagefiltersscaled
> > (lighting, perlin noise now filter to clip),
> > colorfilterimagefilter (new test case), imagefiltersclipped
> > (perlin noise now filters to clip).
> >
> > Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding
> > a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show
> > no impact from this change, but will watch the perf bots carefully.
> >
> > BUG=4212
> >
> > Committed: https://skia.googlesource.com/skia/+/915881fe743f9a789037695f543bc6ea189cd0cb
>
> TBR=reed@google.com,senorblanco@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=4212
>
> Committed: https://skia.googlesource.com/skia/+/12d8472d31ea5edb636d7d5214db253570115c40

TBR=reed@google.com,herb@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=4212

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

8 years agofix override
caryclark [Thu, 20 Aug 2015 17:53:13 +0000 (10:53 -0700)]
fix override

TBR=herb@google.com

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

8 years agofix cubic clip in y
caryclark [Thu, 20 Aug 2015 17:35:43 +0000 (10:35 -0700)]
fix cubic clip in y

Follow on to https://codereview.chromium.org/1299243002/

Clip using a geometric solution if the algebraic solution
fails in Y as well as in X.

If the root finder discovers real roots that are sufficiently
far apart, the root in the range of 0..1 can contain so much
error that it is computed to be slightly smaller than 0 or
larger than 1.

In this case, binary search the mono curve for the actual
answer.

R=reed@google.com

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

8 years agoAdd ANGLE workaround to prefer flushes over VRAM usage
robertphillips [Thu, 20 Aug 2015 16:39:02 +0000 (09:39 -0700)]
Add ANGLE workaround to prefer flushes over VRAM usage

On the whole, https://codereview.chromium.org/1286203002/ (Defer flushes if kPreferNoIO is specified) improved performance but it did cause a performance regression on ANGLE. This CL disables the deferral of flushes on ANGLE until we can add a separate incremental flushing mechanism.

TBR=bsalomon@google.com

BUG=skia:4201
BUG=521529

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

8 years agoRevert of Implement canComputeFastBounds() for image filters. (patchset #8 id:130001...
herb [Thu, 20 Aug 2015 16:28:45 +0000 (09:28 -0700)]
Revert of Implement canComputeFastBounds() for image filters. (patchset #8 id:130001 of https://codereview.chromium.org/1296943002/ )

Reason for revert:
This causes a syntax error.

http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/87819/steps/compile%20%28with%20patch%29/logs/stdio

Original issue's description:
> Implement canComputeFastBounds() for image filters.
>
> Image filters have never implemented this check, which means that
> filters which affect transparent black falsely claim they can compute
> their bounds.
>
> Implemented an affectsTransparentBlack() virtual for image
> filters, and a similar helper function for color filters.
>
> This will affect the following GMs: imagefiltersscaled
> (lighting, perlin noise now filter to clip),
> colorfilterimagefilter (new test case), imagefiltersclipped
> (perlin noise now filters to clip).
>
> Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding
> a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show
> no impact from this change, but will watch the perf bots carefully.
>
> BUG=4212
>
> Committed: https://skia.googlesource.com/skia/+/915881fe743f9a789037695f543bc6ea189cd0cb

TBR=reed@google.com,senorblanco@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=4212

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

8 years agoVisualBenchTest: Write JSON output
borenet [Thu, 20 Aug 2015 16:12:39 +0000 (09:12 -0700)]
VisualBenchTest: Write JSON output

BUG=skia:4093

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

8 years agoSkImage method for detecting lazy decoding
fmalita [Thu, 20 Aug 2015 15:47:26 +0000 (08:47 -0700)]
SkImage method for detecting lazy decoding

BUG=skia:4224
R=reed@google.com

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

8 years agosubdivide path when side-clipping fails
caryclark [Thu, 20 Aug 2015 15:23:52 +0000 (08:23 -0700)]
subdivide path when side-clipping fails

Please review concept; I'm OK not to check this in.

If the root finder fails, subdivide the curve and try again.
This is complicated by the reversed nature of the curves;
maybe it can be simpler, but how to do that escapes me.

R=reed@google.com
BUG=514246

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

8 years agoSkPDF: Memory improvements for PDF Streams
halcanary [Thu, 20 Aug 2015 15:09:37 +0000 (08:09 -0700)]
SkPDF: Memory improvements for PDF Streams

    ΔMEM = -15%
    ΔCPU = -7%

BUG=skia:3030

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

8 years agoIntroduce interface for memory dumps
primiano [Thu, 20 Aug 2015 15:00:32 +0000 (08:00 -0700)]
Introduce interface for memory dumps

BUG=chromium:503168

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

8 years agoUse static_assert instead of SK_COMPILE_ASSERT.
bungeman [Thu, 20 Aug 2015 14:57:51 +0000 (07:57 -0700)]
Use static_assert instead of SK_COMPILE_ASSERT.

Now that static_assert is allowed, there is no need to use a non-
standard compile time assertion

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

8 years agoImplement canComputeFastBounds() for image filters.
senorblanco [Thu, 20 Aug 2015 14:42:11 +0000 (07:42 -0700)]
Implement canComputeFastBounds() for image filters.

Image filters have never implemented this check, which means that
filters which affect transparent black falsely claim they can compute
their bounds.

Implemented an affectsTransparentBlack() virtual for image
filters, and a similar helper function for color filters.

This will affect the following GMs: imagefiltersscaled
(lighting, perlin noise now filter to clip),
colorfilterimagefilter (new test case), imagefiltersclipped
(perlin noise now filters to clip).

Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding
a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show
no impact from this change, but will watch the perf bots carefully.

BUG=4212

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

8 years agoFor a frag proc, its key will be a concatenation of all its descendant procs' keys...
wangyix [Thu, 20 Aug 2015 14:25:02 +0000 (07:25 -0700)]
For a frag proc, its key will be a concatenation of all its descendant procs' keys in postorder traversal.

BUG=skia:4182

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

8 years agoRevert "fill rect batch refactor into separate batches"
joshualitt [Thu, 20 Aug 2015 14:22:42 +0000 (07:22 -0700)]
Revert "fill rect batch refactor into separate batches"

This reverts commit ae41b3834301444cf27b8aa729b8ad36666bdc08.

TBR=bsalomon@google.com
BUG=skia:

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

8 years agoUpdate SkLightingShader to support rotation
robertphillips [Thu, 20 Aug 2015 12:15:06 +0000 (05:15 -0700)]
Update SkLightingShader to support rotation

This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Committed: https://skia.googlesource.com/skia/+/45b59ed6e4e231814dbdb9f707b3d2a7ee50de84

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

8 years agoSkColorCubeFilter: require alpha == 0xFF.
mtklein [Thu, 20 Aug 2015 01:56:49 +0000 (18:56 -0700)]
SkColorCubeFilter: require alpha == 0xFF.

This is about a 12% improvement on my desktop, from 134 to 118ms on our bench.

BUG=skia:

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

8 years agoBug fix: we're using SkPMFloat methods on SkColor.
mtklein [Thu, 20 Aug 2015 00:06:36 +0000 (17:06 -0700)]
Bug fix: we're using SkPMFloat methods on SkColor.

Annoyingly our test bot that forces SkPMFloat_none is a Linux bot using
BGRA SkPMColors, so we'd never notice the bug there.

BUG=skia:

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

8 years agoThou shalt use override consistently.
mtklein [Wed, 19 Aug 2015 21:01:42 +0000 (14:01 -0700)]
Thou shalt use override consistently.

TBR=herb@google.com
BUG=skia:

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

8 years agoAdd asserts for shared mutex.
herb [Wed, 19 Aug 2015 20:40:12 +0000 (13:40 -0700)]
Add asserts for shared mutex.

BUG=skia:

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

8 years agoPut drawPath in GrBatch.
bsalomon [Wed, 19 Aug 2015 20:26:49 +0000 (13:26 -0700)]
Put drawPath in GrBatch.

TODO: Implement path range version of this (and preserve combining consecutive ranges).

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

8 years agoRevert "Update SkLightingShader to support rotation"
robertphillips [Wed, 19 Aug 2015 20:11:23 +0000 (13:11 -0700)]
Revert "Update SkLightingShader to support rotation"

This reverts commit 45b59ed6e4e231814dbdb9f707b3d2a7ee50de84.

TBR=herb@google.com

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

8 years agoSkPDF: Simplify PDFStream / emitObject() const
halcanary [Wed, 19 Aug 2015 19:26:46 +0000 (12:26 -0700)]
SkPDF: Simplify PDFStream / emitObject() const

Compress SkPDFStream's data on setData(), not emitObject(); no longer stateful.

SkPDFObject::emitObject is now const.  This makes it easier to reason about state.

Minimal performance gains.

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

8 years agoprivate iterator to visit all resource cache entries
reed [Wed, 19 Aug 2015 19:25:40 +0000 (12:25 -0700)]
private iterator to visit all resource cache entries

BUG=skia:
TBR=

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

8 years agoFix transformed stroke width in GrAALinearizingConvexPathRenderer.
ethannicholas [Wed, 19 Aug 2015 19:09:12 +0000 (12:09 -0700)]
Fix transformed stroke width in GrAALinearizingConvexPathRenderer.

BUG=520476

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

8 years agoAdd VisualBenchTestActivity for instrumentation-testing VisualBench
borenet [Wed, 19 Aug 2015 19:06:46 +0000 (12:06 -0700)]
Add VisualBenchTestActivity for instrumentation-testing VisualBench

BUG=skia:4093

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

8 years agoMove SkTemplates.h to private.
bungeman [Wed, 19 Aug 2015 18:56:48 +0000 (11:56 -0700)]
Move SkTemplates.h to private.

SkTemplates.h contains a number of Skia specific utilities which are
not designed for external use. In addition to reducing the external
support burden, this will allow Skia to freely refactor this file.

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

8 years agostop dropping AA when rect stays rect
joshualitt [Wed, 19 Aug 2015 18:50:51 +0000 (11:50 -0700)]
stop dropping AA when rect stays rect

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/1bef9f59c566cc54c2259cc4d0171c115157cd1c

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

8 years agochange asABitmap to isABitmap on shader
reed [Wed, 19 Aug 2015 18:46:38 +0000 (11:46 -0700)]
change asABitmap to isABitmap on shader

BUG=skia:
TBR=

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

8 years agoNo need to re-declare pure virtual name().
mtklein [Wed, 19 Aug 2015 18:05:39 +0000 (11:05 -0700)]
No need to re-declare pure virtual name().

Fixes inconsistent override warning.

BUG=skia:
TBR=bsalomon@google.com

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

8 years agoPatches on top of Radu's latest.
mtklein [Wed, 19 Aug 2015 17:39:54 +0000 (10:39 -0700)]
Patches on top of Radu's latest.

    patch from issue 1273033005 at patchset 120001 (http://crrev.com/1273033005#ps120001)

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/2d141ba2df8f7506848aa9369f502944e837cd09

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

8 years agoUpdate SkLightingShader to support rotation
robertphillips [Wed, 19 Aug 2015 17:35:14 +0000 (10:35 -0700)]
Update SkLightingShader to support rotation

This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

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

8 years agoRevert of cast SK_ARRAY_COUNT to make it sign agnostic (patchset #1 id:1 of https...
caryclark [Wed, 19 Aug 2015 17:12:59 +0000 (10:12 -0700)]
Revert of cast SK_ARRAY_COUNT to make it sign agnostic (patchset #1 id:1 of https://codereview.chromium.org/1299943002/ )

Reason for revert:
fails on chrome build on windows

Original issue's description:
> cast SK_ARRAY_COUNT to make it sign agnostic
>
> By adding a cast to SK_ARRAY_COUNT, the compiler treats the
> compile-time value as if it were a const int, and like regular
> numbers, permits it to be compared to signed and unsigned
> numbers freely.
>
> R=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/bca86202a48b2afa527b6e40d8b360ce3bc7c2e7

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agounsigned -> int for counts and indices in picture-related code
mtklein [Wed, 19 Aug 2015 16:51:00 +0000 (09:51 -0700)]
unsigned -> int for counts and indices in picture-related code

also, (C)

BUG=skia:

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

8 years agoAdd rendertarget flag to prevent a debug assert in SampleApp.
senorblanco [Wed, 19 Aug 2015 16:10:28 +0000 (09:10 -0700)]
Add rendertarget flag to prevent a debug assert in SampleApp.

BUG=skia:4223

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

8 years agoCreate GrQuad
joshualitt [Wed, 19 Aug 2015 15:48:41 +0000 (08:48 -0700)]
Create GrQuad

BUG=skia:

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

8 years agocast SK_ARRAY_COUNT to make it sign agnostic
caryclark [Wed, 19 Aug 2015 15:28:14 +0000 (08:28 -0700)]
cast SK_ARRAY_COUNT to make it sign agnostic

By adding a cast to SK_ARRAY_COUNT, the compiler treats the
compile-time value as if it were a const int, and like regular
numbers, permits it to be compared to signed and unsigned
numbers freely.

R=reed@google.com

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

8 years agoUse calloc to allocate data that will be uploaded to vertex/index buffers in Chrome
bsalomon [Wed, 19 Aug 2015 15:26:51 +0000 (08:26 -0700)]
Use calloc to allocate data that will be uploaded to vertex/index buffers in Chrome

BUG=chromium:454267
BUG=chromium:522315

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

8 years agoThis change is in preparation for updating how processor keys and meta keys are gener...
wangyix [Wed, 19 Aug 2015 15:23:12 +0000 (08:23 -0700)]
This change is in preparation for updating how processor keys and meta keys are generated for frag procs.

BUG=skia:4182

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

8 years agoAdding sucessful exit message to VisualBench
joshualitt [Wed, 19 Aug 2015 15:21:48 +0000 (08:21 -0700)]
Adding sucessful exit message to VisualBench

BUG=skia:

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

8 years agoremove SkDeferredCanvas
reed [Wed, 19 Aug 2015 15:18:04 +0000 (08:18 -0700)]
remove SkDeferredCanvas

Waiting a day or so to see if the blink-removal of SkDeferredCanvas sticks

BUG=skia:

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

8 years agoAllow setting of GrBatchFontCache atlas sizes
joshualitt [Wed, 19 Aug 2015 15:16:43 +0000 (08:16 -0700)]
Allow setting of GrBatchFontCache atlas sizes

BUG=skia:

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

8 years agoForgot to add resources with new test
msarett [Wed, 19 Aug 2015 15:12:57 +0000 (08:12 -0700)]
Forgot to add resources with new test

I created these images using mandrill_16.png (already in
resources) and an online tool.

https://codereview.chromium.org/1287863004/
BUG=skia:

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

8 years agoRevert of Have DM manually encode its .png outputs. (patchset #2 id:20001 of https...
mtklein [Wed, 19 Aug 2015 15:11:37 +0000 (08:11 -0700)]
Revert of Have DM manually encode its .png outputs. (patchset #2 id:20001 of https://codereview.chromium.org/1304443002/ )

Reason for revert:
derek + Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Debug

Original issue's description:
> Have DM manually encode its .png outputs.
>
> This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7

TBR=stephana@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoRevert of SkCanvas::onDrawPicture() quick-reject (patchset #3 id:40001 of https:...
herb [Wed, 19 Aug 2015 14:47:55 +0000 (07:47 -0700)]
Revert of SkCanvas::onDrawPicture() quick-reject (patchset #3 id:40001 of https://codereview.chromium.org/1264133003/ )

Reason for revert:
Seems to be breaking some blink tests.
https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_rel/75812/layout-test-results/results.html

Original issue's description:
> SkCanvas::onDrawPicture() quick-reject
>
> R=reed@google.com,mtklein@google.com
>
> Committed: https://skia.googlesource.com/skia/+/48ed62b29d45e42b971aac8858da06781c93e6d7
>
> Committed: https://skia.googlesource.com/skia/+/d3d07245e29504dbffa0083e84ace5bab85853d4

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

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

8 years agoHave DM manually encode its .png outputs.
mtklein [Wed, 19 Aug 2015 14:37:51 +0000 (07:37 -0700)]
Have DM manually encode its .png outputs.

This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.

BUG=skia:

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

8 years agoSkStream Testing: fix bug in new unit test.
halcanary [Wed, 19 Aug 2015 14:22:04 +0000 (07:22 -0700)]
SkStream Testing: fix bug in new unit test.

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

8 years agoadd missing override
mtklein [Wed, 19 Aug 2015 14:11:34 +0000 (07:11 -0700)]
add missing override

BUG=skia:

TBR=

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

8 years agofill rect batch refactor into separate batches
joshualitt [Wed, 19 Aug 2015 13:54:08 +0000 (06:54 -0700)]
fill rect batch refactor into separate batches

BUG=skia:

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

8 years agoInit class ID in GrStencilPathBatch
Brian Salomon [Wed, 19 Aug 2015 13:44:48 +0000 (09:44 -0400)]
Init class ID in GrStencilPathBatch

TBR=joshualitt@google.com

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

8 years agoFix stack overuse error
halcanary [Wed, 19 Aug 2015 13:12:40 +0000 (06:12 -0700)]
Fix stack overuse error

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

8 years agoFix VS 2015 build
bsalomon [Wed, 19 Aug 2015 13:12:36 +0000 (06:12 -0700)]
Fix VS 2015 build

TBR=robertphillips@google.com

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

8 years agoSkCanvas::onDrawPicture() quick-reject
fmalita [Wed, 19 Aug 2015 13:07:36 +0000 (06:07 -0700)]
SkCanvas::onDrawPicture() quick-reject

R=reed@google.com,mtklein@google.com

Committed: https://skia.googlesource.com/skia/+/48ed62b29d45e42b971aac8858da06781c93e6d7

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

8 years agowiden gm to show entire image, add place-holder for no context
reed [Wed, 19 Aug 2015 13:07:29 +0000 (06:07 -0700)]
widen gm to show entire image, add place-holder for no context

BUG=skia:
TBR=

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

8 years agoSkPDF/Deflate: clean up old SkFlate code
halcanary [Tue, 18 Aug 2015 20:30:25 +0000 (13:30 -0700)]
SkPDF/Deflate: clean up old SkFlate code

Factor out some of https://crrev.com/1227913008

BUG=skia:3030

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

8 years agoPath stenciling in GrBatch
bsalomon [Tue, 18 Aug 2015 20:28:19 +0000 (13:28 -0700)]
Path stenciling in GrBatch

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

8 years agoTest scaling for small images
msarett [Tue, 18 Aug 2015 20:22:46 +0000 (13:22 -0700)]
Test scaling for small images

We don't want to test small images on Gold because they are
not interested to look at.  Instead, I wrote a unit test to
verify that scaling small images does not cause crashes.

BUG=skia:

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

8 years agoTry enabling all nanobenches on Nexus7
egdaniel [Tue, 18 Aug 2015 20:08:36 +0000 (13:08 -0700)]
Try enabling all nanobenches on Nexus7

BUG=skia:2774

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

8 years agohandle no shader from image in drawAtlas
reed [Tue, 18 Aug 2015 19:50:24 +0000 (12:50 -0700)]
handle no shader from image in drawAtlas

BUG=skia:
TBR=

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

8 years agoRemove Cmd in GrTargetCommands that is no longer needed with GrCopySurfaceBatch
bsalomon [Tue, 18 Aug 2015 19:30:02 +0000 (12:30 -0700)]
Remove Cmd in GrTargetCommands that is no longer needed with GrCopySurfaceBatch

TBR=joshualitt@google.com

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

8 years agoTry again to put SkXfermode_opts in SK_OPTS_NS
mtklein [Tue, 18 Aug 2015 19:23:28 +0000 (12:23 -0700)]
Try again to put SkXfermode_opts in SK_OPTS_NS

Remember failed attempt https://codereview.chromium.org/1286093004/ ?  I think this one is simpler and safer and even technically legal C++.

BUG=skia:4117

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

8 years agoAdd skeleton json support to visualbench
joshualitt [Tue, 18 Aug 2015 19:13:34 +0000 (12:13 -0700)]
Add skeleton json support to visualbench

BUG=skia:

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

8 years agoGrCopySurfaceBatch
bsalomon [Tue, 18 Aug 2015 19:12:35 +0000 (12:12 -0700)]
GrCopySurfaceBatch

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

8 years agoadded emitChild() to GrGLFragmentProcessor; removed AutoFragmentChildProcAdvance...
wangyix [Tue, 18 Aug 2015 19:00:12 +0000 (12:00 -0700)]
added emitChild() to GrGLFragmentProcessor; removed AutoFragmentChildProcAdvance class

BUG=skia:4182

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

8 years agoAdd support for non-mappable vert buffers to tessellating path renderer.
senorblanco [Tue, 18 Aug 2015 18:46:28 +0000 (11:46 -0700)]
Add support for non-mappable vert buffers to tessellating path renderer.

Use malloc-ed memory and the updateData() call instead.

BUG=skia:4215

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

8 years agoRevert of Update skia to test with libpng to 1.6.10 (patchset #3 id:60001 of https...
msarett [Tue, 18 Aug 2015 18:36:44 +0000 (11:36 -0700)]
Revert of Update skia to test with libpng to 1.6.10 (patchset #3 id:60001 of https://codereview.chromium.org/1301523005/ )

Reason for revert:
DM is failing on gm tests on Android bots.  Cause is not yet clear.

Original issue's description:
> Update skia to test with libpng to 1.6.10
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/f272bb03df9b86e7ea2cf23fb4d5cc56624e0118

TBR=djsollen@google.com,scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoWhen getGLInstance is called on a frag proc, the resulting GrGLFragmentProcessor...
wangyix [Tue, 18 Aug 2015 18:29:31 +0000 (11:29 -0700)]
When getGLInstance is called on a frag proc, the resulting GrGLFragmentProcessor will be the root of a tree of GrGLFragmentProcessors that mirrors the GrFragmentProcessor's tree. This allows setData() to be called recursively (removing the responsibility from compose shader) and allows gl instances direct access to their children gl instances so they can emit their code.

BUG=skia:4182

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

8 years agoAdd subsets to SkImageGenerator and SkImageCacherator
reed [Tue, 18 Aug 2015 18:16:09 +0000 (11:16 -0700)]
Add subsets to SkImageGenerator and SkImageCacherator
... to support subsets in SkImage!

BUG=skia:

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

8 years agoUpdate skia to test with libpng to 1.6.10
msarett [Tue, 18 Aug 2015 17:46:01 +0000 (10:46 -0700)]
Update skia to test with libpng to 1.6.10

BUG=skia:

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

8 years agoAdd internal links section to skia.org
hcm [Tue, 18 Aug 2015 17:38:00 +0000 (10:38 -0700)]
Add internal links section to skia.org

BUG=skia:4142
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1284043004

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

8 years agoClearStencilClip in GrBatch
bsalomon [Tue, 18 Aug 2015 17:33:30 +0000 (10:33 -0700)]
ClearStencilClip in GrBatch

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

8 years agoMove GrTBatchTesselator to its own file
joshualitt [Tue, 18 Aug 2015 17:16:01 +0000 (10:16 -0700)]
Move GrTBatchTesselator to its own file

BUG=skia:

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

8 years agoUpdate SkOpts namespaces.
mtklein [Tue, 18 Aug 2015 17:00:29 +0000 (10:00 -0700)]
Update SkOpts namespaces.

portable -> default, and everyone gets an sk_ prefix.

BUG=skia:4117

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

8 years agoAdd missing overrides to clear and discard batch dumpInfo()
Brian Salomon [Tue, 18 Aug 2015 16:46:51 +0000 (12:46 -0400)]
Add missing overrides to clear and discard batch dumpInfo()

TBR=joshualitt@google.com

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

8 years agoPatches on top of Radu's latest.
mtklein [Tue, 18 Aug 2015 16:43:28 +0000 (09:43 -0700)]
Patches on top of Radu's latest.

    patch from issue 1273033005 at patchset 120001 (http://crrev.com/1273033005#ps120001)

BUG=skia:

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

8 years agoUse portable code for family names with DirectWrite.
bungeman [Tue, 18 Aug 2015 16:34:07 +0000 (09:34 -0700)]
Use portable code for family names with DirectWrite.

IDWriteFamily::GetFamilyNames appears to be 'helpful' and removes
parts of family names that look like style names. Since the iterator
is supposed to return the actual names and not just the name the
platform thinks the name is (as getFamilyName does), try returning
the raw names when possible.

BUG=skia:4217

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

8 years agoPut clear and discard into GrBatch.
bsalomon [Tue, 18 Aug 2015 16:20:09 +0000 (09:20 -0700)]
Put clear and discard into GrBatch.

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

8 years agoUpdate BUILD.public a bit.
mtklein [Tue, 18 Aug 2015 15:51:49 +0000 (08:51 -0700)]
Update BUILD.public a bit.

 - SSE2 files are unfortunately now mixed-case, _SSE2 or _sse2.
 - Adds lists for SSSE3 and SSE4 files.
 - Remove SkDocument_PDF_None.cpp
 - Remove a few more references to animator.
 - Exclude private headers from HDRS.
 - Formatting and notes.

BUG=skia:

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

8 years agoClean up BUILD_simulator.py
halcanary [Tue, 18 Aug 2015 15:35:45 +0000 (08:35 -0700)]
Clean up BUILD_simulator.py

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

8 years agoDeduplicate typefaces across sub-pictures
mtklein [Tue, 18 Aug 2015 15:29:59 +0000 (08:29 -0700)]
Deduplicate typefaces across sub-pictures

Old flow to serialize a picture:
   1) serialize picture ops
   2) serialize all sub pictures recursively
   3) flatten the rest of this picture into a buffer, deduping flattenable factories and typefaces as we go
   4) serialize the factories and typefaces
   5) serialize the bytes from 3)

This allows the data in step 5) to refer to the deduplicated factories and typefaces from step 4).  But, each sub picture in step 2) is completely siloed, so they can't dedup with the parent picture or each other.

New flow:
   1) serialize picture ops
   2) flatten the rest of this picture into a buffer, deduping flattenable factories and typefaces as we go
   3) dummy-serialize sub pictures into /dev/null, with the effect of adding any new typefaces to our dedup set
   4) serialize the factories and typefaces
   5) serialize the bytes from 2)
   6) serialize all sub pictures recursively, with perfect deduplication because of step 3).

Now all typefaces in the top-level picture and all sub pictures recursively should end up deduplicated in the top-level typeface set.

Decoding changes are similar: we just thread through the top-level typefaces to the sub pictures.  What's convenient / surprising is that this new code correctly reads old pictures if we just have each picture prefer its local typeface set over the top-level one: old pictures always just use their own typefaces, and new pictures always use the top-level ones.

BUG=skia:4092

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

8 years agoPrefer native scaling to sampling
msarett [Tue, 18 Aug 2015 15:03:58 +0000 (08:03 -0700)]
Prefer native scaling to sampling

In the cases we have come across so far, native scaling has better performance
and correctness than sampling.  If native scaling is supported we want to use
it.

Jpegs native scale rounds up.
Ex: An 11x11 image with sampleSize=8 scales to 2x2.

SkScaledCodec rounds down.
Ex: An 11x11 image with sampleSize=8 scales to 1x1.

Before the CL, we would choose to use SkScaledCodec because it scales closer to
the "ideal" scale.

I think we want to go with the native option as long as its within 1 of the
ideal value.
BUG=skia:

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

8 years agoRegenerate LCD text blobs if GrPaint's color changes, not SkPaint.
jvanverth [Tue, 18 Aug 2015 14:44:22 +0000 (07:44 -0700)]
Regenerate LCD text blobs if GrPaint's color changes, not SkPaint.

The GrPaint's color takes into account shaders and color filters, so is a
more accurate picture of the color state.

BUG=chromium:511787

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

8 years agoMade isEqual in GrFragmentProcessor recursive
wangyix [Tue, 18 Aug 2015 14:39:33 +0000 (07:39 -0700)]
Made isEqual in GrFragmentProcessor recursive

Added comment about how computeInvariantOutput() is non-recursive in GrFragmentProcessor

Made isEqual() recursive in GrFragmentProcessor

BUG=skia:4182

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

8 years agoGrAAFillRectBatch holds onto GrPipelineOptimizations
joshualitt [Tue, 18 Aug 2015 14:25:38 +0000 (07:25 -0700)]
GrAAFillRectBatch holds onto GrPipelineOptimizations

BUG=skia:

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

8 years agoAdded class AutoFragmentChildProcAdvance to be constructed before a child emitCode...
wangyix [Tue, 18 Aug 2015 14:24:29 +0000 (07:24 -0700)]
Added class AutoFragmentChildProcAdvance to be constructed before a child emitCode and destructed after

Fixed wrong indent

Changed auto child advance back to backwards linear search for getting subset of coords and samplers array of a child

Used offset from parent instead of backwards linear search to find a child proc's coords and transforms in Auto...Advance

append mangleString to variable name in nameVariable()

BUILDS! Added AutoFragmentChildProcAdvance class; fixed a few errors from previous commits

BUG=skia:4182

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

8 years agofix pathops fuzz failures
caryclark [Tue, 18 Aug 2015 14:12:43 +0000 (07:12 -0700)]
fix pathops fuzz failures

If a curve has the identical start and control points, the
initial or final tangent can't be trivally determined. The
perpendicular to the tangent is used to measure coincidence.

Add logic for cubics, quadratics, and conics, to use the
secondary control points or the end points if the initial
control point alone can't determine the tangent.

Add debugging (currently untriggered by exhaustive testing)
to detect zero-length tangents which are not at the curve
endpoints.

Increase the number of temporary intersecions gathered from
10 to 12 but reduce the max passed in by cubic intersection from
27 to 12. Also, add checks if the max passed exceeds the
storage allocated.

When cleaning up parallel lines, choose the intersection which
is on the end of both segments over the intersection which
is on the end of a single segment.

TBR=reed@google.com
BUG=425140,516266

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

8 years agoReland of Fix a few bugs in the google3 sync scripts. (patchset #1 id:1 of https...
benjaminwagner [Tue, 18 Aug 2015 13:25:14 +0000 (06:25 -0700)]
Reland of Fix a few bugs in the google3 sync scripts. (patchset #1 id:1 of https://codereview.chromium.org/1295213002/ )

Reason for revert:
Retry.

Original issue's description:
> Revert of Fix a few bugs in the google3 sync scripts. (patchset #1 id:1 of https://codereview.chromium.org/1291343006/ )
>
> Reason for revert:
> MacMini buildbots were unable to apply the patch.
> fatal: Could not parse object '18af0a0080cc2b2b3464292d35a0886cdade551f'.
> http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release/builds/1580
> http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Debug/builds/1474
> http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Release/builds/1566
> http://build.chromium.org/p/client.skia/builders/Perf-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Release/builds/1480
> http://build.chromium.org/p/client.skia/builders/Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release/builds/1456
> http://build.chromium.org/p/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/1364
>
>
> Original issue's description:
> > Fix a few bugs in the google3 sync scripts.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/18af0a0080cc2b2b3464292d35a0886cdade551f
>
> TBR=mtklein@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e349d6b92574c1b0acdb4ba1ed8ff905ea830131

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

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

8 years agoPrivatize GrBatch subclass overrides
bsalomon [Tue, 18 Aug 2015 13:05:14 +0000 (06:05 -0700)]
Privatize GrBatch subclass overrides

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

8 years agoRemove a couple zombie pathops files.
mtklein [Tue, 18 Aug 2015 12:51:56 +0000 (05:51 -0700)]
Remove a couple zombie pathops files.

These files don't compile and are not referenced by any GYP file.

BUG=skia:

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

8 years agoRemove SkOpts_sse2.cpp.
mtklein [Tue, 18 Aug 2015 12:18:52 +0000 (05:18 -0700)]
Remove SkOpts_sse2.cpp.

It's sort of pointless: all our clients that will have SSE2 at runtime have it
unconditionally at compile time, so the functions in namespace portable will
pick up the SSE2 code.  The procs in SkOpts_sse2.o were just duplicate code.

A couple of the procs we had in _sse2.cpp can benefit slightly when compiled
with SSSE3.  I've moved those to _ssse3.cpp.  This should lead to small speedups
on platforms like Linux and Windows that have a baseline of SSE2.

Similarly, I've removed the call to Init_neon() when NEON is available globally... it's a no-op.

Renaming namespace portable to something clearer is TBD.

BUG=skia:4117

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

8 years agoRevert[8] "move some public headers into private"
reed [Tue, 18 Aug 2015 01:29:47 +0000 (18:29 -0700)]
Revert[8] "move some public headers into private"

This reverts commit fb28cd2b13d76c324570341e1155aaadc1b532b6.

BUG=skia:
TBR=

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

8 years agoMove normal map creation methods to sk_tools
robertphillips [Mon, 17 Aug 2015 22:04:47 +0000 (15:04 -0700)]
Move normal map creation methods to sk_tools

Split off of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

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