platform/upstream/libSkiaSharp.git
8 years agoAdd SkRecord::defrag().
mtklein [Thu, 19 Nov 2015 15:23:49 +0000 (07:23 -0800)]
Add SkRecord::defrag().

Called by SkRecordOptimize(), this moves all the NoOps to the end and
slices them off.

This implementation with std::remove_if() is linear and doesn't malloc.

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

BUG=skia:

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

8 years agoMove glsl onto EmitArgs struct for emitCode
egdaniel [Thu, 19 Nov 2015 15:23:45 +0000 (07:23 -0800)]
Move glsl onto EmitArgs struct for emitCode

BUG=skia:

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

8 years agoFix leak in drawBitmapNine
egdaniel [Thu, 19 Nov 2015 14:52:50 +0000 (06:52 -0800)]
Fix leak in drawBitmapNine

NOTREECHECKS=true

BUG=skia:

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

8 years ago[Reland] Fix NVPR assert for equivalent ovals
fmalita [Thu, 19 Nov 2015 04:12:56 +0000 (20:12 -0800)]
[Reland] Fix NVPR assert for equivalent ovals

For oval paths, GrPath ignores the point order and only uses the bounds
when building its key.  This is problematic because

1) point order is important when dashing
2) GrStencilAndCoverPathRenderer asserts that the lookup SkPath is equal
   to the cached SkPath - which is not the case for ovals with different
   directions/different point order.

With this CL we no longer use the reduced oval key when dashing, and
instead fall through to the more general path cases.  The assert is
adjusted to accommodate "equivalent" ovals (when not dashing).

Also re-enabled & updated the GpuDrawPath unit test (disabled in
https://codereview.chromium.org/1456463003/, presumably due to the use
of uninitialized SkRects).

R=bsalomon@google.com,robertphillips@google.com,cdalton@nvidia.com

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

8 years agoMake SkTLList prealloc its first block of nodes
bsalomon [Thu, 19 Nov 2015 03:48:50 +0000 (19:48 -0800)]
Make SkTLList prealloc its first block of nodes

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

8 years agoMake block size a template parameter of SkTLList
bsalomon [Thu, 19 Nov 2015 03:01:12 +0000 (19:01 -0800)]
Make block size a template parameter of SkTLList

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

8 years agoRevert SkBlitMask_opts.h back to hand-coded NEON.
mtklein [Thu, 19 Nov 2015 02:59:18 +0000 (18:59 -0800)]
Revert SkBlitMask_opts.h back to hand-coded NEON.

SkPx has triggered a bunch of small (2-9%) regressions on NEON devices.

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoRevert of Fix NVPR assert for equivalent ovals (patchset #1 id:1 of https://coderevie...
stephana [Thu, 19 Nov 2015 02:35:56 +0000 (18:35 -0800)]
Revert of Fix NVPR assert for equivalent ovals (patchset #1 id:1 of https://codereview.chromium.org/1457073002/ )

Reason for revert:
Causes failures on Android and Win8:

...
( 137/1245MB      9) 73.9ms unit test  GpuLayerCachec:\0\build\slave\workdir\build\skia\include\private\skuniqueptr.h:164: failed assertion "get() != pointer()"

Caught exception 2147483651 EXCEPTION_BREAKPOINT
...

Original issue's description:
> Fix NVPR assert for equivalent ovals
>
> For oval paths, GrPath ignores the point order and only uses the bounds
> when building its key.  This is problematic because
>
> 1) point order is important when dashing
> 2) GrStencilAndCoverPathRenderer asserts that the lookup SkPath is equal
>    to the cached SkPath - which is not the case for ovals with different
>    directions/different point order.
>
> With this CL we no longer use the reduced oval key when dashing, and
> instead fall through to the more general path cases.  The assert is
> adjusted to accommodate "equivalent" ovals (when not dashing).
>
> Also re-enabled & updated the GpuDrawPath unit test (disabled in
> https://codereview.chromium.org/1456463003/, presumably due to the use
> of uninitialized SkRects).
>
> R=bsalomon@google.com,robertphillips@google.com,cdalton@nvidia.com
>
> Committed: https://skia.googlesource.com/skia/+/f9b1577d763988ebc043ddabf80674f71571ecff

TBR=bsalomon@google.com,cdalton@nvidia.com,robertphillips@google.com,fmalita@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agosimplify insertion methods for SkTLList
bsalomon [Wed, 18 Nov 2015 22:11:08 +0000 (14:11 -0800)]
simplify insertion methods for SkTLList

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

