platform/upstream/libSkiaSharp.git
8 years agoAdded TestCreate for SkComposeShader; will pick two random child procs that don...
wangyix [Tue, 8 Sep 2015 22:23:34 +0000 (15:23 -0700)]
Added TestCreate for SkComposeShader;  will pick two random child procs that don't have children of their own.  This prevents creating an arbitrarily large tree of procs.  Also, it will choose a random coefficient mode for the xfermode.

BUG=skia:4182

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

8 years agoskia: Initialize value passed to GetShaderiv in GLBench
hendrikw [Tue, 8 Sep 2015 22:18:56 +0000 (15:18 -0700)]
skia: Initialize value passed to GetShaderiv in GLBench

The command buffer's GetShaderiv and GetProgramiv code checks
that the success value passed in is either -1 or 0.

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

8 years agoMake SkGraphics::Term a no-op, stop calling it.
mtklein [Tue, 8 Sep 2015 22:18:21 +0000 (15:18 -0700)]
Make SkGraphics::Term a no-op, stop calling it.

I'd remove it entirely but Android is calling it explicitly.

BUG=skia:4259

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

8 years agoAdd number of draws to GrGpu stats
joshualitt [Tue, 8 Sep 2015 20:42:05 +0000 (13:42 -0700)]
Add number of draws to GrGpu stats

BUG=skia:

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

8 years agoUpdate documentation of colors on Status.
benjaminwagner [Tue, 8 Sep 2015 19:51:23 +0000 (12:51 -0700)]
Update documentation of colors on Status.

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

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

8 years agoRevert[2] of "switch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE"
reed [Tue, 8 Sep 2015 18:02:04 +0000 (11:02 -0700)]
Revert[2] of "switch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE"

master-skia has been updated to use isABitmap

This reverts commit ff390c9bdd852405d9dc0fd5e384b1f935d8df08.

BUG=skia:

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

8 years agoRe-enable nvpr text rendering in DM.
bsalomon [Tue, 8 Sep 2015 17:26:51 +0000 (10:26 -0700)]
Re-enable nvpr text rendering in DM.

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

8 years agoemitChild() used to generate a mangled outputColor based on the parent's outputColor...
wangyix [Tue, 8 Sep 2015 15:41:51 +0000 (08:41 -0700)]
emitChild() used to generate a mangled outputColor based on the parent's outputColor; now it just accepts an outputColor string.  It's now up to the programmer to declare outputColors if needed before emitting child code.

BUG=skia:4182

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

8 years agorefactor parts of SkGr.cpp for use by SkImages
reed [Tue, 8 Sep 2015 15:37:36 +0000 (08:37 -0700)]
refactor parts of SkGr.cpp for use by SkImages

BUG=skia:

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

8 years agoPort SkLazyFnPtr users to SkOncePtr.
mtklein [Tue, 8 Sep 2015 15:19:33 +0000 (08:19 -0700)]
Port SkLazyFnPtr users to SkOncePtr.

First baby step on road to replacing SkLazyFnPtr, SkLazyPtr, and SkOnce.

One of those very unusual times you get to use a function type,
not a function pointer type!

BUG=skia:

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

8 years agoComments: note existance of SkImage::newShader next to CreateBitmapShader
halcanary [Tue, 8 Sep 2015 14:12:25 +0000 (07:12 -0700)]
Comments: note existance of SkImage::newShader next to CreateBitmapShader

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

8 years agoCreate module system for VisualBench
joshualitt [Tue, 8 Sep 2015 14:08:11 +0000 (07:08 -0700)]
Create module system for VisualBench

The newly created VisualLightweightBenchModule is just the old VisualBench.cpp, but gutted to only include timing code.

Future CLs will harden this abstraction, but for this CL the module owns a backpointer to VisualBench.cpp for a couple of calls.

BUG=skia:

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

8 years agoRevert of Provides multiple implementations of Android's SkBitmapRegionDecoder (patch...
msarett [Tue, 8 Sep 2015 13:59:48 +0000 (06:59 -0700)]
Revert of Provides multiple implementations of Android's SkBitmapRegionDecoder (patchset #16 id:360001 of https://codereview.chromium.org/1288963002/ )

Reason for revert:
Breaking Android bots
Bad use of the utils folder

Original issue's description:
> Provides various implementations of Android's SkBitmapRegionDecoder.
>
> Implements testing in DM for these implementations.
>
> nanobench testing will follow after this.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/76f755e6d54a32f9887ad254ce59a3a62f28bde4

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

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

