platform/upstream/libSkiaSharp.git
8 years agoDemo fuzz for Herb
mtklein [Thu, 21 Jan 2016 17:25:32 +0000 (09:25 -0800)]
Demo fuzz for Herb

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

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

8 years agoAdd Lua SkXfermode skp scraping support
robertphillips [Thu, 21 Jan 2016 17:05:32 +0000 (09:05 -0800)]
Add Lua SkXfermode skp scraping support

This is to answer the question of do any of our skps have SkLerpXfermodes. AFAICT they should not so this is just to verify.

The only controversial part of this is the addition of 'getLuaName' to SkXfermode

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

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

8 years agoRename SkCodec_libpng to SkPngCodec
msarett [Thu, 21 Jan 2016 17:05:23 +0000 (09:05 -0800)]
Rename SkCodec_libpng to SkPngCodec

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

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

8 years agoImplement onMatchFamilyStyle for Mac.
bungeman [Thu, 21 Jan 2016 16:18:42 +0000 (08:18 -0800)]
Implement onMatchFamilyStyle for Mac.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1612653002

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

8 years agoresolution dependent path measure
caryclark [Thu, 21 Jan 2016 15:07:02 +0000 (07:07 -0800)]
resolution dependent path measure

When a dash is drawn through a canvas with a scaled up
matrix, path measure needs the pixel resolution through
the matrix to construct the dash with sufficient
resolution.

Pass the resolution through to path measure.

Replicate chrome bug in skia GM.

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

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

8 years agofix skp fuzz
caryclark [Thu, 21 Jan 2016 14:54:46 +0000 (06:54 -0800)]
fix skp fuzz

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

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

8 years agoRemove SK_SUPPORT_SRC_BOUNDS_BLOAT_FOR_IMAGEFILTERS (now unused).
senorblanco [Thu, 21 Jan 2016 14:49:15 +0000 (06:49 -0800)]
Remove SK_SUPPORT_SRC_BOUNDS_BLOAT_FOR_IMAGEFILTERS (now unused).

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

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

8 years agodetect bad/corrupt flattenable factory indices
reed [Thu, 21 Jan 2016 14:44:18 +0000 (06:44 -0800)]
detect bad/corrupt flattenable factory indices

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

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

8 years agoMake colorimagefilter GM not crash when resource path not specified
bsalomon [Thu, 21 Jan 2016 14:44:08 +0000 (06:44 -0800)]
Make colorimagefilter GM not crash when resource path not specified
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1619723002
BUG=skia:

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

8 years agofuzz: list API fuzzing options if -t api and -n matches nothing.
mtklein [Thu, 21 Jan 2016 14:13:52 +0000 (06:13 -0800)]
fuzz: list API fuzzing options if -t api and -n matches nothing.

Today we segfault if --name is empty.  This fixes that too.

This updates some terms: -t api lets us fuzz an API.

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

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

8 years agoSeperating our fuzzing binary from DM produces a 50x speed increase for decoding...
kjlubick [Thu, 21 Jan 2016 13:03:28 +0000 (05:03 -0800)]
Seperating our fuzzing binary from DM produces a 50x speed increase for decoding images and a 10x speed increase in decoding/rendering Skps.

This also lets us differentiate between the decoding of Skps and the rendering of them, the latter of which may be more interesting for bugs.

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

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

8 years agoremove dead code around SK_SUPPORT_LEGACY_TRANSLATEROUNDHACK
reed [Thu, 21 Jan 2016 12:33:07 +0000 (04:33 -0800)]
remove dead code around SK_SUPPORT_LEGACY_TRANSLATEROUNDHACK

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

TBR=

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

