platform/upstream/libSkiaSharp.git
8 years agoAdd unit test to feed valid SVG sequences to make sure that
caryclark [Tue, 9 Feb 2016 18:30:22 +0000 (10:30 -0800)]
Add unit test to feed valid SVG sequences to make sure that
path strings can be parsed without returning an error.

Draw the output through Skia and SVG to make sure they are
parsed correctly.

R=fmalita@chromium.org
BUG=skia:4549
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1675053002

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

8 years agoShot in the dark to fix 581472
joshualitt [Tue, 9 Feb 2016 18:09:55 +0000 (10:09 -0800)]
Shot in the dark to fix 581472

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

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

8 years agoAdd some backend flexibility for shader declarations in ProgramBuilding.
egdaniel [Tue, 9 Feb 2016 17:54:43 +0000 (09:54 -0800)]
Add some backend flexibility for shader declarations in ProgramBuilding.

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

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

8 years agostart experimenting with 64bit frame-buffers
reed [Tue, 9 Feb 2016 17:14:59 +0000 (09:14 -0800)]
start experimenting with 64bit frame-buffers

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

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

8 years agoSkTArray to move when moving.
bungeman [Tue, 9 Feb 2016 17:14:28 +0000 (09:14 -0800)]
SkTArray to move when moving.

This updates SkTArray to move elements when possible, instead of always
copying them.

TBR=reed
Agreed moving is good. This should also become private.

Committed: https://skia.googlesource.com/skia/+/3c69348e725131150e4ab962dec1b3ff1148a6bd

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

8 years agoUse skstd::remove_pointer_t in GrGLFunction
bsalomon [Tue, 9 Feb 2016 16:28:54 +0000 (08:28 -0800)]
Use skstd::remove_pointer_t in GrGLFunction
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684513003

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

8 years agoRelocate anisotropic mipmap logic to SkMipMap::extractLevel()
fmalita [Tue, 9 Feb 2016 16:20:18 +0000 (08:20 -0800)]
Relocate anisotropic mipmap logic to SkMipMap::extractLevel()

Pass a full x/y scale and defer the anisotropic heuristic to SkMipMap.

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

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

8 years agoskeleton for float <-> half optimized procs
mtklein [Tue, 9 Feb 2016 16:18:10 +0000 (08:18 -0800)]
skeleton for float <-> half optimized procs

Nothing fancy yet, just calls the serial code in a loop.

I will try to folow this up with at least some of:
   - SSE2 version of serial code
   - NEON version of serial code
   - NEON version using vcvt.f32.f16/vcvt.f16.f32
   - F16C (between AVX and AVX2) version using vcvtph2ps/vcvtps2ph
The last two are fastest but need runtime detection.

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

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

8 years agoUse min scale when selecting mip level
fmalita [Tue, 9 Feb 2016 15:41:48 +0000 (07:41 -0800)]
Use min scale when selecting mip level

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

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

8 years agoCreate a thermal manager class and wire it in to nanobench behind a flag
joshualitt [Tue, 9 Feb 2016 15:18:08 +0000 (07:18 -0800)]
Create a thermal manager class and wire it in to nanobench behind a flag

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

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