8 years agoFix NVPR assert for equivalent ovals
fmalita [Wed, 18 Nov 2015 22:07:13 +0000 (14:07 -0800)]
Fix NVPR assert for equivalent ovals

For oval paths, GrPath ignores the point order and only uses the bounds
when building its key.  This is problematic because

1) point order is important when dashing
2) GrStencilAndCoverPathRenderer asserts that the lookup SkPath is equal
   to the cached SkPath - which is not the case for ovals with different
   directions/different point order.

With this CL we no longer use the reduced oval key when dashing, and
instead fall through to the more general path cases.  The assert is
adjusted to accommodate "equivalent" ovals (when not dashing).

Also re-enabled & updated the GpuDrawPath unit test (disabled in
https://codereview.chromium.org/1456463003/, presumably due to the use
of uninitialized SkRects).

R=bsalomon@google.com,robertphillips@google.com,cdalton@nvidia.com

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

8 years agoRevert of Fix UB in SkDivBits (patchset #2 id:10002 of https://codereview.chromium...
mtklein [Wed, 18 Nov 2015 22:01:07 +0000 (14:01 -0800)]
Revert of Fix UB in SkDivBits (patchset #2 id:10002 of https://codereview.chromium.org/1455163004/ )

Reason for revert:
Need to reland with #define guards for tiny layout test changes. (Yikes!)

Original issue's description:
> Fix UB in SkDivBits
>
> DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
> This turns numer into a uint32_t to make those defined, and adds a few notes.
>
> x >= 0 is always true for unsigned x, so we needed a few small logic refactors.
>
> BUG=skia:3562
>
> Committed: https://skia.googlesource.com/skia/+/988adddd48322bfa3e3cb0c017cfce71fbbf1123

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

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

8 years agoIn BUILD.public, remove compile-time dependency on GL.
benjaminwagner [Wed, 18 Nov 2015 21:48:47 +0000 (13:48 -0800)]
In BUILD.public, remove compile-time dependency on GL.

BUG=skia:

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

8 years agoAdd small paths GM
jvanverth [Wed, 18 Nov 2015 21:40:15 +0000 (13:40 -0800)]
Add small paths GM

Used to testing caching and quality of distance field paths.

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

8 years agoMake has GrBatchAtlas::ID() inlineable
joshualitt [Wed, 18 Nov 2015 21:37:54 +0000 (13:37 -0800)]
Make has GrBatchAtlas::ID() inlineable

BUG=skia:

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

8 years agoInitial implementation of GPU no filter NinePatch
joshualitt [Wed, 18 Nov 2015 21:28:51 +0000 (13:28 -0800)]
Initial implementation of GPU no filter NinePatch

TBR=bsalomon@google.com
BUG=skia:

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

8 years agoRemove Lua from the Google3 build.
benjaminwagner [Wed, 18 Nov 2015 21:26:10 +0000 (13:26 -0800)]
Remove Lua from the Google3 build.

See internal cl/107087297 for details.

Rename some variables in BUILD/BUILD.public.

BUG=skia:

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

8 years agoFix GOOGLE3 Android build.
benjaminwagner [Wed, 18 Nov 2015 21:14:14 +0000 (13:14 -0800)]
Fix GOOGLE3 Android build.

DebugWriteToStderr isn't defined for Android. I'm not sure if I just didn't test compiling for Android or if this is due to a change in the base library.

BUG=skia:

No public API changes.
TBR=reed@google.com

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

8 years agoUpdate debugger UI to auto-refresh the directory listing
djsollen [Wed, 18 Nov 2015 21:00:21 +0000 (13:00 -0800)]
Update debugger UI to auto-refresh the directory listing

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

8 years ago[debugger] Add visualization of center rect for drawBitmapNine calls
robertphillips [Wed, 18 Nov 2015 20:59:42 +0000 (12:59 -0800)]
[debugger] Add visualization of center rect for drawBitmapNine calls

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

8 years agoFix has_aligned_samples helper for SkGpuDevice::drawTextureProducer
Brian Salomon [Wed, 18 Nov 2015 20:19:57 +0000 (15:19 -0500)]
Fix has_aligned_samples helper for SkGpuDevice::drawTextureProducer

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

8 years agoFix BMP RLE bug
msarett [Wed, 18 Nov 2015 19:43:08 +0000 (11:43 -0800)]
Fix BMP RLE bug

decodeRows() should return an int, not an SkCodec::Result

BUG=skia:

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

8 years agoAdd an example of embedding a Skia Perf graph to the site docs.
jcgregorio [Wed, 18 Nov 2015 19:14:31 +0000 (11:14 -0800)]
Add an example of embedding a Skia Perf graph to the site docs.

This specific page:

  https://skia.org/dev/testing/skiaperf?cl=1462583002

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

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

8 years agorestore dump_record
mtklein [Wed, 18 Nov 2015 19:06:37 +0000 (11:06 -0800)]
restore dump_record

And,
    - 4 space indents
    - print out time units (microseconds)

BUG=skia:

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

8 years agoConvert SkGpuDevice::drawTextureAdjuster to SkGpuDevice::drawTextureProducer
bsalomon [Wed, 18 Nov 2015 18:56:08 +0000 (10:56 -0800)]
Convert SkGpuDevice::drawTextureAdjuster to SkGpuDevice::drawTextureProducer

Move createFragmentProcessor to GrTextureProducer base class.

Make non-tiled sw-bitmap draws go through drawTextureProducer.

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

8 years agoConvert drawText to using the find and place code.
herb [Wed, 18 Nov 2015 18:54:39 +0000 (10:54 -0800)]
Convert drawText to using the find and place code.
BUG=skia:

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

8 years agoFix buffer overrun, bit overrun and add a test.
herb [Wed, 18 Nov 2015 18:50:33 +0000 (10:50 -0800)]
Fix buffer overrun, bit overrun and add a test.

BUG=539691

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

8 years agoFix UB in SkDivBits
mtklein [Wed, 18 Nov 2015 17:56:28 +0000 (09:56 -0800)]
Fix UB in SkDivBits

DIVBITS_ITER was shifting bits up into the sign bit, which is a no-no.
This turns numer into a uint32_t to make those defined, and adds a few notes.

x >= 0 is always true for unsigned x, so we needed a few small logic refactors.

BUG=skia:3562

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

8 years agoClean up dead code: PictureRenderer
mtklein [Wed, 18 Nov 2015 17:41:06 +0000 (09:41 -0800)]
Clean up dead code: PictureRenderer

Doesn't appear to actually be used by anything.

BUG=skia:

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

8 years agoAdd ShaderBuilders to EmitArgs and remove gettings from ProgBuilder.
egdaniel [Wed, 18 Nov 2015 16:01:26 +0000 (08:01 -0800)]
Add ShaderBuilders to EmitArgs and remove gettings from ProgBuilder.

BUG=skia:

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

8 years agostifle Math test on Mac bot too
mtklein [Wed, 18 Nov 2015 15:56:30 +0000 (07:56 -0800)]
stifle Math test on Mac bot too

BUG=skia:3562

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

8 years agoClean up dead code: filter.
mtklein [Wed, 18 Nov 2015 15:45:09 +0000 (07:45 -0800)]
Clean up dead code: filter.

We haven't used this since at least landing the new SkPicture backend.

BUG=skia:

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

8 years agoUpdate all code site issue tracker links to point to bug.skia.org
rmistry [Wed, 18 Nov 2015 14:47:11 +0000 (06:47 -0800)]
Update all code site issue tracker links to point to bug.skia.org

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

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

8 years agoClean up dead code: render_pdfs.
mtklein [Wed, 18 Nov 2015 14:39:01 +0000 (06:39 -0800)]
Clean up dead code: render_pdfs.

DM can do this.

BUG=skia:

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

8 years agoRevert of Parametric contour start GM (patchset #1 id:1 of https://codereview.chromiu...
stephana [Wed, 18 Nov 2015 14:21:35 +0000 (06:21 -0800)]
Revert of Parametric contour start GM (patchset #1 id:1 of https://codereview.chromium.org/1457503002/ )

Reason for revert:
Breaks unit test across various platforms:

../../../src/gpu/batches/GrStencilAndCoverPathRenderer.cpp:75: failed assertion "path->isEqualTo(skPath, stroke)"

Original issue's description:
> Parametric contour start GM
>
> A GM to capture the newly added SkPath API.
>
> BUG=chromium:315277
> R=caryclark@google.com,reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/56847a65648af4d06da9c26c55242949a1bf31ab

TBR=caryclark@google.com,reed@google.com,fmalita@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:315277

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

8 years agoUpdate issue tracker in docs
hcm [Wed, 18 Nov 2015 13:04:08 +0000 (05:04 -0800)]
Update issue tracker in docs

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

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

8 years agoMove SkImage tests from SurfaceTest to ImageTest
kkinnunen [Wed, 18 Nov 2015 06:53:28 +0000 (22:53 -0800)]
Move SkImage tests from SurfaceTest to ImageTest

The general SkImage features seem to be tested in
ImageTest instead of SurfaceTest.

Helps in reviewing further reformatting of SurfaceTest.

BUG=skia:2992

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

8 years agodiv255(x) as ((x+128)*257)>>16 with SSE
mtklein [Tue, 17 Nov 2015 22:19:52 +0000 (14:19 -0800)]
div255(x) as ((x+128)*257)>>16 with SSE

_mm_mulhi_epu16 makes the (...*257)>>16 part simple.
This seems to speed up every transfermode that uses div255(),
in the 7-25% range.

It even appears to obviate the need for approxMulDiv255() on SSE.
I'm not sure about NEON yet, so I'll keep approxMulDiv255() for now.

Should be no pixels change:
https://gold.skia.org/search2?issue=1452903004&unt=true&query=source_type%3Dgm&master=false

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoParametric contour start GM
fmalita [Tue, 17 Nov 2015 21:15:42 +0000 (13:15 -0800)]
Parametric contour start GM

A GM to capture the newly added SkPath API.

BUG=chromium:315277
R=caryclark@google.com,reed@google.com

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

8 years agofix ninepatch iter from generating invalid rects
joshualitt [Tue, 17 Nov 2015 20:11:57 +0000 (12:11 -0800)]
fix ninepatch iter from generating invalid rects

BUG=skia:

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

8 years agotrim some fat from SSE2 fixed point alpha code
mtklein [Tue, 17 Nov 2015 20:05:57 +0000 (12:05 -0800)]
trim some fat from SSE2 fixed point alpha code

  - extract alpha from a pixel: 5 1-cycle ops to 4 1-cycle ops
  - load alphas: drop 4 unnecessary ops

Should be no pixel diffs.

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoSkTextBlob should store per-run text alignment
fmalita [Tue, 17 Nov 2015 19:39:32 +0000 (11:39 -0800)]
SkTextBlob should store per-run text alignment

SkPaint::Align is only observed for kDefault_Positioning AFAICT, but
part of the run logical font nevertheless.

BUG=skia:4567
R=mtklein@google.com,halcanary@google.com

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

8 years agoMake SkAndroidCodec support gif
msarett [Tue, 17 Nov 2015 19:18:03 +0000 (11:18 -0800)]
Make SkAndroidCodec support gif

Involves a few bug fixes in SkCodec_libgif and a bit more
complexity in SkSwizzler.

BUG=skia:4405

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

8 years agoParametric SkPath oval/rect/rrect starting point
fmalita [Tue, 17 Nov 2015 17:53:29 +0000 (09:53 -0800)]
Parametric SkPath oval/rect/rrect starting point

Extend the SkPath API to allow specifying the contour starting point.

This will allow removing the explicit cubic code from Blink/Path.

BUG=chromium:315277
R=reed@google.com,caryclark@google.com

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

8 years agoFix skia_gpu=0 build (samplecode/SampleAnimatedText.cpp)
kkinnunen [Tue, 17 Nov 2015 17:38:05 +0000 (09:38 -0800)]
Fix skia_gpu=0 build (samplecode/SampleAnimatedText.cpp)

Fix skia_gpu=0 build (samplecode/SampleAnimatedText.cpp).

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

8 years agoMake SkAndroidCodec support bmp
msarett [Tue, 17 Nov 2015 16:46:02 +0000 (08:46 -0800)]
Make SkAndroidCodec support bmp

BUG=skia:

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

8 years agosimplify BlendTest.cpp
mtklein [Tue, 17 Nov 2015 16:39:01 +0000 (08:39 -0800)]
simplify BlendTest.cpp

  - streamline the testing down to just byte multiplies
    (that's always where the blend algorithms vary)
  - add another approximate multiply (x*y+255)>>8
  - add another variant of the perfect multiply, ((x*y+128)*257)>>16

I've realized ((x*y+128)*257)>>16 might be just as fast in SSE/NEON
as our current (x*y+x)>>8 approximation.  Good to be testing it here.

BUG=skia:

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

8 years agoImplement multi-color-stops in linear gradients using Sk4f
reed [Tue, 17 Nov 2015 16:12:19 +0000 (08:12 -0800)]
Implement multi-color-stops in linear gradients using Sk4f

#define SK_SUPPORT_LEGACY_LINEAR_GRADIENT_TABLE to restore the old behavior

BUG=skia:517

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

8 years agoDisable testcase7.bmp on SkImageDecoder and clean up dm_flags
msarett [Tue, 17 Nov 2015 15:36:11 +0000 (07:36 -0800)]
Disable testcase7.bmp on SkImageDecoder and clean up dm_flags

testcase7.bmp leaves uninitialized memory.

Also remove "subset" dm flags.  The "subset" test no longer
exists.

BUG=skia:

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

8 years agoAdd decodeYUV8Planes to SkImageDecoder_empty
scroggo [Tue, 17 Nov 2015 15:34:40 +0000 (07:34 -0800)]
Add decodeYUV8Planes to SkImageDecoder_empty

BUG=skia:4562

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

8 years agoRespect SkPictureRecorder::kPlaybackDrawPicture_RecordFlag for SkDrawables
djsollen [Tue, 17 Nov 2015 14:18:31 +0000 (06:18 -0800)]
Respect SkPictureRecorder::kPlaybackDrawPicture_RecordFlag for SkDrawables

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

8 years agoRevert of Enable temporarily disabled GpuDrawPathTest (patchset #1 id:1 of https...
caryclark [Tue, 17 Nov 2015 12:28:15 +0000 (04:28 -0800)]
Revert of Enable temporarily disabled GpuDrawPathTest (patchset #1 id:1 of https://codereview.chromium.org/1447973002/ )

Reason for revert:
broke windows builds

Original issue's description:
> Enable temporarily disabled GpuDrawPathTest
>
> Enable temporarily disabled GpuDrawPathTest.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d6346290c2ef59abee453a72f3e91b4e7b62f4fa

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

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

8 years agoEnable temporarily disabled GpuDrawPathTest
kkinnunen [Tue, 17 Nov 2015 06:12:39 +0000 (22:12 -0800)]
Enable temporarily disabled GpuDrawPathTest

Enable temporarily disabled GpuDrawPathTest.

BUG=skia:

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

8 years agoadd caps option 'k' to FatBits
reed [Tue, 17 Nov 2015 02:57:18 +0000 (18:57 -0800)]
add caps option 'k' to FatBits

BUG=skia:
TBR=

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

8 years agoDe-spam SkOpts.cpp
mtklein [Tue, 17 Nov 2015 01:28:55 +0000 (17:28 -0800)]
De-spam SkOpts.cpp

  - stop printing when we detect sse4.2 and avx2
  - that TODO is pretty well done

BUG=skia:

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

8 years agoupdate iOS build flags
mtklein [Tue, 17 Nov 2015 00:20:34 +0000 (16:20 -0800)]
update iOS build flags

This makes it match OS X build more closely.
The most important change is that CLANG_CXX_LIBRARY sets -stdlib=libc++
for both the compiler and the linker.

BUG=skia:

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

8 years ago__vectorcall needs SSE
mtklein [Tue, 17 Nov 2015 00:20:29 +0000 (16:20 -0800)]
__vectorcall needs SSE

We don't have builders in this mode, but Mozilla does.

BUG=skia:4563

TBR=reed@google.com
No public API changes.

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

8 years agoMake SkAndroidCodec support wbmp
msarett [Mon, 16 Nov 2015 21:43:40 +0000 (13:43 -0800)]
Make SkAndroidCodec support wbmp

BUG=skia:

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

8 years agoruns some sample animations side by side in canvas and svg
caryclark [Mon, 16 Nov 2015 21:36:08 +0000 (13:36 -0800)]
runs some sample animations side by side in canvas and svg

TBR=fmalita@chromium.org

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

8 years agoOnly support jpeg, png, and webp for BRD
msarett [Mon, 16 Nov 2015 21:30:20 +0000 (13:30 -0800)]
Only support jpeg, png, and webp for BRD

This a safety check to ensure that we don't accidentally ship subset
decoders for non-required formats.

BUG=skia:

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

8 years agoincrease pre-allocated MCRecs to match common android calling pattern
reed [Mon, 16 Nov 2015 21:22:24 +0000 (13:22 -0800)]
increase pre-allocated MCRecs to match common android calling pattern

BUG=skia:

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

8 years agoRevert of skstd -> std for unique_ptr (patchset #9 id:160001 of https://codereview...
mtklein [Mon, 16 Nov 2015 21:05:37 +0000 (13:05 -0800)]
Revert of skstd -> std for unique_ptr (patchset #9 id:160001 of https://codereview.chromium.org/1436033003/ )

Reason for revert:
10.9 bots are too old too.

Original issue's description:
> skstd -> std for unique_ptr
>
> TBR=reed@google.com
> No public API changes.
>
> BUG=skia:4564
>
> Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50

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

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

8 years agoskstd -> std for unique_ptr
mtklein [Mon, 16 Nov 2015 20:57:52 +0000 (12:57 -0800)]
skstd -> std for unique_ptr

TBR=reed@google.com
No public API changes.

BUG=skia:4564

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

8 years agoSwitch uses of SkChecksum::Compute to Murmur3.
mtklein [Mon, 16 Nov 2015 19:16:23 +0000 (11:16 -0800)]
Switch uses of SkChecksum::Compute to Murmur3.

SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.

The only interesting stuff is in src/gpu.

BUG=skia:

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

Committed: https://skia.googlesource.com/skia/+/540e95483d285b555e9b1a73d18c16e7d7c0deba

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

8 years agoOptionally pass rendertarget to getTestTarget
robertphillips [Mon, 16 Nov 2015 19:02:05 +0000 (11:02 -0800)]
Optionally pass rendertarget to getTestTarget

This shouldn't really make any difference but allocating and holding on to a GrRenderTarget for each test target generates image differences for Mali GPUs. This CL allows an existing render target to be used for the test target.

TBR=bsalomon@google.com

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

8 years agoRevert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of...
mtklein [Mon, 16 Nov 2015 19:01:18 +0000 (11:01 -0800)]
Revert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of https://codereview.chromium.org/1436973003/ )

Reason for revert:
gotta put back *compute = 0.

Original issue's description:
> Switch uses of SkChecksum::Compute to Murmur3.
>
> SkChecksum::Compute is a very, very poorly distributed hash function.
> This replaces all remaining uses with Murmur3.
>
> The only interesting stuff is in src/gpu.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac
>
> Committed: https://skia.googlesource.com/skia/+/540e95483d285b555e9b1a73d18c16e7d7c0deba

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

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

8 years agoSkPDF: fix large-number bug
halcanary [Mon, 16 Nov 2015 18:51:21 +0000 (10:51 -0800)]
SkPDF: fix large-number bug

Example:
        https://fiddle.skia.org/c/db95a3f6c928017635c4f4ddf25f2a7b

BUG=skia:257

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

8 years agoSwitch uses of SkChecksum::Compute to Murmur3.
mtklein [Mon, 16 Nov 2015 17:08:21 +0000 (09:08 -0800)]
Switch uses of SkChecksum::Compute to Murmur3.

SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.

The only interesting stuff is in src/gpu.

BUG=skia:

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

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

8 years agoIncrease the amount of debug information printed out by batches
robertphillips [Mon, 16 Nov 2015 17:06:59 +0000 (09:06 -0800)]
Increase the amount of debug information printed out by batches

Untangling MDB bugs requires more information. In particular the render targets.

BUG=skia:4094
TBR=bsalomon@google.com

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

8 years agoDisable incomplete image tests in nanobench
msarett [Mon, 16 Nov 2015 16:43:23 +0000 (08:43 -0800)]
Disable incomplete image tests in nanobench

BUG=skia:

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

8 years agoFix for chrome's skia gl bindings code.
bsalomon [Mon, 16 Nov 2015 16:28:21 +0000 (08:28 -0800)]
Fix for chrome's skia gl bindings code.

TBR=egdaniel@google.com
NOTRY=true

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

8 years agoDocumentation: Further cleanup
halcanary [Mon, 16 Nov 2015 15:37:23 +0000 (07:37 -0800)]
Documentation:  Further cleanup

*   /user/download: remove instruction to compile and run skia
    tests - moved to /user/quick/${OS}

*   /user/quick/desktop: move Gyp options to a section in the
    FAQ (distracts from quick start narritive).

*   /user/tips: reformat, rewrite.

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

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

8 years agoAdd support for EGLImage to GrGLInterface
bsalomon [Mon, 16 Nov 2015 14:48:44 +0000 (06:48 -0800)]
Add support for EGLImage to GrGLInterface

BUG=skia:

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

8 years agoUpdate testing frameworks/tests for MDB
robertphillips [Mon, 16 Nov 2015 14:23:31 +0000 (06:23 -0800)]
Update testing frameworks/tests for MDB

This CL:

Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context)
Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case
Updates the ProgramUnitTest to use multiple drawTargets
Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them)

BUG=skia:4094

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

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

8 years agoUpdate SKP version
update-skps [Mon, 16 Nov 2015 13:20:53 +0000 (05:20 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

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

8 years agoRevert of Update testing frameworks/tests for MDB (patchset #4 id:60001 of https...
egdaniel [Fri, 13 Nov 2015 21:42:55 +0000 (13:42 -0800)]
Revert of Update testing frameworks/tests for MDB (patchset #4 id:60001 of https://codereview.chromium.org/1441533003/ )

Reason for revert:
Speculative revert for leaks based on ASAN bot (and some local valgrind testing)

Original issue's description:
> Update testing frameworks/tests for MDB
>
> This CL:
>
> Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context)
> Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case
> Updates the ProgramUnitTest to use multiple drawTargets
> Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them)
>
> BUG=skia:4094
>
> Committed: https://skia.googlesource.com/skia/+/9c8605144a0f15e3e69a4e1dcd5d3e63f339380e

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

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

8 years agoFix BUILD.public INCLUDES after https://codereview.chromium.org/1438873002
benjaminwagner [Fri, 13 Nov 2015 20:27:08 +0000 (12:27 -0800)]
Fix BUILD.public INCLUDES after https://codereview.chromium.org/1438873002

BUG=skia:

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

8 years agoRename some processor functions from GL to GLSL
egdaniel [Fri, 13 Nov 2015 19:57:27 +0000 (11:57 -0800)]
Rename some processor functions from GL to GLSL

TBR=bsalomon@google.com

BUG=skia:

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

8 years agoCreate a standalone example for using Skia with SDL
joshualitt [Fri, 13 Nov 2015 19:22:19 +0000 (11:22 -0800)]
Create a standalone example for using Skia with SDL

BUG=skia:

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

8 years agoturn on libc++ for iOS
mtklein [Fri, 13 Nov 2015 19:22:04 +0000 (11:22 -0800)]
turn on libc++ for iOS

BUG=skia:

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

8 years agoRemove dependency on src/android from dm and nanobench
msarett [Fri, 13 Nov 2015 17:59:11 +0000 (09:59 -0800)]
Remove dependency on src/android from dm and nanobench

BUG=skia:

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

8 years agoMove GrGLPrimitive/GeometryProc to GLSL
egdaniel [Fri, 13 Nov 2015 17:55:43 +0000 (09:55 -0800)]
Move GrGLPrimitive/GeometryProc to GLSL

BUG=skia:

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

8 years agoAdd visualbench option for nvpr stencil samples
cdalton [Fri, 13 Nov 2015 17:10:31 +0000 (09:10 -0800)]
Add visualbench option for nvpr stencil samples

Repurposes the --nvpr flag as an int that says how many stencil samples
to use, or disables nvpr with a value of zero.

BUG=skia:

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

8 years agoFix visualbench flicker on triple buffered platforms
cdalton [Fri, 13 Nov 2015 16:56:31 +0000 (08:56 -0800)]
Fix visualbench flicker on triple buffered platforms

BUG=skia:

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

8 years agoMake visualbench timing continuous for no-reset mode
cdalton [Fri, 13 Nov 2015 16:42:06 +0000 (08:42 -0800)]
Make visualbench timing continuous for no-reset mode

Ensures there is no period of time that is not on the clock when not
restting the graphics context between samples.

BUG=skia:

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

8 years agoMove XferProcessors to glsl
egdaniel [Fri, 13 Nov 2015 16:34:52 +0000 (08:34 -0800)]
Move XferProcessors to glsl

This is basically a move and rename

TBR=bsalomon@google.com

BUG=skia:

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

8 years agoAdd visualbench option to not reset between samples
cdalton [Fri, 13 Nov 2015 16:28:49 +0000 (08:28 -0800)]
Add visualbench option to not reset between samples

Adds a --reset flag that controls whether we teardown the graphics
context between samples. Also modifies the timing algorithm to always/
only pre-warm after resetting the context.

BUG=skia:

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

8 years agoExclude src/android from CMake build too.
mtklein [Fri, 13 Nov 2015 15:42:26 +0000 (07:42 -0800)]
Exclude src/android from CMake build too.

It requires src/codec.

BUG=skia:
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/1438123008

8 years agoRevert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of...
mtklein [Fri, 13 Nov 2015 15:07:47 +0000 (07:07 -0800)]
Revert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of https://codereview.chromium.org/1436973003/ )

Reason for revert:
I would not have expected this to change any images.

Looks like it's changed both MSAA and non-MSAA GMs:
https://gold.skia.org/search2?blame=1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac&unt=true&head=true&query=source_type%3Dgm

Original issue's description:
> Switch uses of SkChecksum::Compute to Murmur3.
>
> SkChecksum::Compute is a very, very poorly distributed hash function.
> This replaces all remaining uses with Murmur3.
>
> The only interesting stuff is in src/gpu.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac

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

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

8 years agoMake all GrFragmentProcessors GL independent.
egdaniel [Fri, 13 Nov 2015 14:54:19 +0000 (06:54 -0800)]
Make all GrFragmentProcessors GL independent.

TBR=bsalomon@google.com

BUG=skia:

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

8 years agoaugment gradients_many to exercise flipped gradients and clampping
reed [Fri, 13 Nov 2015 14:23:54 +0000 (06:23 -0800)]
augment gradients_many to exercise flipped gradients and clampping

BUG=skia:
TBR=
NOTREECHECKS=True

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

8 years agoMove SkBitmapRegionDecoder to include/android and src/android
msarett [Fri, 13 Nov 2015 14:11:09 +0000 (06:11 -0800)]
Move SkBitmapRegionDecoder to include/android and src/android

This will expose the BitmapRegionDecoder API as a public include
and move the implementation to src.

This makes this code more naturally exposed in Android and easier
to test in DM and nanobench.

BUG=skia:

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

8 years agoUpdate testing frameworks/tests for MDB
robertphillips [Fri, 13 Nov 2015 14:06:03 +0000 (06:06 -0800)]
Update testing frameworks/tests for MDB

This CL:

Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context)
Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case
Updates the ProgramUnitTest to use multiple drawTargets
Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them)

BUG=skia:4094

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

8 years agoLock pixels again after dummy reset of pixel ref in SkBitmapRegionCodec
msarett [Fri, 13 Nov 2015 13:56:27 +0000 (05:56 -0800)]
Lock pixels again after dummy reset of pixel ref in SkBitmapRegionCodec

This fixes a bug in Android.  We cannot access the pixels after
calling decodeRegion() because the call to lock is missing.

BUG=skia:

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

8 years agoDocumentation: clean up
halcanary [Fri, 13 Nov 2015 12:29:59 +0000 (04:29 -0800)]
Documentation: clean up

-   /user/quick/desktop to bring together all common information for
    using Skia on desktop OSes.  Remove duplication.

-   Replace all instances of call ing gyp_skia directly with calling
    `python bin/sync-and-gyp`.  This is more correct on Windows

-   Remove outdated linux prerequisite packages

-   Formatting, formatting, formatting.

-   Note command-line syntax differences in Windows

-   SampleApp.app is no longer a bundle on MacOS

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

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

8 years agoSwitch uses of SkChecksum::Compute to Murmur3.
mtklein [Thu, 12 Nov 2015 23:44:09 +0000 (15:44 -0800)]
Switch uses of SkChecksum::Compute to Murmur3.

SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.

The only interesting stuff is in src/gpu.

BUG=skia:

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

8 years agoFix GrCoverageSetOpXP unit test on mixed samples
cdalton [Thu, 12 Nov 2015 20:11:04 +0000 (12:11 -0800)]
Fix GrCoverageSetOpXP unit test on mixed samples

Updates GrCoverageSetOpXPFactory::TestCreate to not invert coverage
with mixed samples, which is an unsupported configuration.

TBR=bsalomon@google.com

BUG=skia:4556

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

8 years agoSkAtomic: always use std::atomic
mtklein [Thu, 12 Nov 2015 19:07:53 +0000 (11:07 -0800)]
SkAtomic: always use std::atomic

We were doing it on Windows, now do it everywhere.
This just changes the backend.  We could think about another step to actually
replacing all our sk_atomic_... with std atomic stuff.

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot
TBR=reed@google.com
Only deleting from include/...

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

8 years agoReplace SkFunction with std::function
mtklein [Thu, 12 Nov 2015 18:41:05 +0000 (10:41 -0800)]
Replace SkFunction with std::function

TBR=reed@google.com
No public API changes.

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

8 years agoAPI changes to GrTextureAdjuster.
bsalomon [Thu, 12 Nov 2015 17:59:44 +0000 (09:59 -0800)]
API changes to GrTextureAdjuster.

These changes are to facilitate converting SkGpuDevice::drawTextureAdjuster to SkGpuDevice::drawTextureProducer.

Make constraint rect relative to content area

Store dimensions in GrTextureProducer

Make originalTexture() protected.

Remove getContentArea()

Provide pre-normalized texture matrix to GrTextureAdjuster::createFragmentProcessor. Define it to be be relative to content area.

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

8 years agoFactor CSS3 matching rules.
bungeman [Thu, 12 Nov 2015 17:50:08 +0000 (09:50 -0800)]
Factor CSS3 matching rules.

This factors out the CSS3 matching rules, creates tests for it,
and uses it with the GDI font manager.

BUG=chromium:554238,skia:4037

TBR=reed@google.com
No public API changes.

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