8 years agoRevert of Fix GrAtlasTextBlob bounds management (patchset #8 id:140001 of https:...
joshualitt [Wed, 20 Jan 2016 21:54:28 +0000 (13:54 -0800)]
Revert of Fix GrAtlasTextBlob bounds management (patchset #8 id:140001 of https://codereview.chromium.org/1605013002/ )

Reason for revert:
seems to break upright matrix

Original issue's description:
> Fix GrAtlasTextBlob bounds management
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1605013002
>
> Committed: https://skia.googlesource.com/skia/+/ae473fdfc3db2d9dd82b05b2568767d6d4038fcd

TBR=bsalomon@google.com,jvanverth@google.com,joshualitt@chromium.org
# 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/1615473002

8 years agoSkValue: improve SkFromValue<T> implementation
mtklein [Wed, 20 Jan 2016 21:35:20 +0000 (13:35 -0800)]
SkValue: improve SkFromValue<T> implementation

Add template<> bool SkFromValue<float>(const SkValue&, float*);
Refactor template<> bool SkFromValue<SkMatrix>(const SkValue&, SkMatrix*);

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

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

8 years agoRevert to old behavior for swap buffers
joshualitt [Wed, 20 Jan 2016 21:09:12 +0000 (13:09 -0800)]
Revert to old behavior for swap buffers

New behavior is preserved with 'syncOrSwap' call

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

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

8 years agoFix GrAtlasTextBlob bounds management
joshualitt [Wed, 20 Jan 2016 20:35:22 +0000 (12:35 -0800)]
Fix GrAtlasTextBlob bounds management

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

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

8 years agoAdd gpu implementation of OverdrawXfermode
robertphillips [Wed, 20 Jan 2016 20:00:21 +0000 (12:00 -0800)]
Add gpu implementation of OverdrawXfermode
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1607253002

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

8 years agoSkNx miplevel building
mtklein [Wed, 20 Jan 2016 19:55:51 +0000 (11:55 -0800)]
SkNx miplevel building

All sizes approximately twice as fast.

Before:
    micros    bench
   1649.35   mipmap_build_512x512 nonrendering
   1824.42   mipmap_build_511x512 nonrendering
   2100.66 ? mipmap_build_512x511 nonrendering
   2375.94   mipmap_build_511x511 nonrendering

After:
    micros    bench
    730.32 ! mipmap_build_512x512 nonrendering
    922.12   mipmap_build_511x512 nonrendering
    999.07   mipmap_build_512x511 nonrendering
   1342.93 ! mipmap_build_511x511 nonrendering

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

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

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

8 years agoreplace arcto quads with a conic
caryclark [Wed, 20 Jan 2016 19:55:11 +0000 (11:55 -0800)]
replace arcto quads with a conic

also, remove code used only for
the quad generation

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

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

8 years agoConvert CanvasStateTest to the new saveLayer API
fmalita [Wed, 20 Jan 2016 19:17:39 +0000 (11:17 -0800)]
Convert CanvasStateTest to the new saveLayer API

The test needs to still work when SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG is
defined but SK_SUPPORT_LEGACY_SAVEFLAGS is not.

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

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

8 years agochange kMedium_SkFilterQuality to never pop if we're scaling
reed [Wed, 20 Jan 2016 19:04:40 +0000 (11:04 -0800)]
change kMedium_SkFilterQuality to never pop if we're scaling

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

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

8 years agoadd wait on fence without flush
joshualitt [Wed, 20 Jan 2016 18:54:58 +0000 (10:54 -0800)]
add wait on fence without flush

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

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

8 years agoSkValue: implementation, unit test
halcanary [Wed, 20 Jan 2016 18:00:26 +0000 (10:00 -0800)]
SkValue: implementation, unit test
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1604253002

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

8 years agoMake nanobench --outResultsFile only work with Release builds.
mtklein [Wed, 20 Jan 2016 17:53:59 +0000 (09:53 -0800)]
Make nanobench --outResultsFile only work with Release builds.

It is very, very misleading to report performance numbers for Debug builds.
This makes it impossible for us to upload them to perf.skia.org.

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

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

8 years agoAdd SkPath::isLastContourClosed()
fs [Wed, 20 Jan 2016 17:51:07 +0000 (09:51 -0800)]
Add SkPath::isLastContourClosed()

Adds a simple method for checking if the last command/verb in the
current contour is a 'close'.

This will simplify determining "closedness" for blink::Path, and aid
in the implementation of algorithms such as:

https://drafts.fxtf.org/motion-1/#motion-processing (second item in list)

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

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

8 years agoteach dump_record to recurse into subpictures
mtklein [Wed, 20 Jan 2016 16:46:40 +0000 (08:46 -0800)]
teach dump_record to recurse into subpictures

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

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

8 years agoRevert of SkNx miplevel building (patchset #3 id:40001 of https://codereview.chromium...
mtklein [Wed, 20 Jan 2016 16:33:59 +0000 (08:33 -0800)]
Revert of SkNx miplevel building (patchset #3 id:40001 of https://codereview.chromium.org/1606013003/ )

Reason for revert:
Paranoid revert to see if it helps skia:4823

Original issue's description:
> SkNx miplevel building
>
> All sizes approximately twice as fast.
>
> Before:
>     micros    bench
>    1649.35   mipmap_build_512x512 nonrendering
>    1824.42   mipmap_build_511x512 nonrendering
>    2100.66 ? mipmap_build_512x511 nonrendering
>    2375.94   mipmap_build_511x511 nonrendering
>
> After:
>     micros    bench
>     730.32 ! mipmap_build_512x512 nonrendering
>     922.12   mipmap_build_511x512 nonrendering
>     999.07   mipmap_build_512x511 nonrendering
>    1342.93 ! mipmap_build_511x511 nonrendering
>
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1606013003
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/3bd5aba2a0e165997f683cf3aa306661e71464f6

TBR=reed@google.com,mtklein@chromium.org
# 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/1607323002

8 years agoremove fragile assert
reed [Wed, 20 Jan 2016 16:12:02 +0000 (08:12 -0800)]
remove fragile assert

The assert basically wants the following to always be true (but it aint)

floor(int + 0.5 + float) == floor(0.5 + float) + int

... where int + 0.5 happens first, and then we add the float.

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

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

8 years agoAdd ability to wire up sharelist in glcontext creation
joshualitt [Wed, 20 Jan 2016 16:07:01 +0000 (08:07 -0800)]
Add ability to wire up sharelist in glcontext creation

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

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

8 years agoMake GrGLProgramBuilder a local stack variable in CreateProgram
egdaniel [Wed, 20 Jan 2016 15:53:51 +0000 (07:53 -0800)]
Make GrGLProgramBuilder a local stack variable in CreateProgram

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

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

8 years agoadd arc circle gap gm
caryclark [Wed, 20 Jan 2016 15:46:05 +0000 (07:46 -0800)]
add arc circle gap gm

The circle and arc don't line up because
the circle uses conics and arc uses
quadratics.

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

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

8 years agoA few more small changes to make GrAtlasTextBlob nearly self contained
joshualitt [Wed, 20 Jan 2016 14:48:47 +0000 (06:48 -0800)]
A few more small changes to make GrAtlasTextBlob nearly self contained

Note: There is still a bit of friendliness, but its going to require
some creativity to deal with.

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

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

8 years agoMove distance field text positioning into GrTextUtils
joshualitt [Wed, 20 Jan 2016 14:36:09 +0000 (06:36 -0800)]
Move distance field text positioning into GrTextUtils

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

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

8 years agoTexturing support for RECTANGLE textures.
bsalomon [Wed, 20 Jan 2016 14:18:10 +0000 (06:18 -0800)]
Texturing support for RECTANGLE textures.

Uses textureSize() to unnormalize texture coords when reading from a RECTANGLE texture. Because of this we also require a later GLSL version to use rectangle textures (1.40).

Note that this causes a issue with the bicubic effect. The texture coords seem to have poor precision and the result is ugly. textureSize() is intended as a workaround until effects can be updated to handle unnormalized coords themselves.

Updates places where we were looking for OpenGL version 3.2 for rectangle support. It was actually added in 3.1.

BUG=skia:3868

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

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

8 years agoRevert of sdf: use linear edge distance approximation for all gradient directions...
mtklein [Wed, 20 Jan 2016 00:26:55 +0000 (16:26 -0800)]
Revert of sdf: use linear edge distance approximation for all gradient directions (patchset #1 id:1 of https://codereview.chromium.org/1545893003/ )

Reason for revert:
breaks roll?

https://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/81753

Original issue's description:
> sdf: use linear edge distance approximation for all gradient directions
>
> Image diff tools tell me there are diffs, but I sure can't see them.
> This drops edge_distance() off the chart as far as CPU cost goes.
>
> BUG=skia:4729
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1545893003
>
> Committed: https://skia.googlesource.com/skia/+/8a87bb4d5c23da83ef406ef87b470afa4217d7a4

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

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

8 years agoFix patch check-in instructions for non-committers
hcm [Tue, 19 Jan 2016 21:57:27 +0000 (13:57 -0800)]
Fix patch check-in instructions for non-committers

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

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

8 years agodon't preround in bitmap scaling setup
reed [Tue, 19 Jan 2016 21:33:32 +0000 (13:33 -0800)]
don't preround in bitmap scaling setup

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

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

8 years agoAdd SSSE3 Optimizations for premul and swap
msarett [Tue, 19 Jan 2016 21:17:58 +0000 (13:17 -0800)]
Add SSSE3 Optimizations for premul and swap

Improves deocde performance for RGBA pngs.

Swizzler Time on z620 (clang):
SwapPremul 0.24x
Premul     0.24x
Swap       0.37x
Decode Time on z620 (clang):
Premul   ZeroInit Decodes 0.88x
Unpremul ZeroInit Decodes 0.94x
Premul   Regular  Decodes 0.91x
Unpremul Regular  Decodes 0.98x

Swizzler Time in Dell Venue 8 (gcc):
SwapPremul 0.14x
Premul     0.14x
Swap       0.08x
Decode Time on Dell Venus 8 (gcc):
Premul   ZeroInit Decodes 0.79x
Premul   Regular  Decodes 0.77x

Note:
ZeroInit means memory is zero initialized, and we do not write to
memory for large sections of zero pixels (memory use opt for Android).

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

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

8 years agoValgrind is not a fan of uninitialized Src pixels.
mtklein [Tue, 19 Jan 2016 20:42:49 +0000 (12:42 -0800)]
Valgrind is not a fan of uninitialized Src pixels.

E.g. search for ==31875== in this log:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind/builds/774/steps/nanobench/logs/stdio

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

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

8 years agosdf: use linear edge distance approximation for all gradient directions
mtklein [Tue, 19 Jan 2016 20:35:24 +0000 (12:35 -0800)]
sdf: use linear edge distance approximation for all gradient directions

Image diff tools tell me there are diffs, but I sure can't see them.
This drops edge_distance() off the chart as far as CPU cost goes.

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

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

8 years agoSkNx miplevel building
mtklein [Tue, 19 Jan 2016 20:20:01 +0000 (12:20 -0800)]
SkNx miplevel building

All sizes approximately twice as fast.

Before:
    micros    bench
   1649.35   mipmap_build_512x512 nonrendering
   1824.42   mipmap_build_511x512 nonrendering
   2100.66 ? mipmap_build_512x511 nonrendering
   2375.94   mipmap_build_511x511 nonrendering

After:
    micros    bench
    730.32 ! mipmap_build_512x512 nonrendering
    922.12   mipmap_build_511x512 nonrendering
    999.07   mipmap_build_512x511 nonrendering
   1342.93 ! mipmap_build_511x511 nonrendering

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

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

8 years agoClean up unused or overly complex modes in SkSwizzler
msarett [Tue, 19 Jan 2016 18:40:12 +0000 (10:40 -0800)]
Clean up unused or overly complex modes in SkSwizzler

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

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

8 years agoexclude new function from legacy code path
caryclark [Tue, 19 Jan 2016 17:57:16 +0000 (09:57 -0800)]
exclude new function from legacy code path

hopefully fixes the broken roll

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

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

8 years agoRevert of Update libwebp to version 0.5.0 (patchset #2 id:20001 of https://codereview...
benjaminwagner [Tue, 19 Jan 2016 17:50:17 +0000 (09:50 -0800)]
Revert of Update libwebp to version 0.5.0 (patchset #2 id:20001 of https://codereview.chromium.org/1601253003/ )

Reason for revert:
Seems to be causing bots to fail:
https://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Release-Android_NoNeon/builds/4032
https://build.chromium.org/p/client.skia.android/builders/Perf-Android-GCC-Nexus5-CPU-NEON-Arm7-Release/builds/3239
https://build.chromium.org/p/client.skia.android/builders/Perf-Android-GCC-Nexus5-GPU-Adreno330-Arm7-Release/builds/1887
https://build.chromium.org/p/client.skia.fyi/builders/Perf-Android-GCC-Nexus5-GPU-Adreno330-Arm7-Release-Appurify/builds/2075
https://build.chromium.org/p/client.skia.android/builders/Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Debug/builds/2136
https://build.chromium.org/p/client.skia.android/builders/Test-Android-GCC-Nexus5-CPU-NEON-Arm7-Release/builds/3850
https://build.chromium.org/p/client.skia.android/builders/Test-Android-GCC-Nexus5-GPU-Adreno330-Arm7-Debug/builds/2078
https://build.chromium.org/p/client.skia.android/builders/Test-Android-GCC-Nexus5-GPU-Adreno330-Arm7-Release/builds/2000
https://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android_NoNeon/builds/4098

Original issue's description:
> Update libwebp to version 0.5.0
>
> This is the version used by Android.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1601253003
>
> Committed: https://skia.googlesource.com/skia/+/fe35455210294c3d9de9d0d9534743acfade523d

TBR=msarett@google.com,scroggo@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/1601083004

8 years agoUpdate libwebp to version 0.5.0
scroggo [Tue, 19 Jan 2016 16:54:18 +0000 (08:54 -0800)]
Update libwebp to version 0.5.0

This is the version used by Android.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1601253003

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

8 years agoFix SkAlphaThresholdFilter bounds handling.
senorblanco [Tue, 19 Jan 2016 16:50:18 +0000 (08:50 -0800)]
Fix SkAlphaThresholdFilter bounds handling.

SkAlphaThresholdFilter was always allocating a mask texture
of the same size as the source texture. In addition to
potentially wasting VRAM, this could cause the mask to be
offset from the source texture, if the resulting bounds
were a different size than the source texture.

The fix is to allocate a mask texture only as large as the
bounds, and to offset it to the bounds origin on draw.

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

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

8 years agofix circular dashing
caryclark [Tue, 19 Jan 2016 16:07:49 +0000 (08:07 -0800)]
fix circular dashing

Path measure cannot use the same code approach for quadratics
and cubics. Subdividing cubics repeatedly does not result in
subdivided t values, e.g. a quarter circle cubic divided in
half twice does not have a t value equivalent to 1/4.

Instead, always compute the cubic segment from a pair of
t values.

When finding the length of the cubic through recursive measures,
it is enough to carry the point at a given t to the next
subdivision.

(Chrome suppression has landed already.)

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

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

8 years agoSkStream/Priv cleanups
scroggo [Tue, 19 Jan 2016 15:53:39 +0000 (07:53 -0800)]
SkStream/Priv cleanups

Replace all callers of SkCopyStreamToStorage with SkCopyStreamToData,
which is simpler and does the same thing.

Remove SkStreamRewindableFromSkStream, which is unused.

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

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

8 years agoThis CL moves a bit more logic into GrAtlasTextBlob
joshualitt [Tue, 19 Jan 2016 14:59:29 +0000 (06:59 -0800)]
This CL moves a bit more logic into GrAtlasTextBlob

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

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

8 years agoSampleApp: Remove SkWindow::setColorType
kkinnunen [Mon, 18 Jan 2016 09:18:34 +0000 (01:18 -0800)]
SampleApp: Remove SkWindow::setColorType

Remove SkWindow::setColorType, it is used wrong and inconsistently.

The color type is actually property of window backbuffer, used when the
window is painted with software. This is as opposed to a generic window
property that would affect all operation.

Similar to MSAA sample count for window GPU backbuffer, the bitmap
backbuffer color type should be a parameter of "attach" or "create
window" functions, should this property ever be added back.

The apps use the call wrong, setting the type as kRGBA_8888
or kBGRRA_8888 without no apparent rationale. These color types
are incorrect, as the raster surface can not work with these.

Reorganize the SkWindow::resize, since no change in SkWindow backbuffer size does not neccessarily mean that SkView would not need the call.

Do not show the sw backbuffer color type in SampleApp title, as
it does not really provide any information. On small screens,
kBGRA_8888_ColorType fills up the whole title.

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

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

8 years agoSampleApp: remove SkWindow::onPDFSaved, it does not work
kkinnunen [Mon, 18 Jan 2016 08:47:14 +0000 (00:47 -0800)]
SampleApp: remove SkWindow::onPDFSaved, it does not work

Remove SkWindow::onPDFSaved, it does not work and it is not used anymore.

Also, it is very SampleApp -specific feature implemented in SkWindow class.
SkWindow class is probably intended to be more app-agnosting than
what this method implies.

Presumably the idea of the callback was to inform the user of
SampleApp that the PDF was saved to a certain location.

For Android SampleApp, show a hardcoded toast that the PDF was saved to
/sdcard.

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

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

8 years agoremove SK_SUPPORT_LEGACY_MIPLEVEL_BUILDER code
reed [Sun, 17 Jan 2016 22:16:12 +0000 (14:16 -0800)]
remove SK_SUPPORT_LEGACY_MIPLEVEL_BUILDER code

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

TBR=

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

8 years agoUpdate SKP version
update-skps [Sun, 17 Jan 2016 08:54:04 +0000 (00:54 -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=1593713008

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

9 years agouse pixmaps in mipmap api
reed [Sun, 17 Jan 2016 02:50:35 +0000 (18:50 -0800)]
use pixmaps in mipmap api

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

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

9 years agoremove SkDebugUtils.h -- unused
reed [Sat, 16 Jan 2016 20:44:12 +0000 (12:44 -0800)]
remove SkDebugUtils.h -- unused

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

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

9 years agospeedup mip builders
reed [Sat, 16 Jan 2016 17:23:48 +0000 (09:23 -0800)]
speedup mip builders

1. push the inner-loop into the procs
2. for the 3x3 and 3x2 cases, skip the redundant horizontal read/expand

Some before/after timings (unfortunately there's a lot of variance) -- on MacBook Air

Before

   9/9   MB 1 1.45ms 1.65ms 1.92ms 2.93ms 31% ▂█▂▁▁▁▂█▆▂ nonrendering mipmap_build_512x512
   9/9   MB 1 1.85ms 2.33ms 2.47ms 3.69ms 28% ▃██▄▃▂▁▂▁▁ nonrendering mipmap_build_511x512
   9/9   MB 1 2.15ms 2.21ms 2.37ms 3.28ms 15% █▂▂▁▁▁▁▅▁▁ nonrendering mipmap_build_512x511
   9/9   MB 1 2.74ms 3.9ms 4.03ms 5.89ms 25% ▄▂▃▄█▂▁▂▇▅ nonrendering mipmap_build_511x511

After

  10/10  MB 1 1.08ms 1.09ms 1.1ms 1.18ms 3% ▁▁▁▁▁▁▁█▃▁ nonrendering mipmap_build_512x512
  10/10  MB 1 1.22ms 1.44ms 1.66ms 2.83ms 30% ▂▂▄▁▁▃█▅▂▁ nonrendering mipmap_build_511x512
  10/10  MB 1 1.45ms 1.91ms 2.04ms 3.75ms 36% ▁▁▁▃▅█▃▂▂▂ nonrendering mipmap_build_512x511
  10/10  MB 1 1.7ms 1.7ms 1.81ms 2.41ms 13% █▁▁▁▁▁▁▁▁▄ nonrendering mipmap_build_511x511

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

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

9 years agoupdate mipbuilder bench to exercise all 4 procs
reed [Sat, 16 Jan 2016 02:47:38 +0000 (18:47 -0800)]
update mipbuilder bench to exercise all 4 procs

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

TBR=

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

9 years agouse triangle filter for odd dimensions in mip-levels
reed [Fri, 15 Jan 2016 21:17:08 +0000 (13:17 -0800)]
use triangle filter for odd dimensions in mip-levels

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

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

9 years agoadd SkNx::abs(), for now only implemented for Sk4f
mtklein [Fri, 15 Jan 2016 20:16:40 +0000 (12:16 -0800)]
add SkNx::abs(), for now only implemented for Sk4f

There's no reason we couldn't implement this for all ints and floats;
just don't want to land unused code.

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

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

9 years agoModify kilobench to run each sample in its own process
joshualitt [Fri, 15 Jan 2016 20:07:39 +0000 (12:07 -0800)]
Modify kilobench to run each sample in its own process

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

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

9 years agoDifferentiate maxColorSamples and maxStencilSamples in GrCaps
egdaniel [Fri, 15 Jan 2016 19:36:18 +0000 (11:36 -0800)]
Differentiate maxColorSamples and maxStencilSamples in GrCaps

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

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

9 years agoAdd NEON swap opts and use opts in SkSwizzler
msarett [Fri, 15 Jan 2016 19:02:36 +0000 (11:02 -0800)]
Add NEON swap opts and use opts in SkSwizzler

All RGBA, RGBX, BGRA, BGRX routines in SkSwizzler now use fast
options (with the exception of conversions to 565).

Swizzle Time for swap_rb
0.94x Nexus 9
0.81x Nexus 6P

Unpremul Decode Time for RGBA PNGs***
ZeroInit 0.93x Nexus 9
Regular  0.94x Nexus 9
ZeroInit 0.97x Nexus 6P
ZeroInit 0.95x Nexus 6P

***Two Notes:
The improvements here are actually due to taking advantage of
memcpy() (no need to swap, the bytes are already in the proper
order).
ZeroInit skips writing zeros to zero initialized memory.  This
is a memory use opt in Android.

BMP decodes should also benefit from these improvements.

I am relying on Gold to help test all possible cases.

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

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

9 years agoadd GM to show miplevels for all colortypes
reed [Fri, 15 Jan 2016 18:51:08 +0000 (10:51 -0800)]
add GM to show miplevels for all colortypes

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

TBR=

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

9 years agoNow Kilobench times, exact same timing mechanism as nanobench
joshualitt [Fri, 15 Jan 2016 18:00:08 +0000 (10:00 -0800)]
Now Kilobench times, exact same timing mechanism as nanobench

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

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

9 years agoFix GL texture target program key
bsalomon [Fri, 15 Jan 2016 16:25:26 +0000 (08:25 -0800)]
Fix GL texture target program key
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1593643002

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

9 years agoIf we pass no bytes, use the fuzz binary itself.
mtklein [Fri, 15 Jan 2016 15:56:20 +0000 (07:56 -0800)]
If we pass no bytes, use the fuzz binary itself.

This is mostly for convenient local testing.

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

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

9 years agotest pow2 and non mipbuilders
reed [Fri, 15 Jan 2016 15:41:07 +0000 (07:41 -0800)]
test pow2 and non mipbuilders

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

TBR=

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

9 years agoFix compile error in Google3 build.
benjaminwagner [Fri, 15 Jan 2016 14:21:18 +0000 (06:21 -0800)]
Fix compile error in Google3 build.

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

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

9 years agoRestore creature comforts to fuzz binary
mtklein [Fri, 15 Jan 2016 14:19:53 +0000 (06:19 -0800)]
Restore creature comforts to fuzz binary

The hack to remove these niceties didn't seem to make a difference in my
fuzz/s, so we might as well keep them.

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

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

9 years agofuzz: signalBug() / signalBoring()
mtklein [Fri, 15 Jan 2016 13:46:54 +0000 (05:46 -0800)]
fuzz: signalBug() / signalBoring()

Instead of a single ASSERT macro, this switches to two new methods:
   - signalBug():    tell afl-fuzz there's a bug caused by its inputs (by crashing)
   - signalBoring(): tell afl-fuzz these inputs are not worth testing (by exiting gracefully)

I'm not seeing any effect on fuzz/s when I just always log verbosely.

signalBug() now triggers SIGSEGV rather than SIGABRT.  This should make it work with catchsegv more easily.

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

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

9 years agoAdd optimize_coding setting for JPEG encoding.
benjaminwagner [Fri, 15 Jan 2016 02:13:32 +0000 (18:13 -0800)]
Add optimize_coding setting for JPEG encoding.

Produces smaller encoded output at the expense of encoding time. No visual differences.

sample image 1 (RGB gradients):
default (80): 2.5x slower, 34% smaller
quality 0: 1.7x slower, 52% smaller
quality 20: 2.1x slower, 55% smaller
quality 40: 2.3x slower, 37% smaller
quality 60: 2.5x slower, 36% smaller
quality 100: 3.9x slower, 22% smaller

sample image 2 (photo):
default (80): 2x slower, 8% smaller
quality 0: 1.5x slower, 49% smaller
quality 20: 1.7x slower, 22% smaller
quality 40: 1.9x slower, 15% smaller
quality 60: 1.9x slower, 11% smaller
quality 100: 2x slower, 9% smaller

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

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

9 years agoRevert of these _procs_arm are not used when we have NEON (patchset #1 id:1 of https...
mtklein [Thu, 14 Jan 2016 21:49:17 +0000 (13:49 -0800)]
Revert of these _procs_arm are not used when we have NEON (patchset #1 id:1 of https://codereview.chromium.org/1587983004/ )

Reason for revert:
Breaks Chrome roll:

https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/8391/steps/compile%20%28with%20patch%29/logs/stdio

Original issue's description:
> these _procs_arm are not used when we have NEON
>
> BUG=skia:4798
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1587983004
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/349dcc99b69f27ab834232796371e678625078e0

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

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

9 years agoCreate an SkCodecImageGenerator
msarett [Thu, 14 Jan 2016 21:12:26 +0000 (13:12 -0800)]
Create an SkCodecImageGenerator

BUG=skia:

patch from issue 1396323007 at patchset 120001 (http://crrev.com/1396323007#ps120001)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1487683004

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

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

9 years agofix SkGpuDevice::drawBitmapRect to always update clips
lsalzman [Thu, 14 Jan 2016 21:06:41 +0000 (13:06 -0800)]
fix SkGpuDevice::drawBitmapRect to always update clips

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

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

9 years agoUpdate tests to produce more sensible output for Android framework builds.
djsollen [Thu, 14 Jan 2016 20:23:54 +0000 (12:23 -0800)]
Update tests to produce more sensible output for Android framework builds.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1590023002

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

9 years agoRevert of Create an SkCodecImageGenerator (patchset #10 id:260001 of https://coderevi...
msarett [Thu, 14 Jan 2016 20:20:45 +0000 (12:20 -0800)]
Revert of Create an SkCodecImageGenerator (patchset #10 id:260001 of https://codereview.chromium.org/1487683004/ )

Reason for revert:
Core doesn't know about Codec.

Original issue's description:
> Create an SkCodecImageGenerator
>
> BUG=skia:
>
> patch from issue 1396323007 at patchset 120001 (http://crrev.com/1396323007#ps120001)
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1487683004
>
> Committed: https://skia.googlesource.com/skia/+/e1102ce1d3d0895e840e756e155ec56b5a1a7540

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

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

9 years agoVisualBench: Make the Android SDL app start without cmdline arguments
kkinnunen [Thu, 14 Jan 2016 19:54:13 +0000 (11:54 -0800)]
VisualBench: Make the Android SDL app start without cmdline arguments

Make the Android SDL VisualBench start even if it is started without
command-line arguments.

Also makes it start when started by pressing the icon.

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

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

9 years agosketch SkValue API
mtklein [Thu, 14 Jan 2016 19:43:13 +0000 (11:43 -0800)]
sketch SkValue API

I think we may be trying to take too many steps at once.
Let's try starting from an API and evolving from there?

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

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

9 years agoCreate an SkCodecImageGenerator
msarett [Thu, 14 Jan 2016 19:32:43 +0000 (11:32 -0800)]
Create an SkCodecImageGenerator

BUG=skia:

patch from issue 1396323007 at patchset 120001 (http://crrev.com/1396323007#ps120001)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1487683004

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

9 years agothese _procs_arm are not used when we have NEON
mtklein [Thu, 14 Jan 2016 19:16:47 +0000 (11:16 -0800)]
these _procs_arm are not used when we have NEON

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

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

9 years agoAdd skeleton for kilobench experiments
joshualitt [Thu, 14 Jan 2016 19:05:22 +0000 (11:05 -0800)]
Add skeleton for kilobench experiments

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

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

9 years agoVirtualize Frames in GrAuditTrail
joshualitt [Thu, 14 Jan 2016 18:58:07 +0000 (10:58 -0800)]
Virtualize Frames in GrAuditTrail

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

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

9 years agoremove unused SkBitmapFilter::Allocate
reed [Thu, 14 Jan 2016 18:40:29 +0000 (10:40 -0800)]
remove unused SkBitmapFilter::Allocate

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

TBR=

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

9 years agoadd explicit bench for raw bitmapscaler
reed [Thu, 14 Jan 2016 18:10:56 +0000 (10:10 -0800)]
add explicit bench for raw bitmapscaler

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

patch from issue 1586803003 at patchset 20001 (http://crrev.com/1586803003#ps20001)

TBR=

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

9 years agoAdd Audittrail for path renderers
joshualitt [Thu, 14 Jan 2016 17:58:36 +0000 (09:58 -0800)]
Add Audittrail for path renderers

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

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

9 years agoBeginning of support for texture rectangles.
bsalomon [Thu, 14 Jan 2016 17:24:09 +0000 (09:24 -0800)]
Beginning of support for texture rectangles.

Adds support for importing a RECTANGLE texture into Skia via GrTexureProvider::wrapBackendTexture().

Tests read/writing pixels, copySurface, and clear.

Does not add support for texturing from a RECTANGLE texture as the coords will be incorrectly normalized.

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

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

9 years agoVisualBench: Use first succeeding EGL API
kkinnunen [Thu, 14 Jan 2016 17:12:01 +0000 (09:12 -0800)]
VisualBench: Use first succeeding EGL API

Fix initialization of the app window by
using the first EGL context that succeeds, not the last one.

Fixes the window creation in some cases on devices that support
OpenGL and OpenGL ES.

Also check EGL call results.

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

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

9 years agoexpand gm to exercise miplevels and various scalers
reed [Thu, 14 Jan 2016 17:11:51 +0000 (09:11 -0800)]
expand gm to exercise miplevels and various scalers

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

TBR=

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

9 years agoRevert of Make A8 readback work in more cases and improve testing. (patchset #5 id...
bsalomon [Thu, 14 Jan 2016 15:19:47 +0000 (07:19 -0800)]
Revert of Make A8 readback work in more cases and improve testing. (patchset #5 id:70001 of https://codereview.chromium.org/1584563002/ )

Reason for revert:
Breaking video tests in Chrome.

Original issue's description:
> Make A8 readback work in more cases and improve testing.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584563002
>
> Committed: https://skia.googlesource.com/skia/+/b76afedf11c7fe933954d030048c3222860249e1

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

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

9 years agoSampleApp: Make android_install_app and android_launch_app work consistently
kkinnunen [Thu, 14 Jan 2016 14:07:40 +0000 (06:07 -0800)]
SampleApp: Make android_install_app and android_launch_app work consistently

Make android_install_app work more consistently:
* App can be "SampleApp" or "VisualBench"

Make android_launch_app work more consistently:
* Parameters to SampleApp are passed correctly
* SampleApp is actually launched

The parameters to "am" need to be quoted, since the command
is run on the device shell.

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

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

9 years agoRefactor to use GrWrapTextureInBitmap more
robertphillips [Thu, 14 Jan 2016 14:03:29 +0000 (06:03 -0800)]
Refactor to use GrWrapTextureInBitmap more

Too many wrap_texture methods!

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

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

9 years agoSampleApp: Cleanup SkOSWindow_SDL
kkinnunen [Thu, 14 Jan 2016 13:37:51 +0000 (05:37 -0800)]
SampleApp: Cleanup SkOSWindow_SDL

Implements:
 * Event loop event waiting (no busy loop)
 ** Skia timers
 * Proper window sizing and resizing
 * MSAA on X11 (previously it did not use MSAA at all)
 * Changes requested colorspace from 565 to 8888
   to match non-SDL variants
 * Context creation clearing (color and stencil mask)
 * Opens the window in 640x480 by default on desktop.

Removes dead code.

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

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

9 years agosome fuzz hacking
mtklein [Thu, 14 Jan 2016 12:59:42 +0000 (04:59 -0800)]
some fuzz hacking

Try to start faster:
 - remove flags dependency
 - print nothing
 - strip unused symbols from the binary on Mac (smaller binary)
 - only create one fuzz object
 - only run one DEF_FUZZ
I am not sure if any of these things mattered, but I thought you may like to look.

Good stuff:
 - make nextU() / nextF() work
 - drop nextURange() / nextFRange() for now
 - add nextB() for a single byte

As you may have guessed, I have figured out how to use afl-fuzz on my laptop.

Syntax to run becomes:
  $ afl-fuzz ... out/Release/fuzz <DEF_FUZZ name> @@

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

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

9 years agoSimplify path allocation, clean up resources correctly
kkinnunen [Thu, 14 Jan 2016 07:36:45 +0000 (23:36 -0800)]
Simplify path allocation, clean up resources correctly

Simplify path id allocation in NVPR backend. Instead of using
an AVL tree of path id ranges for the first 65535 ids, use just
a simple stategy of overallocation and "bump index".

Fixes the bug where previously overallocated ids were not deleted.

The advantage is that the implementation is simple and all allocations
go through overallocation, not just the first 65535 of the 1-range
allocations.

Removes the logic where paths were cleared with setting path data to
null instead of deleting the whole path. Now deleted paths are just
deleted normally. These operations should have equivalent performance on
command buffer. Deleting the path should enable the driver to do more
maintainance.

Removes the GLNameAllocator, as it was only used for paths. In order for
it to be used for other IDs, it probably would need to be re-written to
support cleanup and arbitrary ranges. Also, the interface would probably
need to be changed to not requiring the block to be allocated before it
could be managed by the structure.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1150243003

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

9 years agoMake android scripts not warn about ADB in newer SDKs
kkinnunen [Thu, 14 Jan 2016 06:53:55 +0000 (22:53 -0800)]
Make android scripts not warn about ADB in newer SDKs

The older SDK says:
$ adb version
Android Debug Bridge version 1.0.32

The newer SDK says:
$ adb version
Android Debug Bridge version 1.0.32
Revision eac51f2bb6a8-android

Removes the shebang as the file is not intended to be
run, and the copyright would render it useless.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583793002

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

9 years agoOptimized premultiplying swizzles for NEON
msarett [Wed, 13 Jan 2016 22:31:59 +0000 (14:31 -0800)]
Optimized premultiplying swizzles for NEON

Improves decode performance for RGBA encoded PNGs.

Swizzle Time on Nexus 9 (with clang):
SwapPremul 0.44x
Premul     0.44x
Decode Time On Nexus 9 (with clang):
ZeroInit Decodes 0.85x
Regular  Decodes 0.86x

Swizzle Time on Nexus 6P (with clang)
SwapPremul 0.14x
Premul     0.14x
Decode Time On Nexus 6P (with clang):
ZeroInit Decodes 0.93x
Regular  Decodes 0.95x

Notes:
ZeroInit means memory is zero initialized, and we do not write to
memory for large sections of zero pixels (memory use opt for Android).

A profile on Nexus 9 shows that the premultiplication step of PNG
decoding is now ~5% of decode time (down from ~20%).

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

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

9 years agoFix SkXfermodeImageFilter GPU fast path for differing sizes.
senorblanco [Wed, 13 Jan 2016 21:48:54 +0000 (13:48 -0800)]
Fix SkXfermodeImageFilter GPU fast path for differing sizes.

The GPU fast path was not doing the correct thing for input bitmaps of
differing sizes. This change brings the fast path in line with the
slow path: use the union of foreground and background bounds as bounds,
offset the draw context by the bounds translation, and translate the
foreground and background independently by their respective offsets.

Finally, we add a texture domain for the background fragment
processor, since we may access texels outside its domain.

Note: this adds two new test cases to the xfermodeimagefilter GM, so
those will need to be rebaselined.

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

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

9 years agoFix fuzzer-found deserialization bugs
ajuma [Wed, 13 Jan 2016 21:46:31 +0000 (13:46 -0800)]
Fix fuzzer-found deserialization bugs

This fixes deserialization bugs found by fuzzing SkPaintImageFilter.

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

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

9 years agoAllow Resize to be called w/ a preallocated pixmap
reed [Wed, 13 Jan 2016 21:36:31 +0000 (13:36 -0800)]
Allow Resize to be called w/ a preallocated pixmap

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

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

9 years agoRemove remaining users of draw*Rect calls
joshualitt [Wed, 13 Jan 2016 21:35:35 +0000 (13:35 -0800)]
Remove remaining users of draw*Rect calls

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

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