8 years agoRevert of SkTArray to move when moving. (patchset #3 id:40001 of https://codereview...
mtklein [Tue, 9 Feb 2016 13:14:04 +0000 (05:14 -0800)]
Revert of SkTArray to move when moving. (patchset #3 id:40001 of https://codereview.chromium.org/1672063002/ )

Reason for revert:
Broke the Chrome roll:

https://codereview.chromium.org/1680563005

Original issue's description:
> SkTArray to move when moving.
>
> This updates SkTArray to move elements when possible, instead of always
> copying them.
>
> TBR=reed
> Agreed moving is good. This should also become private.
>
> Committed: https://skia.googlesource.com/skia/+/3c69348e725131150e4ab962dec1b3ff1148a6bd

TBR=reed@google.com,bungeman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoAlter SkXfermode's asFragmentProcessor & asXPFactory contracts
robertphillips [Tue, 9 Feb 2016 13:09:27 +0000 (05:09 -0800)]
Alter SkXfermode's asFragmentProcessor & asXPFactory contracts

TBR=bsalomon@google.com

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

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

8 years agoRemove SkNx AVX code. It is not really used. Getting in the way of refactoring.
mtklein [Mon, 8 Feb 2016 23:50:22 +0000 (15:50 -0800)]
Remove SkNx AVX code.  It is not really used.  Getting in the way of refactoring.

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

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

8 years agoOptionally run RAW images serially
scroggo [Mon, 8 Feb 2016 23:09:48 +0000 (15:09 -0800)]
Optionally run RAW images serially

RAW images use a lot of memory. Add a new FLAG to run one at a time so
we have less risk of running out of memory.

Isolate RAW images to their own thread on particular devices where our
images cause OOM errors.

Locally, this drops the max memory use from 3945 MB to 1664 MB (running only --image --images <RAW images we test>)

BUG=skia:4912
BUG=skia:4878
BUG=b/27035849
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1681553003

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

8 years agoDM: this must have been missing from the previous CL
mtklein [Mon, 8 Feb 2016 22:30:25 +0000 (14:30 -0800)]
DM: this must have been missing from the previous CL

It'd be neat to have an Android trybot.

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

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

8 years agoSkia serve now supports favicon correctly
joshualitt [Mon, 8 Feb 2016 21:57:44 +0000 (13:57 -0800)]
Skia serve now supports favicon correctly

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

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

8 years agoSupport --dryRun in nanobench to get a list of benchmarks.
brianosman [Mon, 8 Feb 2016 21:49:12 +0000 (13:49 -0800)]
Support --dryRun in nanobench to get a list of benchmarks.

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

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

8 years agoOptimize CMYK->RGBA (BGRA) transform for jpeg decodes
msarett [Mon, 8 Feb 2016 21:26:25 +0000 (13:26 -0800)]
Optimize CMYK->RGBA (BGRA) transform for jpeg decodes

Swizzle Bench Runtime
Nexus 6P     0.14x
Dell Venue 8 0.12x

CMYK Jpeg Decode Runtime
Nexus 6P     0.81x
Dell Venue 8 0.85x

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

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

8 years agoextend modecolorfilter to 4f
reed [Mon, 8 Feb 2016 20:56:56 +0000 (12:56 -0800)]
extend modecolorfilter to 4f

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

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

8 years agodm: simplify parallel/serial decisions
mtklein [Mon, 8 Feb 2016 20:39:59 +0000 (12:39 -0800)]
dm: simplify parallel/serial decisions

  - instead of complicated enclaves, just allow parallel or main thread serial
  - either the Src or the Sink can force the task to go serial

ALSO,
  - simpler file extension parsing

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

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

8 years agoReland of whitespace change to test bugdroid (patchset #1 id:1 of https://codereview...
sheyang [Mon, 8 Feb 2016 19:59:52 +0000 (11:59 -0800)]
Reland of whitespace change to test bugdroid (patchset #1 id:1 of https://codereview.chromium.org/1673083003/ )

Reason for revert:
test

Original issue's description:
> Revert of whitespace change to test bugdroid (patchset #1 id:1 of https://codereview.chromium.org/1676253002/ )
>
> Reason for revert:
> test
>
> Original issue's description:
> > whitespace change to test bugdroid
> >
> > NOTRY=true
> > TBR=
> > BUG=skia:4814
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1676253002
> >
> > Committed: https://skia.googlesource.com/skia/+/ae22c68d847997e37aad1f6ee761ec37decc0a8c
>
> TBR=
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4814
>
> Committed: https://skia.googlesource.com/skia/+/8dbe00293f5ce05ac99b72e33bf70373bb63e293

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

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

8 years agoremove dead SK_SUPPORT_LEGACY_NEG_SCALE_HQ flag
reed [Mon, 8 Feb 2016 19:57:52 +0000 (11:57 -0800)]
remove dead SK_SUPPORT_LEGACY_NEG_SCALE_HQ flag

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

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

8 years agoBlacklist RAW images on GPU tests
msarett [Mon, 8 Feb 2016 19:43:50 +0000 (11:43 -0800)]
Blacklist RAW images on GPU tests

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

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

8 years agoRevert of Moved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas. ...
ethannicholas [Mon, 8 Feb 2016 19:37:01 +0000 (11:37 -0800)]
Revert of Moved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas. (patchset #2 id:20001 of https://codereview.chromium.org/1681643002/ )

Reason for revert:
Breaking cmake build

Original issue's description:
> Moved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas.
> SkJSONCanvas and SkJSONRenderer will be deleted once the debug server
> has been updated.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1681643002
>
> Committed: https://skia.googlesource.com/skia/+/32fff1ba0c759d97ab78320b7ae46dd7696a4e6e

TBR=jcgregorio@google.com,joshualitt@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoMoved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas.
ethannicholas [Mon, 8 Feb 2016 19:20:32 +0000 (11:20 -0800)]
Moved Canvas->JSON and JSON->Canvas functionality into SkDebugCanvas.
SkJSONCanvas and SkJSONRenderer will be deleted once the debug server
has been updated.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1681643002

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

8 years agoReland of SkTArray to move when moving. (patchset #1 id:1 of https://codereview.chrom...
kjlubick [Mon, 8 Feb 2016 18:20:12 +0000 (10:20 -0800)]
Reland of SkTArray to move when moving. (patchset #1 id:1 of https://codereview.chromium.org/1677103002/ )

Reason for revert:
This was not the problem.

Original issue's description:
> Revert of SkTArray to move when moving. (patchset #3 id:40001 of https://codereview.chromium.org/1672063002/ )
>
> Reason for revert:
> This appears to have broken several things.
>
> Original issue's description:
> > SkTArray to move when moving.
> >
> > This updates SkTArray to move elements when possible, instead of always
> > copying them.
> >
> > TBR=reed
> > Agreed moving is good. This should also become private.
> >
> > Committed: https://skia.googlesource.com/skia/+/3c69348e725131150e4ab962dec1b3ff1148a6bd
>
> TBR=reed@google.com,mtklein@google.com,bungeman@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/2f8c9bf96ceea9d13fb0fc29285ecaf1673f2e8b

TBR=reed@google.com,mtklein@google.com,bungeman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoImprove GLSL integer support
cdalton [Mon, 8 Feb 2016 18:11:47 +0000 (10:11 -0800)]
Improve GLSL integer support

 - Adds shader types for uint.
 - Adds a cap for integer support.
 - Uses glVertexAttribIPointer for integer attribs.

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

Committed: https://skia.googlesource.com/skia/+/3a2caf8ecf38124f4ad21a0f6c4dabfcfa17911a

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

8 years agoRevert of SkTArray to move when moving. (patchset #3 id:40001 of https://codereview...
kjlubick [Mon, 8 Feb 2016 18:03:14 +0000 (10:03 -0800)]
Revert of SkTArray to move when moving. (patchset #3 id:40001 of https://codereview.chromium.org/1672063002/ )

Reason for revert:
This appears to have broken several things.

Original issue's description:
> SkTArray to move when moving.
>
> This updates SkTArray to move elements when possible, instead of always
> copying them.
>
> TBR=reed
> Agreed moving is good. This should also become private.
>
> Committed: https://skia.googlesource.com/skia/+/3c69348e725131150e4ab962dec1b3ff1148a6bd

TBR=reed@google.com,mtklein@google.com,bungeman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agomsan: define BREAK_IF_DEBUGGING_AND_OUT_OF_RANGE in piex
mtklein [Mon, 8 Feb 2016 17:35:05 +0000 (09:35 -0800)]
msan: define BREAK_IF_DEBUGGING_AND_OUT_OF_RANGE in piex

This should assert(false) if we're in the error case of RangeCheckedBytePtr::extractBytes:

> #ifdef BREAK_IF_DEBUGGING_AND_OUT_OF_RANGE
>   #define BREAK_IF_DEBUGGING() assert(false)
> #else
>   #define BREAK_IF_DEBUGGING() assert(true)
> #endif
  ...
> std::vector<unsigned char> RangeCheckedBytePtr::extractBytes(size_t pos, size_t length) const {
>   std::vector<unsigned char> result;
>   if (pos + length < pos /* overflow */ || remainingLength() < pos + length) {
>     BREAK_IF_DEBUGGING();
>     error_flag_ = RANGE_CHECKED_BYTE_ERROR_OVERFLOW;
>     return result;
>   }
  ...

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

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

8 years agoSkDeflateWStream: support gzip output
halcanary [Mon, 8 Feb 2016 17:34:34 +0000 (09:34 -0800)]
SkDeflateWStream: support gzip output

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

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

8 years agoTest CodecImageGenerator on GPU bots
msarett [Mon, 8 Feb 2016 17:10:47 +0000 (09:10 -0800)]
Test CodecImageGenerator on GPU bots

In crrev.com/1549473003, CodecImageGenerator implemented getYUV8Planes,
so that we can test on a GPU bot. Update the arguments to DM so that
we run CodecImageGenerator on GPU bots.

This is adapted from:
https://codereview.chromium.org/1663453002/

This will cause many untriaged images on Gold.
The GPU converts YUV->RGBA differently than we
do in software.

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

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

8 years agoSkTArray to move when moving.
bungeman [Mon, 8 Feb 2016 17:02:34 +0000 (09:02 -0800)]
SkTArray to move when moving.

This updates SkTArray to move elements when possible, instead of always
copying them.

TBR=reed
Agreed moving is good. This should also become private.

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

8 years agoReplace GrGLInterface's function pointers with std::functions.
bsalomon [Mon, 8 Feb 2016 15:22:17 +0000 (07:22 -0800)]
Replace GrGLInterface's function pointers with std::functions.

This is to facilitate binding to GLES2Interface in Chromium rather than the C interface. It requires capturing the GLES2Interface.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1674823002

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

8 years agoCreate image cache for use by json canvas
joshualitt [Mon, 8 Feb 2016 15:08:21 +0000 (07:08 -0800)]
Create image cache for use by json canvas

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

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

8 years agosimplify piex.gyp
mtklein [Mon, 8 Feb 2016 14:33:07 +0000 (06:33 -0800)]
simplify piex.gyp

Was just starting to dig into skia:4903, and decided to start by learning piex.
It's tiny.  Why such GYP complexity to build 5 files?

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

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

8 years agofix float <---> uint16_t conversion, with Mike's tests.
mtklein [Mon, 8 Feb 2016 13:54:38 +0000 (05:54 -0800)]
fix float <---> uint16_t conversion, with Mike's tests.

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

patch from issue 1679713002 at patchset 1 (http://crrev.com/1679713002#ps1)
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

8 years agoFix autoroll link
kjlubick [Mon, 8 Feb 2016 13:23:37 +0000 (05:23 -0800)]
Fix autoroll link

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

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

8 years agoRevert of whitespace change to test bugdroid (patchset #1 id:1 of https://codereview...
rmistry [Mon, 8 Feb 2016 12:33:28 +0000 (04:33 -0800)]
Revert of whitespace change to test bugdroid (patchset #1 id:1 of https://codereview.chromium.org/1676253002/ )

Reason for revert:
test

Original issue's description:
> whitespace change to test bugdroid
>
> NOTRY=true
> TBR=
> BUG=skia:4814
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1676253002
>
> Committed: https://skia.googlesource.com/skia/+/ae22c68d847997e37aad1f6ee761ec37decc0a8c

TBR=
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4814

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

8 years agowhitespace change to test bugdroid
rmistry [Mon, 8 Feb 2016 12:28:58 +0000 (04:28 -0800)]
whitespace change to test bugdroid

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

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

8 years agoMake SkString movable.
bungeman [Mon, 8 Feb 2016 02:42:54 +0000 (18:42 -0800)]
Make SkString movable.

This adds a move constructor and move assignment to SkString. This
allows elision of atomic increments and decrements on the fRec.

TBR=reed
Already agreed that moving is good.

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

8 years agoMake SkPaint movable.
bungeman [Sun, 7 Feb 2016 22:37:23 +0000 (14:37 -0800)]
Make SkPaint movable.

This adds a move constructor and move assignment to SkPaint. This
allows elision of atomic increments and decrements on the reference
counted fields.

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

8 years agomsan: build expat from source
mtklein [Sun, 7 Feb 2016 21:31:23 +0000 (13:31 -0800)]
msan: build expat from source

This should let us test it on the MSAN bot.

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

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

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

8 years agomsan: initialize buffer BlurLargeImage blurs
mtklein [Sun, 7 Feb 2016 20:23:10 +0000 (12:23 -0800)]
msan: initialize buffer BlurLargeImage blurs

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

BUG=skia:

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

8 years agomsan: these might be okay with libjpeg guarded.
mtklein [Sun, 7 Feb 2016 19:17:23 +0000 (11:17 -0800)]
msan: these might be okay with libjpeg guarded.

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

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

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

8 years agotry -O1 to speed up msan bot
mtklein [Sun, 7 Feb 2016 17:12:29 +0000 (09:12 -0800)]
try -O1 to speed up msan bot

We want it to be a debug build, but it probably doesn't need to be
completely unoptimized.

dm: 27m -> 7m
nanobench: 140m -> 33m

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

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

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

8 years agoUpdate SKP version
update-skps [Sun, 7 Feb 2016 08:44:13 +0000 (00:44 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

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

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

8 years agoupdate allocpixels to know about F16
reed [Sun, 7 Feb 2016 04:38:45 +0000 (20:38 -0800)]
update allocpixels to know about F16

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

TBR=

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

8 years agocould not resist: fast sse float <--> u16
mtklein [Sun, 7 Feb 2016 03:38:39 +0000 (19:38 -0800)]
could not resist: fast sse float <--> u16

    - generalizes the bench to float <--> {u8,u16}
    - must remember to implement NEON version at some point

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

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

8 years agoflags and hacks to get MSAN bot going
mtklein [Sun, 7 Feb 2016 03:12:23 +0000 (19:12 -0800)]
flags and hacks to get MSAN bot going

This disables a few tests in DM:
   - one BlurLargeImage GM maybe is really broken
   - FontMgrAndroidParser uses libexpat, which I've not (yet?) built from source,
     so MSAN can't see into it.

This extends some of the MSAN stifling we added around SkImageDecoder_libjpeg to SkCodec, and skips .wbmps, .pngs, and .bmps.  We're only seeing issues in colortables for .png and .bmp.

I think I can probably back out disabling Codec and the RAW image decodes...
they should all be covered by the libjpeg stifles.

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

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

TBR=msarett@google.com

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

8 years agoUse size_t for get_row_bytes() in SkJpegCodec
msarett [Sat, 6 Feb 2016 23:58:50 +0000 (15:58 -0800)]
Use size_t for get_row_bytes() in SkJpegCodec

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

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

8 years agoupdate C++11 doc
mtklein [Sat, 6 Feb 2016 23:45:28 +0000 (15:45 -0800)]
update C++11 doc

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

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

8 years agoRevert of Improve GLSL integer support (patchset #1 id:1 of https://codereview.chromi...
dcheng [Sat, 6 Feb 2016 23:08:54 +0000 (15:08 -0800)]
Revert of Improve GLSL integer support (patchset #1 id:1 of https://codereview.chromium.org/1669853002/ )

Reason for revert:
MSAN bots are unhappy with this change: https://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20ChromeOS%20MSan%20Tests/builds/7068

Original issue's description:
> Improve GLSL integer support
>
>  - Adds shader types for uint.
>  - Adds a cap for integer support.
>  - Uses glVertexAttribIPointer for integer attribs.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1669853002
>
> Committed: https://skia.googlesource.com/skia/+/3a2caf8ecf38124f4ad21a0f6c4dabfcfa17911a

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

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

8 years agoAdd non-inline SkRTreeFactory constructor to fix clang-cl
brucedawson [Sat, 6 Feb 2016 20:40:56 +0000 (12:40 -0800)]
Add non-inline SkRTreeFactory constructor to fix clang-cl

When Chromium is switched to build with VS 2015 that switches clang-cl
to build in -fmsc-version=1900 mode. This causes some changes in
importing of constructors and vftables which leads to link errors in
blink_platform.dll. Adding a non-inline constructor makes 1900 mode
behave consistently with 1800 mode and avoids the link error.

The root cause needs investigation but this will unblock the VS 2015
switch.

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

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

8 years agoRevert of skia: Add support for CHROMIUM_image backed textures. (patchset #17 id...
bsalomon [Sat, 6 Feb 2016 01:56:39 +0000 (17:56 -0800)]
Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #17 id:340001 of https://codereview.chromium.org/1623653002/ )

Reason for revert:
New unit test is failing on Windows ANGLE bots:
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-ANGLE/builds/1866/steps/dm/logs/stdio

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55
>
> Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

TBR=bsalomon@chromium.org,cblume@chromium.org,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

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

8 years agoImprove GLSL integer support
cdalton [Sat, 6 Feb 2016 00:26:32 +0000 (16:26 -0800)]
Improve GLSL integer support

 - Adds shader types for uint.
 - Adds a cap for integer support.
 - Uses glVertexAttribIPointer for integer attribs.

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

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

8 years agoAdd Histogram Macros to Skia
ericrk [Fri, 5 Feb 2016 23:32:36 +0000 (15:32 -0800)]
Add Histogram Macros to Skia

Adds a set of histogram macros to Skia, modeled after Chrome's
UMA_HISTOGRAM_* macros. These allow logging of high frequency events,
and are useful to analyze real world usage of certain features.

By default, these macros are no-ops. Users can provide a custom
header file which defines these macros if they wish to collect
histogram data. Chrome will provide such a header.

I've currently only added two macros:
- SK_HISTOGRAM_BOOLEAN - logs a true/false type relationship (whether
we are tiling a texture or not on each draw).
- SK_HISTOGRAM_ENUMERATION - logs a set of potential values (which of
a number of choices were selected for the texture upload path).

We could add more unused macros at the moment, but it seems easier to
add these as needed, WDYT?

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

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

8 years agoSkPngCodec clean-ups
msarett [Fri, 5 Feb 2016 23:13:12 +0000 (15:13 -0800)]
SkPngCodec clean-ups

Use png_read_row() instead of png_read_rows(1).
All png_read_rows() does is call png_read_row() in
a loop.  This comes from Leon's comment in:
https://codereview.chromium.org/1671003004/

Also there is a bit of refactoring.

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

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

8 years agoincrease subdivision for very large cubics
caryclark [Fri, 5 Feb 2016 21:59:31 +0000 (13:59 -0800)]
increase subdivision for very large cubics

Allow 512 subdivisions for hairline cubics instead of 64
to allow very large cubics to be properly approximated with
lines.

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

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

8 years agoFix memory leaks in SurfaceClear_Gpu test
bsalomon [Fri, 5 Feb 2016 21:47:06 +0000 (13:47 -0800)]
Fix memory leaks in SurfaceClear_Gpu test

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

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

8 years agoskia: Add support for CHROMIUM_image backed textures.
erikchen [Fri, 5 Feb 2016 20:10:55 +0000 (12:10 -0800)]
skia: Add support for CHROMIUM_image backed textures.

I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

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

8 years agoadd kRGBA_F16_SkColorType
reed [Fri, 5 Feb 2016 19:18:39 +0000 (11:18 -0800)]
add kRGBA_F16_SkColorType

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

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

8 years agoAdd GL indirect drawing APIs
cdalton [Fri, 5 Feb 2016 18:09:51 +0000 (10:09 -0800)]
Add GL indirect drawing APIs

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

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

8 years agoAdd support for GL_EXT_raster_multisample
cdalton [Fri, 5 Feb 2016 17:35:20 +0000 (09:35 -0800)]
Add support for GL_EXT_raster_multisample

Updates the GrGLGpu to call glRasterSamplesEXT when multisample is
enabled for a mixed sampled render target, but the stencil test is not
active.

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

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

8 years agoAdded JSON support for TextBlob et al.
ethannicholas [Fri, 5 Feb 2016 17:04:44 +0000 (09:04 -0800)]
Added JSON support for TextBlob et al.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1674643002

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

8 years agoOptimize the SkRawStream when the input is an asset stream
yujieqin [Fri, 5 Feb 2016 16:21:19 +0000 (08:21 -0800)]
Optimize the SkRawStream when the input is an asset stream

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

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

8 years agoRemove deferred clear from SkGpuDevice
bsalomon [Fri, 5 Feb 2016 15:17:34 +0000 (07:17 -0800)]
Remove deferred clear from SkGpuDevice

Add combining to GrClearBatch

Fix issue with state tracking in GrGLGpu::createTestingOnlyBackendTexture

Add tests for clearing GPU SkSurfaces and add tests for GrDrawContext::clear().

Add comment that SkCanvas::flush will resolve the RT in the GPU case.

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

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

8 years agoLast bit of GrGLSLFragmentProcessor-derived class cleanup
robertphillips [Fri, 5 Feb 2016 15:15:39 +0000 (07:15 -0800)]
Last bit of GrGLSLFragmentProcessor-derived class cleanup

I believe these are the last two that used the dispreferred constructor pattern.

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

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

8 years agoMove Google3-specific stack limitation logic to template classes.
benjaminwagner [Fri, 5 Feb 2016 15:02:38 +0000 (07:02 -0800)]
Move Google3-specific stack limitation logic to template classes.

Remove #ifdefs in other files.

Reapplies https://codereview.chromium.org/1656143003; removing the implicit constructors for GLPtr and GLPtrAlias resolves the build issue on Android.

Also reverts https://codereview.chromium.org/1663013004

Does not change the public API.

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

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

8 years agodont upload to Gold from MSAN bot
mtklein [Fri, 5 Feb 2016 14:16:59 +0000 (06:16 -0800)]
dont upload to Gold from MSAN bot

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

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

8 years agoupdate CQ with new bot names
mtklein [Fri, 5 Feb 2016 14:10:38 +0000 (06:10 -0800)]
update CQ with new bot names

NOTRY=true
NOTREECHECKS=true

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

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

8 years agoRevert of skia: Add support for CHROMIUM_image backed textures. (patchset #14 id...
jcgregorio [Fri, 5 Feb 2016 03:51:25 +0000 (19:51 -0800)]
Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #14 id:260001 of https://codereview.chromium.org/1623653002/ )

Reason for revert:
Seems to causing the DEPS roll to fail:

   https://codereview.chromium.org/1668293002/

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

TBR=bsalomon@chromium.org,cblume@chromium.org,bsalomon@google.com,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

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

8 years agoSet sRGB flag for PNGs with an sRGB chunk
msarett [Thu, 4 Feb 2016 23:37:58 +0000 (15:37 -0800)]
Set sRGB flag for PNGs with an sRGB chunk

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

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

8 years agoFix memory leak in SkSpecialSurface
robertphillips [Thu, 4 Feb 2016 22:59:58 +0000 (14:59 -0800)]
Fix memory leak in SkSpecialSurface

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

TBR=jcgregorio@google.com
NOTRY=true

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

8 years agoAdd SkAutoPixmapStorage::detachPixelsAsData()
fmalita [Thu, 4 Feb 2016 21:09:59 +0000 (13:09 -0800)]
Add SkAutoPixmapStorage::detachPixelsAsData()

Allows passing pixels ownership to clients.

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

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

8 years agoskia: Add support for CHROMIUM_image backed textures.
erikchen [Thu, 4 Feb 2016 20:03:07 +0000 (12:03 -0800)]
skia: Add support for CHROMIUM_image backed textures.

I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

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

8 years agoextend compose-colorfilter to 4f
reed [Thu, 4 Feb 2016 19:35:27 +0000 (11:35 -0800)]
extend compose-colorfilter to 4f

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

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

8 years agospeculatively comment out chrome mac perf test crasher
caryclark [Thu, 4 Feb 2016 19:35:06 +0000 (11:35 -0800)]
speculatively comment out chrome mac perf test crasher

The Chrome Mac perf buildbot is mysteriously crashing.
Maybe it's related to this line of code.

Try taking it out to see if the crash goes away.

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

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

8 years agoFixed references to MakeMatrix function
ethannicholas [Thu, 4 Feb 2016 19:19:40 +0000 (11:19 -0800)]
Fixed references to MakeMatrix function
TBR=joshualitt@chromium.org
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666213002

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

8 years agoAdd SkSpecialImage & SkSpecialSurface classes
robertphillips [Thu, 4 Feb 2016 18:52:42 +0000 (10:52 -0800)]
Add SkSpecialImage & SkSpecialSurface classes

Initial classes.

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

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

8 years agoJSON API cleanups
ethannicholas [Thu, 4 Feb 2016 18:37:50 +0000 (10:37 -0800)]
JSON API cleanups
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1664263002

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

8 years agoDon't print dialog box prior to crashing.
djsollen [Thu, 4 Feb 2016 16:59:35 +0000 (08:59 -0800)]
Don't print dialog box prior to crashing.

This returns us to our previous behavior when we used 0xbbadbeef
to cause the process to terminate.

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

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

8 years agoImproved support for images/bitmaps in SkJSONCanvas
ethannicholas [Thu, 4 Feb 2016 14:45:25 +0000 (06:45 -0800)]
Improved support for images/bitmaps in SkJSONCanvas
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1662063003

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

8 years agoAdd SkAndroidCodec::getPixels
scroggo [Thu, 4 Feb 2016 14:14:24 +0000 (06:14 -0800)]
Add SkAndroidCodec::getPixels

This is a synonym for the version of getAndroidPixels that accepts
only three parameters (i.e. no AndroidOptions). It is very similar
to SkCodec::getPixels, so I think the motivation for naming the
version with options differently does not apply here.

Add comments to the header describing defaults.

Update the test to use a template, and delete a lot of redundant code.

Rename a variable to stop shadowing another variable.

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

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

8 years agoNext round of GrGLSLFragmentProcessor-derived class cleanup
robertphillips [Thu, 4 Feb 2016 14:11:53 +0000 (06:11 -0800)]
Next round of GrGLSLFragmentProcessor-derived class cleanup

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

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

8 years agoModify skia serve to return clip rect and view matrix
joshualitt [Thu, 4 Feb 2016 14:08:33 +0000 (06:08 -0800)]
Modify skia serve to return clip rect and view matrix

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

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

8 years agodon't get dismayed by negative scales for HQ
reed [Thu, 4 Feb 2016 03:07:54 +0000 (19:07 -0800)]
don't get dismayed by negative scales for HQ

needs https://codereview.chromium.org/1663793003/ to land first

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

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

8 years agoadd note about security and new subclasses
reed [Thu, 4 Feb 2016 00:31:35 +0000 (16:31 -0800)]
add note about security and new subclasses

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

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

8 years agoRevert of Work around exasperating Google3 Android build error. (patchset #1 id:1...
benjaminwagner [Thu, 4 Feb 2016 00:29:25 +0000 (16:29 -0800)]
Revert of Work around exasperating Google3 Android build error. (patchset #1 id:1 of https://codereview.chromium.org/1649493005/ )

Reason for revert:
This workaround no longer seems to be necessary.

Original issue's description:
> Work around exasperating Google3 Android build error.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1649493005
>
> Committed: https://skia.googlesource.com/skia/+/900901fb1ba5170549670829fc8f9d9b590ff5f0

TBR=mtklein@google.com,reed@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

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

8 years agoFix Unpremul Index8 tests
msarett [Wed, 3 Feb 2016 23:31:18 +0000 (15:31 -0800)]
Fix Unpremul Index8 tests

TBR=scroggo@google.com

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

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

8 years agoSSE optimizations for GrayAlpha -> RGBA/BGRA Premul/Unpremul
msarett [Wed, 3 Feb 2016 23:28:35 +0000 (15:28 -0800)]
SSE optimizations for GrayAlpha -> RGBA/BGRA Premul/Unpremul

Swizzle Runtime (Dell Venue 8)
Unpremul 0.17x
Premul   0.20x

PNG Decode Runtime on GrayAlpha Encoded PNGs (Dell Venue 8)
Unpremul Regular  0.91x
Unpremul ZeroInit 0.92x
Premul   Regular  0.84x
Premul   ZeroInit 0.85x

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

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

8 years agoMake SkImage::readYUV8Planes const
Brian Salomon [Wed, 3 Feb 2016 22:09:00 +0000 (17:09 -0500)]
Make SkImage::readYUV8Planes const

TBR=reed@google.com

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

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

8 years agoIncrease max vertex attrib count in GrPrimitiveProcessor
cdalton [Wed, 3 Feb 2016 22:02:49 +0000 (14:02 -0800)]
Increase max vertex attrib count in GrPrimitiveProcessor

Increases the max vertex attrib count in GrPrimitiveProcessor from 6 to
8. This is the required minimum by ES 2.0 for GL_MAX_VERTEX_ATTRIBS.

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

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

8 years agoSkMojo: generate on Darwin/x86_64
halcanary [Wed, 3 Feb 2016 21:54:03 +0000 (13:54 -0800)]
SkMojo: generate on Darwin/x86_64

also clean up generate and skmojo.gyp to work right.

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

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

8 years agoFix assert accessing pipeline from initBatchTracker
cdalton [Wed, 3 Feb 2016 21:29:19 +0000 (13:29 -0800)]
Fix assert accessing pipeline from initBatchTracker

Marks fPipelineInstalled as true before calling initBatchTracker. The
batch subclass ought to be able to access the newly constructed
pipeline object during its init.

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

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

8 years agoFix bugs in SkBmpCodec
msarett [Wed, 3 Feb 2016 21:12:38 +0000 (13:12 -0800)]
Fix bugs in SkBmpCodec

The decode should not depend on the requested alpha type.

These were exposed by:
https://codereview.chromium.org/1641273003

This should cause the number of untriaged images in Gold
to go to zero.

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

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

8 years agoRevert "Factor out xcode c/cpp settings into variables to apply to cmake builds."
bungeman [Wed, 3 Feb 2016 21:06:28 +0000 (13:06 -0800)]
Revert "Factor out xcode c/cpp settings into variables to apply to cmake builds."

This reverts commit 32235eac4b5c625e639757b8247f6e64ce4dc4c8.
This change should no longer be necessary now that gyp has been updated.

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

8 years agoTest unpremul decodes
msarett [Wed, 3 Feb 2016 20:39:10 +0000 (12:39 -0800)]
Test unpremul decodes

This is a workaround until SkCanvas supports drawing kUnpremul sources.

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

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

8 years agoClean up GrGLSLFragmentProcessor-derived classes
robertphillips [Wed, 3 Feb 2016 20:25:40 +0000 (12:25 -0800)]
Clean up GrGLSLFragmentProcessor-derived classes

In some other patches it was observed that many of the GrGLSLFragmentProcessor-derived classes needlessly pass a parameter to their constructors.

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

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

8 years agoReduce stack usage for Google3.
benjaminwagner [Wed, 3 Feb 2016 20:20:19 +0000 (12:20 -0800)]
Reduce stack usage for Google3.

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

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

8 years agoTreat bad values passed to --images as a fatal error
scroggo [Wed, 3 Feb 2016 20:19:11 +0000 (12:19 -0800)]
Treat bad values passed to --images as a fatal error

If an option is passed to --images that is either a non-existent path or
a folder with no images matching the supported types, assume this is
an error and exit, so they can supply a valid path instead.

Share code between DM and nanobench in SkCommonFlags.

nanobench now behaves more like DM - it will check a directory for
images that match the supported extensions.

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

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