8 years agoRevert of switch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE (patchset...
scroggo [Tue, 8 Sep 2015 13:24:08 +0000 (06:24 -0700)]
Revert of switch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE (patchset #3 id:40001 of https://codereview.chromium.org/1311963007/ )

Reason for revert:
Broke the Android canary:

  https://internal.skia.org/builders/crimson-cherry-474438/builds/124

Original issue's description:
> switch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/2d126b5c45e65a67a9945afa9294038a8eb3f2c8

TBR=reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoskia: use msaaConfigAttribList for SkOSWindow_win
hendrikw [Tue, 8 Sep 2015 12:53:23 +0000 (05:53 -0700)]
skia: use msaaConfigAttribList for SkOSWindow_win

eglChooseConfig was still being passed configAttribList, pass
msaaConfigAttribList instead

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

8 years agoAdd skstd::unique_ptr and use it.
bungeman [Mon, 7 Sep 2015 19:45:52 +0000 (12:45 -0700)]
Add skstd::unique_ptr and use it.

TBR=bsalomon@google.com
The one gpu include change is just to fix swap in implementation.

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

8 years agoswitch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE
reed [Mon, 7 Sep 2015 18:10:30 +0000 (11:10 -0700)]
switch to isABitmap, deprecate SK_SUPPORT_LEGACY_SHADERBITMAPTYPE

BUG=skia:
TBR=

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

8 years agoScanline decoding for gifs
msarett [Mon, 7 Sep 2015 15:54:01 +0000 (08:54 -0700)]
Scanline decoding for gifs

BUG=skia:

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

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

8 years agoUpdate SKP version
rmistry [Sun, 6 Sep 2015 07:20:11 +0000 (00:20 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

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

8 years agoRevert of Scanline decoding for gifs (patchset #15 id:380001 of https://codereview...
jcgregorio [Sat, 5 Sep 2015 17:16:28 +0000 (10:16 -0700)]
Revert of Scanline decoding for gifs (patchset #15 id:380001 of https://codereview.chromium.org/1305123002/ )

Reason for revert:
Breaks the build with SkScanlineDecoder.h not found:

http://build.chromium.org/p/client.skia/builders/Linux%20Builder/builds/3722/steps/compile/logs/stdio

../../third_party/skia/src/utils/SkBitmapRegionCanvas.h:10:10: fatal error: 'SkScanlineDecoder.h' file not found
#include "SkScanlineDecoder.h"

Original issue's description:
> Scanline decoding for gifs
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e9c10b9121887e8c300bd41357461418e061984d

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

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

8 years agoRevert of Parallel cache - preliminary (patchset #22 id:420001 of https://codereview...
herb [Fri, 4 Sep 2015 21:19:45 +0000 (14:19 -0700)]
Revert of Parallel cache - preliminary  (patchset #22 id:420001 of https://codereview.chromium.org/1264103003/ )

Reason for revert:
Seems to freeze android devices.

Original issue's description:
> Parallel cache.
>
> TBR=reed@google.com
>
> BUG=skia:1330
>
> Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f

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

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

8 years agoScanline decoding for gifs
msarett [Fri, 4 Sep 2015 20:28:25 +0000 (13:28 -0700)]
Scanline decoding for gifs

BUG=skia:

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

8 years agoBot fix
msarett [Fri, 4 Sep 2015 20:12:55 +0000 (13:12 -0700)]
Bot fix

https://codereview.chromium.org/1311503008
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage/builds/1083/steps/build%20dm/logs/stdio

BUG=skia:

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

8 years agoProvides various implementations of Android's SkBitmapRegionDecoder.
msarett [Fri, 4 Sep 2015 20:00:49 +0000 (13:00 -0700)]
Provides various implementations of Android's SkBitmapRegionDecoder.

Implements testing in DM for these implementations.

nanobench testing will follow after this.

BUG=skia:

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

8 years agoHandle zero-length encoded images gracefully during deserialization
fmalita [Fri, 4 Sep 2015 18:36:39 +0000 (11:36 -0700)]
Handle zero-length encoded images gracefully during deserialization

Image encoding may fail during serialization, resulting in zero-length
encoded data in the SKP.

Instead of invalidating the stream (and preventing deserialization of
the whole picture) we can instantiate placeholder images.

BUG=skia:4285
R=reed@google.com,robertphillips@google.com

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

8 years agoIco bug fix for opaque embedded images
msarett [Fri, 4 Sep 2015 17:53:53 +0000 (10:53 -0700)]
Ico bug fix for opaque embedded images

BUG=skia:

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

8 years agoParallel cache.
herb [Fri, 4 Sep 2015 17:38:58 +0000 (10:38 -0700)]
Parallel cache.

TBR=reed@google.com

BUG=skia:1330

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

8 years agoSkOncePtr
mtklein [Fri, 4 Sep 2015 17:26:27 +0000 (10:26 -0700)]
SkOncePtr

New abstraction to replace all of: SkOnce, SkLazyPtr, SkLazyFnPtr.

BUG=skia:

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

8 years agodraw 3 moveTos followed by various others [moves, lines, closes]
reed [Fri, 4 Sep 2015 17:03:26 +0000 (10:03 -0700)]
draw 3 moveTos followed by various others [moves, lines, closes]

BUG=skia:

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

8 years agoremove duplicated sample (already have a gm)
reed [Fri, 4 Sep 2015 17:03:22 +0000 (10:03 -0700)]
remove duplicated sample (already have a gm)

BUG=skia:

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

8 years agoFix SkOneShotDiscardablePixelRef to return discardable segment.
ssid [Fri, 4 Sep 2015 15:29:24 +0000 (08:29 -0700)]
Fix SkOneShotDiscardablePixelRef to return discardable segment.

The SkOneShotDiscardablePixelRef was not overriding
diagnostic_only_getDiscardable method of SkPixelRef. This caused the
memory to be acocunted under malloc instead of discardable and caused
wrong accounting.

BUG=528295

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

8 years agoMinor tweak to visual bench timing
joshualitt [Fri, 4 Sep 2015 14:48:41 +0000 (07:48 -0700)]
Minor tweak to visual bench timing

BUG=skia:

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

8 years agoupdate gm test size to include new elements
caryclark [Fri, 4 Sep 2015 13:19:48 +0000 (06:19 -0700)]
update gm test size to include new elements

TBR=
BUG=skia:562

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

8 years agochange for issue 562
caryclark [Fri, 4 Sep 2015 12:20:32 +0000 (05:20 -0700)]
change for issue 562

Add a current version of the patch described in issue 562.

Of interest: the reference row, which is described in the
bug as looking correct draws differently with Ganesh.

TBR=senorblanco
BUG=skia:562

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

8 years agoremove unused fields from SkOpSegment
caryclark [Fri, 4 Sep 2015 12:00:15 +0000 (05:00 -0700)]
remove unused fields from SkOpSegment

TBR=reed@google.com

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

8 years agoCMAKE + install command
halcanary [Thu, 3 Sep 2015 21:23:17 +0000 (14:23 -0700)]
CMAKE + install command

NOTRY=true

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

8 years agoMinor code cleanup (left over from prior CL)
robertphillips [Thu, 3 Sep 2015 20:32:33 +0000 (13:32 -0700)]
Minor code cleanup (left over from prior CL)

This was requested in https://codereview.chromium.org/1309543012/ (Add new GM to directly exercise perspective bitmap drawing)

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

8 years agoClean up some lint complaints
robertphillips [Thu, 3 Sep 2015 19:58:48 +0000 (12:58 -0700)]
Clean up some lint complaints

BUG=skia:4287

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

8 years agoAppurify bot: don't use flags that visualbench doesn't support
borenet [Thu, 3 Sep 2015 19:31:26 +0000 (12:31 -0700)]
Appurify bot: don't use flags that visualbench doesn't support

Depends on https://codereview.chromium.org/1320423005/
BUG=skia:4277

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

8 years agoFix memory leak in build example
mdempsky [Thu, 3 Sep 2015 19:19:23 +0000 (12:19 -0700)]
Fix memory leak in build example

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1319703004

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

8 years agoadb_wait_for_device: Skip `adb wait-for-device`
borenet [Thu, 3 Sep 2015 17:41:07 +0000 (10:41 -0700)]
adb_wait_for_device: Skip `adb wait-for-device`

This should still wait for the device to be attached and finished
booting, but will prevent no-output timeouts due to
`adb wait-for-device` never finishing.

The effect should be that, when an Android device is disconnected, the
"wait for device" step will run forever, or until the device
reconnects. This should prevent a disconnected device from spreading
purple all over the status page.

BUG=skia:

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

8 years agoAdd some useful information to trooper doc.
benjaminwagner [Thu, 3 Sep 2015 16:06:30 +0000 (09:06 -0700)]
Add some useful information to trooper doc.

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

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

8 years agoWill try composing a linear gradient with a color bitmap as well as an alpha8 bitmap...
wangyix [Thu, 3 Sep 2015 15:32:22 +0000 (08:32 -0700)]
Will try composing a linear gradient with a color bitmap as well as an alpha8 bitmap to make sure the paint's color is being used/ignored in the right places.

BUG=skia:4182

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

8 years agoAdd new GM to directly exercise perspective bitmap drawing
robertphillips [Thu, 3 Sep 2015 15:32:08 +0000 (08:32 -0700)]
Add new GM to directly exercise perspective bitmap drawing

BUG=skia:3326

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

8 years agoMissing EncodeData(SkImageInfo...) in SkImageEncoder_empty
fmalita [Thu, 3 Sep 2015 14:47:22 +0000 (07:47 -0700)]
Missing EncodeData(SkImageInfo...) in SkImageEncoder_empty

TBR=reed@google.com,msarett@google.com

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

8 years agoAdd a SkPixelSerializer SkImage encode variant
fmalita [Thu, 3 Sep 2015 14:17:25 +0000 (07:17 -0700)]
Add a SkPixelSerializer SkImage encode variant

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

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

8 years agoadd interactive xfer sample
reed [Thu, 3 Sep 2015 02:05:10 +0000 (19:05 -0700)]
add interactive xfer sample

BUG=skia:
TBR=

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

8 years agoTesting CQ committer list
rmistry [Wed, 2 Sep 2015 23:25:17 +0000 (16:25 -0700)]
Testing CQ committer list

BUG=skia:
NOTRY=true
TBR=

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

8 years agoFix bug in ico decodes
msarett [Wed, 2 Sep 2015 23:23:42 +0000 (16:23 -0700)]
Fix bug in ico decodes

Some icos have been looking a bit strange in Gold.

Looks like the cause was that we were decoding to kUnpremul
accidentally.

BUG=skia:

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

8 years agoMoved committer list to chrome-infra-auth and deleted it from the repo
sergiyb [Wed, 2 Sep 2015 20:37:54 +0000 (13:37 -0700)]
Moved committer list to chrome-infra-auth and deleted it from the repo

R=rmistry@chromium.org
BUG=chromium:511311

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

8 years agoRemove unwanted images in Gold
msarett [Wed, 2 Sep 2015 20:20:52 +0000 (13:20 -0700)]
Remove unwanted images in Gold

These extra outputs were caused by recent changes to
push_codec_srcs.
https://codereview.chromium.org/1327433003/

*** First, I would argue that we do not want to test
"native" modes (ex: codec, scanline, etc) to scales
that require sampling (ex: 0.1, 0.2, etc).  Right now,
we are trying to scale jpegs to 0.1, settling for 0.125
as the closest option, and then trying to compare the
0.125 scaled image to the actual 0.1 scaled image in
Gold.

*** Second, I messed up and caused our test setup to
try to decode to kIndex8 and kGray8 "always" instead
of only when it is recommended.  The bad effect of this
happens because we can decode jpegs to kGray8 even if
they are color images.  Right now in Gold, we have a
bunch of untriaged gray versions of color images.

The second issue would have been caught if we signaled
a fatal failure for invalid conversions.  Maybe we should
look into this now that 565 is supported everywhere?

BUG=skia:

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

8 years agoGive reason while file open failed.
bungeman [Wed, 2 Sep 2015 19:41:35 +0000 (12:41 -0700)]
Give reason while file open failed.

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

8 years agoAdd new surface flag
jvanverth [Wed, 2 Sep 2015 19:26:10 +0000 (12:26 -0700)]
Add new surface flag

TBR=bsalomon@google.com

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

8 years agoRevert of Minor cleanup in GrTessellatingPathRenderer. (patchset #1 id:1 of https...
senorblanco [Wed, 2 Sep 2015 16:05:17 +0000 (09:05 -0700)]
Revert of Minor cleanup in GrTessellatingPathRenderer. (patchset #1 id:1 of https://codereview.chromium.org/1322023002/ )

Reason for revert:
Patch is incorrect -- floating point errors can cause zero-area monotone polys to be skipped, resulting in a smaller vertex count than estimated.

Reproduce as follows:

out/Debug/SampleApp --slide Fuzzer --msaa 4

switch to GPU mode. Result:

../../src/gpu/batches/GrTessellatingPathRenderer.cpp:1500: failed assertion "static_cast<int>(end - verts) == vertexCount"

Original issue's description:
> Minor cleanup in GrTessellatingPathRenderer.
>
> Vertex counts are always exact, so don't bother handling the case
> where they're different. Just assert.
> Rename variables to reflect.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/9389b871c3b0f06bb34626cf9bdbfe0c93779327

TBR=bsalomon@google.com,senorblanco@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

8 years agoRemove GrAddPathRenderers_default
joshualitt [Wed, 2 Sep 2015 15:42:16 +0000 (08:42 -0700)]
Remove GrAddPathRenderers_default

BUG=skia:

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

8 years agoReplace font name table access with standard Skia function.
caryclark [Wed, 2 Sep 2015 15:08:32 +0000 (08:08 -0700)]
Replace font name table access with standard Skia function.

Remove partial name detection.

Fix typo in custom deserializer to use the sk_ truncated font name.

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

8 years agoforgot base impl
reed [Wed, 2 Sep 2015 14:06:23 +0000 (07:06 -0700)]
forgot base impl

BUG=skia:
TBR=fmalita

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

8 years agoFix for distancefield text uses override descriptor
joshualitt [Wed, 2 Sep 2015 13:13:39 +0000 (06:13 -0700)]
Fix for distancefield text uses override descriptor

BUG=skia:4282

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

8 years agoVisualBenchTest: Read nanobench_flags.txt
borenet [Wed, 2 Sep 2015 13:04:29 +0000 (06:04 -0700)]
VisualBenchTest: Read nanobench_flags.txt

BUG=skia:4093

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

8 years agoSpecify try_job_retry_config for Skia try jobs
rmistry [Wed, 2 Sep 2015 12:23:23 +0000 (05:23 -0700)]
Specify try_job_retry_config for Skia try jobs

Retry config support was added to the CQ in https://chromereviews.googleplex.com/240527013/
This CL uses the retry config in Skia's cq.cfg file.

CQ's default failure_retry_weight is 1. We set it to 2 which will immediately go beyond the try job quota and will not retry for failures. It will retry for transient errors.

BUG=chromium:522460
TBR=mtklein
NOTRY=true

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

8 years agoVarious improvements to CodecSrc testing in dm
msarett [Tue, 1 Sep 2015 21:57:57 +0000 (14:57 -0700)]
Various improvements to CodecSrc testing in dm

*** Add CodecMode and ScaledCodecMode (in place of
NormalMode), so now we test SkCodec's getPixels() and
SkScaledCodec's getPixels()

*** Don't attempt to test scanline and codec modes using
the dimensions that were recommended for SkScaledCodec.

*** Change tags so that each scale gets its own output
folder.

TODO: Make ScanlineMode and ScanlineSubsetMode support
kOutOfOrder etc.  I think this belongs with the gif CL -
I don't want to add test modes that we don't run yet.

BUG=skia:4202
BUG=skia:4238

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

8 years agoFix bmp bug in ReadHeader()
msarett [Tue, 1 Sep 2015 21:40:46 +0000 (14:40 -0700)]
Fix bmp bug in ReadHeader()

For BmpMaskCodecs, we need to skip any offset after the
header to get to the start of pixel data.

Before this fix, we only skipped this data when codecOut
is non-NULL (instead of on every call to ReadHeader()).

https://gold.skia.org/search?q=1&neg=true&unt=false&query=name%3Drgb16-565pal.bmp_0.200%26name%3Drgb16-565pal.bmp%26name%3Drgb16-565pal.bmp_0.250%26name%3Drgb16-565pal.bmp_0.333%26name%3Drgb16-565pal.bmp_0.375%26name%3Drgb16-565pal.bmp_0.400%26name%3Drgb16-565pal.bmp_0.500%26source_type%3Dimage
BUG=skia:

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

8 years agoExperimental: fix document
halcanary [Tue, 1 Sep 2015 20:44:22 +0000 (13:44 -0700)]
Experimental: fix document

NOTRY=true

TBR=

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

8 years agoExperimental: document that cmake + c api example now works in Ubuntu.
halcanary [Tue, 1 Sep 2015 20:37:02 +0000 (13:37 -0700)]
Experimental: document that cmake + c api example now works in Ubuntu.

NOTRY=true

TBR=

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

8 years agoRemove an extra newline in documentation.
halcanary [Tue, 1 Sep 2015 20:25:02 +0000 (13:25 -0700)]
Remove an extra newline in documentation.

TBR=
NOTRY=true

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

8 years agoStop using SkScalerContext::getAdvance() in SkGlyphCache.
mtklein [Tue, 1 Sep 2015 19:32:24 +0000 (12:32 -0700)]
Stop using SkScalerContext::getAdvance() in SkGlyphCache.

We think it'll simplify things to just always get the full metrics.
On most platforms, it's no different, and we think the platforms that
do differ (FreeType) will be nearly just as cheap.

Removing this distinction helps us make SkGlyphCaches concurrent by
removing a state (we-have-only-advances) from its logical state machine.

We see no significant changes running SKPs before and after this CL.
That makes sense, of course, because the SKPs bake some of this into drawPosText.

BUG=skia:

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

8 years agoadd preroll to image, for chrome's warmup pass
reed [Tue, 1 Sep 2015 19:22:32 +0000 (12:22 -0700)]
add preroll to image, for chrome's warmup pass

BUG=skia:

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

8 years agoRestore old NEON blit_mask_d32_a8 methods.
mtklein [Tue, 1 Sep 2015 18:03:11 +0000 (11:03 -0700)]
Restore old NEON blit_mask_d32_a8 methods.

As you'll see from the BUG line, we have a strong indication that the new Sk4px
methods regress some devices.  This restores the old code back as literally as possible
while still fitting in SkOpts framework.

This is ideally temporary breathing room.

We should get an early indication of if those bugs will improve by watching https://perf.skia.org/#4004

BUG=skia:4117,525844,519596,524149

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

8 years agoDocumentation: C API comments
halcanary [Tue, 1 Sep 2015 17:45:09 +0000 (10:45 -0700)]
Documentation: C API comments

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

8 years agoCmake: fix to make linking work on Ubuntu
halcanary [Tue, 1 Sep 2015 17:11:44 +0000 (10:11 -0700)]
Cmake: fix to make linking work on Ubuntu

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

8 years agoC API: Add SK_API, also documentation of an example.
halcanary [Tue, 1 Sep 2015 17:01:38 +0000 (10:01 -0700)]
C API: Add SK_API, also documentation of an example.

SK_API = __declspec(dllexport) / __attribute__((visibility("default")))

Also, add documentation in experimental/c-api-example/c.md

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

8 years agoAdded SkComposeShader GPU implementation
wangyix [Tue, 1 Sep 2015 16:45:08 +0000 (09:45 -0700)]
Added SkComposeShader GPU implementation

moved onCreateGLInstance() to private in GrComposeEffect

Added SkComposeShader gpu implementation; composeshader gm is unchanged

BUG=skia:4182

TBR=bsalomon@google.com

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

8 years agoCMake tweaks
mtklein [Tue, 1 Sep 2015 16:22:31 +0000 (09:22 -0700)]
CMake tweaks
  - I think CMake 3.1 is enough for now.
  - Ubuntu works too.

BUG=skia:4269

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

8 years agoskia: Replace CommandBuffer_ with egl
hendrikw [Tue, 1 Sep 2015 16:08:00 +0000 (09:08 -0700)]
skia: Replace CommandBuffer_ with egl

I ended up exporting the egl functions directly, so this
needs to change on the skia side as well

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

8 years agoLimit lifetime of GrDrawContext objects
robertphillips [Tue, 1 Sep 2015 15:34:28 +0000 (08:34 -0700)]
Limit lifetime of GrDrawContext objects

GrDrawContext's are about to become real allocated objects. This CL sets up the machinery so they won't leak.

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

8 years agoRemove GrGpuTraceMarker hooks until we rethink the design
joshualitt [Tue, 1 Sep 2015 15:19:46 +0000 (08:19 -0700)]
Remove GrGpuTraceMarker hooks until we rethink the design

TBR=bsalomon@google.com
BUG=526308

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

8 years agoGrGLBlend::AppendPorterDuffBlend now supports kClear_Mode
wangyix [Tue, 1 Sep 2015 14:56:14 +0000 (07:56 -0700)]
GrGLBlend::AppendPorterDuffBlend now supports kClear_Mode

BUG=skia:4182

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

8 years agoVarious minor cross-platform changes
jvanverth [Tue, 1 Sep 2015 14:16:46 +0000 (07:16 -0700)]
Various minor cross-platform changes

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

8 years agoSkColorCubeFilter_opts: rounding is actually free here.
mtklein [Tue, 1 Sep 2015 14:09:22 +0000 (07:09 -0700)]
SkColorCubeFilter_opts: rounding is actually free here.

(Sk4f(float) is statically initializable, unlike the old SkPMFlor(SkPMColor).)

BUG=skia:4117

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

8 years agoMove PathRenderers to batches folder
joshualitt [Tue, 1 Sep 2015 13:50:55 +0000 (06:50 -0700)]
Move PathRenderers to batches folder

BUG=skia:

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

8 years agoCall standard libjpeg/libjpeg-turbo APIs
msarett [Tue, 1 Sep 2015 13:43:41 +0000 (06:43 -0700)]
Call standard libjpeg/libjpeg-turbo APIs

BUG=skia:

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

8 years agoRequire Sk4f::toBytes() clamps
mtklein [Tue, 1 Sep 2015 13:29:45 +0000 (06:29 -0700)]
Require Sk4f::toBytes() clamps

BUG=skia:4117

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;client.skia.android:Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Release-Trybot

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

8 years agolink test to bug
caryclark [Tue, 1 Sep 2015 13:22:36 +0000 (06:22 -0700)]
link test to bug

crbug.com/526025 includes a minimized SVG test case.
Translating that test case into native code (fuzzTNG)
did not reproduce the bug. That test case should
have not been included with skia issue 1323813003,
and is deleted here.

Running the minimal test case in a modified version
of chrome isolated the bug. The modified version
generated the test fuzz763_3 with the edit

#define DEBUGGING_PATHOPS_FROM_HOST 1

in src/pathops/SkPathopsOp.cpp line 188.

Rename fuzz763_3 to issue_526025 to associate the test
with the bug. Note that the bug contains the body of the
CL in comment $5.

R=reed@google.com

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

8 years agoMake GrTextContext no longer store a GrDrawContext
robertphillips [Tue, 1 Sep 2015 12:36:47 +0000 (05:36 -0700)]
Make GrTextContext no longer store a GrDrawContext

This, at least, makes GrTextContexts no longer bound to a single GrDrawContext. (Passing in a RenderTarget and praying it matched the DrawContext was always a bit fishy too).

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

8 years agoImage generator-backed SkPictureShader
fmalita [Tue, 1 Sep 2015 02:54:03 +0000 (19:54 -0700)]
Image generator-backed SkPictureShader

A respin of http://crrev.com/866773002

R=reed@google.com

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

8 years agoClean up remaining users of SkPMFloat
mtklein [Mon, 31 Aug 2015 22:26:08 +0000 (15:26 -0700)]
Clean up remaining users of SkPMFloat

This switches over SkXfermodes_opts.h and SkColorMatrixFilter to use Sk4f,
and converts the SkPMFloat benches to Sk4f benches.

No pixels should change here, and no code beyond the Sk4f_ benches should change speed.
The benches are faster than the old versions.

BUG=skia:4117

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

8 years agosimplify bitmap scaler and cache
reed [Mon, 31 Aug 2015 22:16:17 +0000 (15:16 -0700)]
simplify bitmap scaler and cache

BUG=skia:

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

8 years agoMove float<->byte conversions into Sk4f.
mtklein [Mon, 31 Aug 2015 21:39:59 +0000 (14:39 -0700)]
Move float<->byte conversions into Sk4f.

This lets us avoid conversions to [0.0, 1.0] space and rounding that aren't necessary
for SkColorCubeFilter_opts.h.

Dropping rounding on the way back to bytes means we'll see a bunch of off-by-1 diffs.

Rough perf effect:
  SSSE3: 110 -> 93  (~15%)
  NEON: 465 -> 375  (~20%)

This is the beginning of the end for SkPMFloat as an entity distinct from Sk4f.
I've kept it for now so I can convert sites one by one and think about how things
that really want to keep PM color order will work.

BUG=skia:4117

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

8 years agoDocument SkString::resize(int) as destructive.
bungeman [Mon, 31 Aug 2015 21:36:48 +0000 (14:36 -0700)]
Document SkString::resize(int) as destructive.

It is easy to think in some cases that SkString::resize(int) is not
destructive, since optimizations mean that most of the time the data
is still there after a resize. However, in the general case, the
original string's data is lost and the new SkString contains garbage.

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

8 years agoAdd empty files to empty targets to appease XCode.
mtklein [Mon, 31 Aug 2015 21:21:08 +0000 (14:21 -0700)]
Add empty files to empty targets to appease XCode.

BUG=skia:4117

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

8 years agoMinor cleanup in GrTessellatingPathRenderer.
senorblanco [Mon, 31 Aug 2015 19:42:23 +0000 (12:42 -0700)]
Minor cleanup in GrTessellatingPathRenderer.

Vertex counts are always exact, so don't bother handling the case
where they're different. Just assert.
Rename variables to reflect.

BUG=skia:

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

8 years agoRename flag from "distance field" to "device independent."
bsalomon [Mon, 31 Aug 2015 19:39:41 +0000 (12:39 -0700)]
Rename flag from "distance field" to "device independent."

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

8 years agoRevert of By default purge resources that haven't been used for 64 flushes (patchset...
bsalomon [Mon, 31 Aug 2015 18:37:57 +0000 (11:37 -0700)]
Revert of By default purge resources that haven't been used for 64 flushes (patchset #4 id:60001 of https://codereview.chromium.org/1316233003/ )

Reason for revert:
Breaking again

Original issue's description:
> By default purge resources that haven't been used for 64 flushes
>
> BUG=skia:4258
>
> Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104
>
> R=robertphillips@google.com
>
> Committed: https://skia.googlesource.com/skia/+/71d0c33068d41878cc3117f3761f49300f6b3d54
>
> Committed: https://skia.googlesource.com/skia/+/bd783cd5b62118277b75933c3cd7b9097129259a

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

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

8 years agoAdd a GM for image filters applied to stroked primitives.
senorblanco [Mon, 31 Aug 2015 17:28:49 +0000 (10:28 -0700)]
Add a GM for image filters applied to stroked primitives.

BUG=skia:3194

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

8 years agoremove duplicate linked list adjustment
caryclark [Mon, 31 Aug 2015 16:46:20 +0000 (09:46 -0700)]
remove duplicate linked list adjustment

The list of intersection points on a curve segment may have
entries that can be safely removed when nearby points have
nearly the same t value and point value. When a path includes
very large curves as well as small ones, as is the case with
this fuzzer, additional points may lie between the similar
points that do not meet the nearby criteria.

After merging the nearby point with its doppelganger,
SkOpSegment::moveNearby() unnecessarily set the doppelganger's
next pointer to the one following the nearby point. While
this usually has no effect, since the merge already updated
the linked list, the explicit call removes the additional
outlier points from the segment.

TBR=reed@google.com
BUG=526025

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

8 years agoRun Appurify bot in release mode
borenet [Mon, 31 Aug 2015 16:30:57 +0000 (09:30 -0700)]
Run Appurify bot in release mode

BUG=skia:4093

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

8 years agoSuppress embedding fonts when the skp's fonts match the OS fonts.
caryclark [Mon, 31 Aug 2015 16:22:38 +0000 (09:22 -0700)]
Suppress embedding fonts when the skp's fonts match the OS fonts.

The million SKPs generated require >5T of storage. A good deal
of that are copies of system fonts.

Chrome built with
#DEFINE SK_WHITELIST_SERIALIZED_TYPEFACES
will omit the font data if the font matches a precomputed
checksum.

The captured SKP prepends sk_ to the names of fonts that
have their data omitted. The SKP consumer can either add
renamed fonts from the recording machine, or add

gDeserializeTypefaceDelegate = WhitelistDeserializeTypeface;

which strips the sk_ prefix when deserializing typefaces.

whitelist_typefaces --check
Computes the checksums of fallback
fonts and returns 0 if the checksums match the checked-in
file SkWhitelistChecksum.cpp.

whitelist_typefaces --generate
Writes an updated version of SkWhitelistChecksum.cpp.

(Added Mike since this modifies a public header)

R=bungeman@google.com,rmistry@google.com,reed@google.com

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

8 years agoUse a different download URL for Android toolchains
borenet [Mon, 31 Aug 2015 15:35:32 +0000 (08:35 -0700)]
Use a different download URL for Android toolchains

The current one isn't working on the Appurify bot

BUG=skia:4093

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

8 years agoBy default purge resources that haven't been used for 64 flushes
bsalomon [Mon, 31 Aug 2015 15:25:03 +0000 (08:25 -0700)]
By default purge resources that haven't been used for 64 flushes

BUG=skia:4258

Committed: https://skia.googlesource.com/skia/+/85047175508a24f43eef49359bed215a2a3bb104

R=robertphillips@google.com

Committed: https://skia.googlesource.com/skia/+/71d0c33068d41878cc3117f3761f49300f6b3d54

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

8 years agoProvide some detail about valentine password
benjaminwagner [Mon, 31 Aug 2015 14:27:24 +0000 (07:27 -0700)]
Provide some detail about valentine password

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

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