platform/upstream/libSkiaSharp.git
9 years agoRevert of Font variations. (patchset #26 id:500001 of https://codereview.chromium...
robertphillips [Fri, 15 May 2015 18:30:41 +0000 (11:30 -0700)]
Revert of Font variations. (patchset #26 id:500001 of https://codereview.chromium.org/1027373002/)

Reason for revert:
Appears to be breaking  Linux ARM bots:

FAILED:
/usr/local/google/home/mosaic-role/slave/repo_clients/chromium_tot/chromium/src/../../prebuilt/toolchain/armv7a/bin/armv7a-cros-linux-gnueabi-g++
... -o obj/third_party/skia/src/ports/skia_library.SkFontHost_FreeType.o
../../third_party/skia/src/ports/SkFontHost_FreeType.cpp:37:31: fatal error:
freetype/ftmm.h: No such file or directory
 #include FT_MULTIPLE_MASTERS_H
                               ^
compilation terminated.

Original issue's description:
> Font variations.
>
> Multiple Master and TrueType fonts support variation axes.
> This implements back-end support for axes on platforms which
> support it.
>
> Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97
>
> Committed: https://skia.googlesource.com/skia/+/3489ee0f4fa34f124f9de090d12bdc2107d52aa9

TBR=reed@google.com,mtklein@google.com,djsollen@google.com,halcanary@google.com,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoRevert of antialias matrix-image-filter to get smooth diagonals (patchset #6 id:80002...
reed [Fri, 15 May 2015 17:39:17 +0000 (10:39 -0700)]
Revert of antialias matrix-image-filter to get smooth diagonals (patchset #6 id:80002 of https://codereview.chromium.org/1134743003/)

Reason for revert:
likely affect layouttests, so need to add a guard

Original issue's description:
> antialias matrix-image-filter to get smooth diagonals
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/fa33f5a6b770130acdc55f2ffe19dd545665726a

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

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

9 years agoSk4px: Difference and Exclusion
mtklein [Fri, 15 May 2015 17:36:21 +0000 (10:36 -0700)]
Sk4px: Difference and Exclusion

This will cause minor (off-by-one) diffs due to a little lost precision:
colortype_xfermodes
mixed_xfermodes
xfermodes2
xfermodeimagefilter
xfermodes3
xfermodes

Desktop:
Xfermode_Difference_aa 9.77ms -> 7.32ms 0.75x
 Xfermode_Exclusion_aa 8.49ms -> 6.21ms 0.73x
   Xfermode_Difference   17ms -> 7.54ms 0.44x
    Xfermode_Exclusion 13.5ms -> 5.09ms 0.38x

N7:
Xfermode_Difference_aa 32.2ms -> 27.6ms 0.86x
   Xfermode_Difference 43.9ms ->   32ms 0.73x
 Xfermode_Exclusion_aa 40.5ms -> 26.7ms 0.66x
    Xfermode_Exclusion 71.5ms -> 23.9ms 0.33x

This wraps up the xfermodes implemented in Sk4f.

BUG=skia:

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

9 years agoantialias matrix-image-filter to get smooth diagonals
reed [Fri, 15 May 2015 17:33:31 +0000 (10:33 -0700)]
antialias matrix-image-filter to get smooth diagonals

BUG=skia:

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

9 years agoUpdate SVGDevice for RRect and drawPoints
reed [Fri, 15 May 2015 17:11:11 +0000 (10:11 -0700)]
Update SVGDevice for RRect and drawPoints

BUG=skia:

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

9 years agoremove localmatrix from GrGeometryProcessor base class
joshualitt [Fri, 15 May 2015 14:56:07 +0000 (07:56 -0700)]
remove localmatrix from GrGeometryProcessor base class

BUG=skia:

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

9 years agoMake the c and ac scripts work with sh and without bin in PATH
kkinnunen [Fri, 15 May 2015 12:35:50 +0000 (05:35 -0700)]
Make the c and ac scripts work with sh and without bin in PATH

Make the bin/c and bin/ac scripts work with sh. The scripts are run with
/bin/sh shebang, which fails atleast on ubuntu 12.04 /bin/sh. The sh in
Ubuntu 12.04 is dash.

The fixes are according to the suggestions in http://mywiki.wooledge.org/Bashism

Also run "compare" script with explicit ./bin/ path to support people
who do not have skia/bin in PATH.

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

9 years agoadd Min to SkNi, specialized for u8 and u16 on SSE and NEON
mtklein [Fri, 15 May 2015 00:53:04 +0000 (17:53 -0700)]
add Min to SkNi, specialized for u8 and u16 on SSE and NEON

0x8001 / 0x7fff don't seem to work, but we were close: 0x8000 does.

I plan to use this to implement the Difference xfermode,
and it seems generally handy.

BUG=skia:

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

9 years agoAdd a test for decoding a gif with sampleSize 4.
scroggo [Thu, 14 May 2015 21:44:13 +0000 (14:44 -0700)]
Add a test for decoding a gif with sampleSize 4.

Prior to https://codereview.chromium.org/1085253002/, this would crash.

Only happens with interlaced gif images with an odd height. (Maybe
there are more restrictions?)

Test image provided by zoran.jovanovic@sonymobile.com for checking in.

Add include before includes.

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

9 years agoRemove high ref count tracker from GrFakeRefObj
bsalomon [Thu, 14 May 2015 21:23:11 +0000 (14:23 -0700)]
Remove high ref count tracker from GrFakeRefObj

TBR=robertphillips@google.com

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

9 years agofix path op builder
caryclark [Thu, 14 May 2015 21:18:13 +0000 (14:18 -0700)]
fix path op builder

The rewrite of path ops caused the inner contour direction to be reversed.
This exposed an existing bug in path ops builder, namely that the implicit
winding of the internal sum path could hide inner contours if they ended
up in the wrong direction.

Setting the sum path's fill type to even-odd ensures that the inner
contours aren't discarded.

R=fmalita@chromium.org
BUG=skia:3838

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

9 years agoFont variations.
bungeman [Thu, 14 May 2015 21:18:02 +0000 (14:18 -0700)]
Font variations.

Multiple Master and TrueType fonts support variation axes.
This implements back-end support for axes on platforms which
support it.

Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97

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

9 years agoRevert of Implement support for non-scale/translate CTM in image filters. (patchset...
reed [Thu, 14 May 2015 19:25:22 +0000 (12:25 -0700)]
Revert of Implement support for non-scale/translate CTM in image filters. (patchset #4 id:60001 of https://codereview.chromium.org/1140943004/)

Reason for revert:
matriximagefilter needs to antialias its draw, so we get smooth diagonals...

Original issue's description:
> Implement support for non-scale/translate CTM in image filters.
>
> Clone with tweaks of https://codereview.chromium.org/986623003/
>
> pre-cl to guard chrome here: https://codereview.chromium.org/1133403003/
>
> BUG=skia:3288
>
> Committed: https://skia.googlesource.com/skia/+/35786b176c159d2e7a816e9da9b051ef3129d5cb

TBR=robertphillips@google.com,senorblanco@google.com,senorblanco@chromium.org,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3288

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

9 years agoRevert of Temporarily revert just Multiply to see if that's the source of NEON diffs...
mtklein [Thu, 14 May 2015 18:49:01 +0000 (11:49 -0700)]
Revert of Temporarily revert just Multiply to see if that's the source of NEON diffs. (patchset #2 id:20001 of https://codereview.chromium.org/1129293005/)

Reason for revert:
Undo Xor revert.  Getting too confusing now.

Original issue's description:
> Temporarily revert just Multiply to see if that's the source of NEON diffs.
>
> Local testing is confusing and inconclusive.  Pulling out the big guns.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/5b9f352ff1e245dd48e200f8f8b683f4569547d3
>
> Committed: https://skia.googlesource.com/skia/+/6095260e55ac5f263df26cdde427531a0e7da8dd

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

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

9 years agoTemporarily revert just Multiply to see if that's the source of NEON diffs.
mtklein [Thu, 14 May 2015 17:35:33 +0000 (10:35 -0700)]
Temporarily revert just Multiply to see if that's the source of NEON diffs.

Local testing is confusing and inconclusive.  Pulling out the big guns.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/5b9f352ff1e245dd48e200f8f8b683f4569547d3

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

9 years agoRevert of Temporarily revert just Multiply to see if that's the source of NEON diffs...
mtklein [Thu, 14 May 2015 17:18:14 +0000 (10:18 -0700)]
Revert of Temporarily revert just Multiply to see if that's the source of NEON diffs. (patchset #1 id:1 of https://codereview.chromium.org/1129293005/)

Reason for revert:
Diff's still there.  Multiply is not the culprit.

Original issue's description:
> Temporarily revert just Multiply to see if that's the source of NEON diffs.
>
> Local testing is confusing and inconclusive.  Pulling out the big guns.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/5b9f352ff1e245dd48e200f8f8b683f4569547d3

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

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

9 years agoRemove viewmatrix from GrGeometryProcessor base class
joshualitt [Thu, 14 May 2015 17:09:13 +0000 (10:09 -0700)]
Remove viewmatrix from GrGeometryProcessor base class

BUG=skia:

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

9 years agoTemporarily revert just Multiply to see if that's the source of NEON diffs.
mtklein [Thu, 14 May 2015 16:17:08 +0000 (09:17 -0700)]
Temporarily revert just Multiply to see if that's the source of NEON diffs.

Local testing is confusing and inconclusive.  Pulling out the big guns.

BUG=skia:

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

9 years agoTesellating path renderer: typecast cleanup; logging build fix.
senorblanco [Thu, 14 May 2015 16:08:14 +0000 (09:08 -0700)]
Tesellating path renderer: typecast cleanup; logging build fix.

Use SkPoint* for all vertex data. (It was void* to support two different
vertex data formats, which we no longer need.)
Assert that vertex stride == sizeof(SkPoint).
Fix build when LOGGING_ENABLED=1.

BUG=skia:

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

9 years agoRevert of Defer glClear to just before draw call (patchset #2 id:20001 of https:...
robertphillips [Thu, 14 May 2015 15:54:12 +0000 (08:54 -0700)]
Revert of Defer glClear to just before draw call (patchset #2 id:20001 of https://codereview.chromium.org/1113003005/)

Reason for revert:
This CL seems to be triggering the assert:
src/gpu/SkGpuDevice.cpp:319: failed assertion "!fNeedClear"
on, at least, Mac & Ubuntu.

Original issue's description:
> Defer glClear to just before draw call
>
> Remove some DO_DEFERRED_CLEAR call to avoid call glClear separately, like this:
> glBindFramebuffer(1)
> glClear
> glBindFramebuffer(2)
> glClear
> glBindFramebuffer(1)
> glDrawXXX
> glBindFramebuffer(2)
> glDrawXXX
>
> These call sequences may need read and write memory back and forth.
>
> If we call DO_DEFERRED_CLEAR just before draw call, we can bind, clear and draw in one go.
> e.g.
> glBindFramebuffer(1)
> glClear
> glDrawXXX
> glBindFramebuffer(2)
> glClear
> glDrawXXX
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c3c06a13e69b90d4cc1d543853504072d363ae8b

TBR=bsalomon@google.com,joel.liang@arm.com,wasim.abbas@arm.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoDefer glClear to just before draw call
wasim.abbas [Thu, 14 May 2015 15:24:52 +0000 (08:24 -0700)]
Defer glClear to just before draw call

Remove some DO_DEFERRED_CLEAR call to avoid call glClear separately, like this:
glBindFramebuffer(1)
glClear
glBindFramebuffer(2)
glClear
glBindFramebuffer(1)
glDrawXXX
glBindFramebuffer(2)
glDrawXXX

These call sequences may need read and write memory back and forth.

If we call DO_DEFERRED_CLEAR just before draw call, we can bind, clear and draw in one go.
e.g.
glBindFramebuffer(1)
glClear
glDrawXXX
glBindFramebuffer(2)
glClear
glDrawXXX

BUG=skia:

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

9 years agoAndroid scripts: add --verbose, fix missing 'source android_setup'
borenet [Thu, 14 May 2015 13:37:23 +0000 (06:37 -0700)]
Android scripts: add --verbose, fix missing 'source android_setup'

BUG=skia:3836
TBR=djsollen

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

9 years agoImplement support for non-scale/translate CTM in image filters.
reed [Thu, 14 May 2015 13:36:52 +0000 (06:36 -0700)]
Implement support for non-scale/translate CTM in image filters.

Clone with tweaks of https://codereview.chromium.org/986623003/

pre-cl to guard chrome here: https://codereview.chromium.org/1133403003/

BUG=skia:3288

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

9 years agolook for deleted pts when detecting line/curve coincident edges
caryclark [Thu, 14 May 2015 12:45:54 +0000 (05:45 -0700)]
look for deleted pts when detecting line/curve coincident edges

TBR=reed@google.com
BUG=skia:3651

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

9 years agoRevert of Refactor GrBufferAllocPools to use resource cache (patchset #9 id:160001...
robertphillips [Thu, 14 May 2015 12:24:53 +0000 (05:24 -0700)]
Revert of Refactor GrBufferAllocPools to use resource cache (patchset #9 id:160001 of https://codereview.chromium.org/1139753002/)

Reason for revert:
Perf Regression for some bot/skp combinations

Original issue's description:
> Refactor GrBufferAllocPools to use resource cache
>
> Committed: https://skia.googlesource.com/skia/+/c5f1c5414fc8f73cbefadcc1b24ec794056fa203

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

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

9 years agoPerform SkPicture analysis lazily.
mtklein [Thu, 14 May 2015 02:26:14 +0000 (19:26 -0700)]
Perform SkPicture analysis lazily.

I realized when writing the comment on https://crrev.com/1135363002/
that I'd really just sketched out the entire thing, so I couldn't help
but actually write up a working CL.  How does this do for your benchmark?

BUG=chromium:487075

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

9 years agoremove color from GrGeometryProcessor
joshualitt [Wed, 13 May 2015 21:18:07 +0000 (14:18 -0700)]
remove color from GrGeometryProcessor

BUG=skia:

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

9 years agoSk4px: SrcATop, DstATop, Xor, Multiply
mtklein [Wed, 13 May 2015 21:08:45 +0000 (14:08 -0700)]
Sk4px: SrcATop, DstATop, Xor, Multiply

SSE runs 2-3x faster (than 4f), NEON runs 1.2-1.4x faster (than existing NEON).

Small diffs on {aarectmodes, imagefilters_xfermodes, hairmodes, mixed_xfermodes} only on AA edges due to precision drop.

BUG=skia:

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

9 years agoRevert of Implement support for non-scale/translate CTM in image filters. (patchset...
reed [Wed, 13 May 2015 21:00:00 +0000 (14:00 -0700)]
Revert of Implement support for non-scale/translate CTM in image filters. (patchset #4 id:60001 of https://codereview.chromium.org/1120043002/)

Reason for revert:
don't reference layer after its deleted

Original issue's description:
> Implement support for non-scale/translate CTM in image filters.
>
> Implemented by extracting out the non-scale/translate components
> and applying that post-filter as an SkMatrixImageFilter.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4f12b8bd2cb43daeffa4d1c53120ae94c5ccf486

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

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

9 years agoImplement support for non-scale/translate CTM in image filters.
reed [Wed, 13 May 2015 20:34:57 +0000 (13:34 -0700)]
Implement support for non-scale/translate CTM in image filters.

Implemented by extracting out the non-scale/translate components
and applying that post-filter as an SkMatrixImageFilter.

BUG=skia:

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

9 years agoDon't issue texture barriers for RT's with separate storage
cdalton [Wed, 13 May 2015 19:35:36 +0000 (12:35 -0700)]
Don't issue texture barriers for RT's with separate storage

BUG=skia:

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

9 years agoremoving equality / compute invariant loops from GrGeometryProcessors
joshualitt [Wed, 13 May 2015 19:24:23 +0000 (12:24 -0700)]
removing equality / compute invariant loops from GrGeometryProcessors

BUG=skia:

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

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

9 years agoSk4px: alphas() and Load[24]Alphas()
mtklein [Wed, 13 May 2015 19:19:42 +0000 (12:19 -0700)]
Sk4px: alphas() and Load[24]Alphas()

alphas() extracts the 4 alphas from an existing Sk4px as another Sk4px.
LoadNAlphas() constructs an Sk4px from N packed alphas.

In both cases, we end up with 4x repeated alphas aligned with their pixels.

alphas()
  A0 R0 G0 B0  A1 R1 G1 B1  A2 R2 G2 B2  A3 R3 G3 B3
  ->
  A0 A0 A0 A0  A1 A1 A1 A1  A2 A2 A2 A2  A3 A3 A3 A3

Load4Alphas()
  A0 A1 A2 A3
  ->
  A0 A0 A0 A0  A1 A1 A1 A1  A2 A2 A2 A2  A3 A3 A3 A3

Load2Alphas()
  A0 A1
  ->
  A0 A0 A0 A0  A1 A1 A1 A1  0 0 0 0  0 0 0 0

This is a 5-10% speedup for AA on Intel, and wash on ARM.
AA is still mostly dominated by the final lerp.

alphas() isn't used yet, but it's similar enough to Load[24]Alphas()
that it was easier to write all at once.

BUG=skia:

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

9 years agoRevert of Font variations. (patchset #21 id:400001 of https://codereview.chromium...
bungeman [Wed, 13 May 2015 19:16:41 +0000 (12:16 -0700)]
Revert of Font variations. (patchset #21 id:400001 of https://codereview.chromium.org/1027373002/)

Reason for revert:
Mac failing to build due to CFNumberType in Chromium Canary.

Original issue's description:
> Font variations.
>
> Multiple Master and TrueType fonts support variation axes.
> This implements back-end support for axes on platforms which
> support it.
>
> Committed: https://skia.googlesource.com/skia/+/05773ed30920c0214d1433c07cf6360a05476c97

TBR=reed@google.com,mtklein@google.com,djsollen@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agofix for angle bot
joshualitt [Wed, 13 May 2015 19:15:14 +0000 (12:15 -0700)]
fix for angle bot

TBR=
BUG=skia:

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

9 years agofix for blur large glyphs problems
joshualitt [Wed, 13 May 2015 19:15:06 +0000 (12:15 -0700)]
fix for blur large glyphs problems

BUG=skia:

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

9 years agoAdd _aa variants of Xfermode benches.
mtklein [Wed, 13 May 2015 18:54:00 +0000 (11:54 -0700)]
Add _aa variants of Xfermode benches.

Also, allow multiple DEF_BENCH() per line by using __COUNTER__ instead of __LINE__.

BUG=skia:

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

9 years agoKeep Big Glyph coordinates in float in GrAtlasTextContext
joshualitt [Wed, 13 May 2015 18:23:03 +0000 (11:23 -0700)]
Keep Big Glyph coordinates in float in GrAtlasTextContext

TBR=jvanverth@google.com
BUG=skia:

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

9 years agoFont variations.
bungeman [Wed, 13 May 2015 17:57:09 +0000 (10:57 -0700)]
Font variations.

Multiple Master and TrueType fonts support variation axes.
This implements back-end support for axes on platforms which
support it.

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

9 years agoRefactor GrBufferAllocPools to use resource cache
robertphillips [Wed, 13 May 2015 17:55:33 +0000 (10:55 -0700)]
Refactor GrBufferAllocPools to use resource cache

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

9 years agoRevert of Revert of Revert of Remove workaround to for lower glsl support for qualcom...
egdaniel [Wed, 13 May 2015 17:32:49 +0000 (10:32 -0700)]
Revert of Revert of Revert of Remove workaround to for lower glsl support for qualcomm (patchset #1 id:1 of https://codereview.chromium.org/1138013004/)

Reason for revert:
still broken :(

Original issue's description:
> Revert of Revert of Remove workaround to for lower glsl support for qualcomm (patchset #1 id:1 of https://codereview.chromium.org/1135393003/)
>
> Reason for revert:
> trying once more
>
> Original issue's description:
> > Revert of Remove workaround to for lower glsl support for qualcomm (patchset #1 id:1 of https://codereview.chromium.org/1133543004/)
> >
> > Reason for revert:
> > breaks many qualcomm gms
> >
> > Original issue's description:
> > > Remove workaround to for lower glsl support for qualcomm
> > >
> > > BUG=skia:
> > >
> > > Committed: https://skia.googlesource.com/skia/+/9770bdce776f45367c419b8dd82219eece26ca5c
> >
> > TBR=bsalomon@google.com
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/0cfe1242ee284290bde1ebe3f48626c555fdac51
>
> TBR=bsalomon@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b72f920ef581e9cf50a6c1afc80ed04bb086488e

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

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

9 years agoclean up tests
caryclark [Wed, 13 May 2015 17:13:17 +0000 (10:13 -0700)]
clean up tests

Confirm that no path ops tests are flaky, and clean up errors around
that. The test framework was incorrectly checking for >= MAX_ERRORS for
failure and <= MAX_ERRORS for success.

TBR=reed@google.com

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

9 years agoRemove GrGLVertexArray from GrGpuResource hierarchy.
bsalomon [Wed, 13 May 2015 16:56:37 +0000 (09:56 -0700)]
Remove GrGLVertexArray from GrGpuResource hierarchy.

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

9 years agoExtensible Android font configuration parsing.
bungeman [Wed, 13 May 2015 15:52:16 +0000 (08:52 -0700)]
Extensible Android font configuration parsing.

The xml parsing of the Android font configuration is quite lax in what
it allows. This has lead to issues with forward compatibility and
extending the existing format. This has lead to some confusion about
what the actual format is and how a given proposed change will affect
existing files and readers.

The main issue this fixes is containment. Tags are now only recognized
at the correct levels in the correct containing tags. Tags which are
not recognized are properly skipped. Tags which accumulate character
data now only accumulate the character data in their own element as
opposed to all child elements.

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

9 years agoGLProgramsTest 3.0
joshualitt [Wed, 13 May 2015 15:51:49 +0000 (08:51 -0700)]
GLProgramsTest 3.0

BUG=skia:

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

9 years agoRevert of Revert of Remove workaround to for lower glsl support for qualcomm (patchse...
egdaniel [Wed, 13 May 2015 15:46:51 +0000 (08:46 -0700)]
Revert of Revert of Remove workaround to for lower glsl support for qualcomm (patchset #1 id:1 of https://codereview.chromium.org/1135393003/)

Reason for revert:
trying once more

Original issue's description:
> Revert of Remove workaround to for lower glsl support for qualcomm (patchset #1 id:1 of https://codereview.chromium.org/1133543004/)
>
> Reason for revert:
> breaks many qualcomm gms
>
> Original issue's description:
> > Remove workaround to for lower glsl support for qualcomm
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/9770bdce776f45367c419b8dd82219eece26ca5c
>
> TBR=bsalomon@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0cfe1242ee284290bde1ebe3f48626c555fdac51

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

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

9 years agodeal more consistently with unsortable edges
caryclark [Wed, 13 May 2015 15:23:48 +0000 (08:23 -0700)]
deal more consistently with unsortable edges

Improve line/curve coincident detection and resolution. This fixed the remaining simple failures.

When an edge is unsortable, use the ray intersection to determine the angles' winding.

Deal with degenerate segments.

TBR=reed@google.com
BUG=skia:3588,skia:3762

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

9 years agoTurn on Sk4px xfermodes when we have NEON too.
mtklein [Wed, 13 May 2015 15:02:14 +0000 (08:02 -0700)]
Turn on Sk4px xfermodes when we have NEON too.

For SSE, Sk4px is better than Sk4f is better than SkXfermodes_opts_SSE2 (where implemented).
For NEON, Sk4px is better than SkXfermodes_opts_arm_neon is better than Sk4f (where implemented).

This is a 1.6-1.9x speedup for Plus,Modulate, and Screen for NEON.

BUG=skia:

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

9 years agofix bounds for BW lines, AA Hairlines
joshualitt [Wed, 13 May 2015 15:00:56 +0000 (08:00 -0700)]
fix bounds for BW lines, AA Hairlines

BUG=skia:

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

9 years agoFix assert in GrBatchAtlas.
jvanverth [Wed, 13 May 2015 14:55:55 +0000 (07:55 -0700)]
Fix assert in GrBatchAtlas.

Stops this assert from triggering on the iOS build.

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

9 years agosimplify RawIter
reed [Wed, 13 May 2015 14:55:48 +0000 (07:55 -0700)]
simplify RawIter

BUG=skia:

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

9 years agoRevert of Remove workaround to for lower glsl support for qualcomm (patchset #1 id...
egdaniel [Wed, 13 May 2015 14:21:17 +0000 (07:21 -0700)]
Revert of Remove workaround to for lower glsl support for qualcomm (patchset #1 id:1 of https://codereview.chromium.org/1133543004/)

Reason for revert:
breaks many qualcomm gms

Original issue's description:
> Remove workaround to for lower glsl support for qualcomm
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/9770bdce776f45367c419b8dd82219eece26ca5c

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

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

9 years agoRemove documentation for missing SkiaExamples.
scroggo [Wed, 13 May 2015 13:45:43 +0000 (06:45 -0700)]
Remove documentation for missing SkiaExamples.

SkiaExamples were removed in February, so no need to instruct newbies
to try building them.
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1135303002

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

9 years agoDocumentation: open GM in SampleApp
halcanary [Wed, 13 May 2015 13:45:31 +0000 (06:45 -0700)]
Documentation: open GM in SampleApp
NOTRY=true
DOCS_PREVIEW= https://skia.org/dev/testing/tests?cl=1138353002

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

9 years agoRemove workaround to for lower glsl support for qualcomm
egdaniel [Wed, 13 May 2015 13:39:38 +0000 (06:39 -0700)]
Remove workaround to for lower glsl support for qualcomm

BUG=skia:

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

9 years agoDocument NO_MERGE_BUILDS keyword
borenet [Wed, 13 May 2015 13:14:57 +0000 (06:14 -0700)]
Document NO_MERGE_BUILDS keyword

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

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

9 years agoFix SkStrokeRec == to report true for all fills
kkinnunen [Wed, 13 May 2015 07:02:26 +0000 (00:02 -0700)]
Fix SkStrokeRec == to report true for all fills

Fix SkStrokeRec == to report true for all fills, regardless
of the stale stroking data the object might contain.

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

9 years agoPlus xfermode using Sk4px.
mtklein [Tue, 12 May 2015 22:48:09 +0000 (15:48 -0700)]
Plus xfermode using Sk4px.

Xfermode_Plus runs 4-5x faster.

We expect mixed_xfermodes to have a small diff.  This is because kFoldCoverageIntoSrcAlpha was incorrectly set to true.

This implementation handily beats the Sk4f impl, the portable impl, and the existing SSE2 impl.  Reading the SkXfermodes_opts_SSE2.cpp file, I'm pretty confident that we'll be able to beat all SSE2 impls.

I believe this impl will beat or match the existing NEON impl too, but that may not be true for more complicated xfermodes.  They can take advantage of transposing ARGBARGB... to AAAARRRR.... cheaply and I haven't figured out an abstraction for that yet that doesn't screw SSE.

Adds:
  - MapDstSrc() to Sk4px
  - saturatedAdd() to SkNi (only implemented as far as it's used).
  - div255Narrow()

BUG=skia:

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

9 years agoAdd check in GrGpu createTexture to make sure we don't create multisampled textures.
egdaniel [Tue, 12 May 2015 20:36:30 +0000 (13:36 -0700)]
Add check in GrGpu createTexture to make sure we don't create multisampled textures.

BUG=skia:

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

9 years agoMake Noto Sans Mono CJK JP an alias to MS Gothic
jshin [Tue, 12 May 2015 19:08:36 +0000 (12:08 -0700)]
Make Noto Sans Mono CJK JP an alias to MS Gothic

This CL works together with the following CrOS CL:

https://chromium-review.googlesource.com/#/c/269899/

BUG=chromium:486164
TEST=With the above CrOS CL, 'MS Gothic' in CSS is replaced by 'Noto Sans Mono CJK JP'.

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

9 years agoadd option to supress prints on context
joshualitt [Tue, 12 May 2015 19:03:50 +0000 (12:03 -0700)]
add option to supress prints on context

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/55661337667a8305ebb100e36af23d34c2fb83ba

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

9 years agoFix valgrind bug in Porter Duff LCD.
egdaniel [Tue, 12 May 2015 19:03:28 +0000 (12:03 -0700)]
Fix valgrind bug in Porter Duff LCD.

BUG=skia:

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

9 years agoPerGlyphInfo is on SkTypeface
reed [Tue, 12 May 2015 17:49:15 +0000 (10:49 -0700)]
PerGlyphInfo is on SkTypeface

BUG=skia:
NOTRY=True
NOTREECHECKS=True
TBR=

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

9 years agoRevert of Revert of stop calling SkScalarDiv (patchset #1 id:1 of https://codereview...
reed [Tue, 12 May 2015 17:37:34 +0000 (10:37 -0700)]
Revert of Revert of stop calling SkScalarDiv (patchset #1 id:1 of https://codereview.chromium.org/1138263002/)

Reason for revert:
android patched, blink has rolled

Original issue's description:
> Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/)
>
> Reason for revert:
> need to wait for Blink roll (and patch android)
>
> Original issue's description:
> > stop calling SkScalarDiv
> >
> > BUG=skia:
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2629697933b5cc975e45d2a45c48f803fc6cbcec

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agofix reference to _PerGlyphInfo
reed [Tue, 12 May 2015 17:35:48 +0000 (10:35 -0700)]
fix reference to _PerGlyphInfo

BUG=skia:
TBR=bungeman@google.com
NOTRY=True
NOTREECHECKS=True

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

9 years agoopt into SkScalarDiv until we can fix android call-sites
reed [Tue, 12 May 2015 17:28:58 +0000 (10:28 -0700)]
opt into SkScalarDiv until we can fix android call-sites

BUG=skia:
TBR=
NOTRY=True

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

9 years agoRevert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromi...
reed [Tue, 12 May 2015 17:28:06 +0000 (10:28 -0700)]
Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/)

Reason for revert:
need to wait for Blink roll (and patch android)

Original issue's description:
> stop calling SkScalarDiv
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoMake SkAdvancedTypefaceMetrics private.
reed [Tue, 12 May 2015 16:50:04 +0000 (09:50 -0700)]
Make SkAdvancedTypefaceMetrics private.

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

9 years agostop calling SkScalarDiv
reed [Tue, 12 May 2015 16:47:22 +0000 (09:47 -0700)]
stop calling SkScalarDiv

BUG=skia:
TBR=

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

9 years agoquickie tool to exercise chrome filter fuzz files
caryclark [Tue, 12 May 2015 15:36:48 +0000 (08:36 -0700)]
quickie tool to exercise chrome filter fuzz files

This is a quick Skia transcription of the Chromium tool at
src/skia/tools/filter_fuzz_stub.cc
to read and decode filters captured as .fil files.

R=joshualitt@google.com,mtklein@google.com,reed@google.com,robertphillips@google.com
BUG=487213

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

9 years agoRevert of add option to supress prints on context (patchset #5 id:80001 of https...
joshualitt [Tue, 12 May 2015 15:33:36 +0000 (08:33 -0700)]
Revert of add option to supress prints on context (patchset #5 id:80001 of https://codereview.chromium.org/1128903008/)

Reason for revert:
breaks windows rollbots

Original issue's description:
> add option to supress prints on context
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/55661337667a8305ebb100e36af23d34c2fb83ba

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

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

9 years agoadd option to supress prints on context
joshualitt [Tue, 12 May 2015 14:00:57 +0000 (07:00 -0700)]
add option to supress prints on context

BUG=skia:

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

9 years agoMake Porter Duff LCD XP its own XferProcessor
egdaniel [Tue, 12 May 2015 13:11:35 +0000 (06:11 -0700)]
Make Porter Duff LCD XP its own XferProcessor

BUG=skia:

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

9 years agoSk4px
mtklein [Tue, 12 May 2015 13:11:21 +0000 (06:11 -0700)]
Sk4px

Xfermode_SrcOver:
   SSE: 2.08ms -> 2.03ms  (~2% faster)
   NEON: my N5 is noisy, but there appears to be no perf change

BUG=skia:

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

9 years agoRemove quickstart docs.
tfarina [Tue, 12 May 2015 01:19:52 +0000 (18:19 -0700)]
Remove quickstart docs.

It is now obsolete by skia.org. All the relevant doc is hosted there
now.

BUG=None
R=mtklein@google.com

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

9 years agoFix blur on large glyphs in runs < SkGlyphCache::max
joshualitt [Mon, 11 May 2015 21:52:11 +0000 (14:52 -0700)]
Fix blur on large glyphs in runs < SkGlyphCache::max

BUG=skia:

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

9 years agoremove near one check for arcs
caryclark [Mon, 11 May 2015 21:36:33 +0000 (14:36 -0700)]
remove near one check for arcs

Small arcs are pinned by SkSinCos and do not need to be additionally
pinned by SkConic::BuildUnitArc.

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

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

9 years agofix for cached textblobs look garbled
joshualitt [Mon, 11 May 2015 20:04:28 +0000 (13:04 -0700)]
fix for cached textblobs look garbled

BUG=skia:

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

9 years agoAdd virtual destructor for GrDrawTargetCaps
bsalomon [Mon, 11 May 2015 18:26:23 +0000 (11:26 -0700)]
Add virtual destructor for GrDrawTargetCaps

TBR=jvanverth@google.com

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

9 years agoAdd assignment op to enum bitfield ops
cdalton [Mon, 11 May 2015 18:21:23 +0000 (11:21 -0700)]
Add assignment op to enum bitfield ops

BUG=skia:

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

9 years agoAdd function for logging blend info on XP.
bsalomon [Mon, 11 May 2015 18:21:14 +0000 (11:21 -0700)]
Add function for logging blend info on XP.

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

9 years agoconvex path renderer unit tests
joshualitt [Mon, 11 May 2015 15:58:52 +0000 (08:58 -0700)]
convex path renderer unit tests

TBR=bsalomon@google.com
BUG=skia:

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

9 years agoAdd unit tests to text context
joshualitt [Mon, 11 May 2015 15:58:08 +0000 (08:58 -0700)]
Add unit tests to text context

TBR=bsalomon@google.com
BUG=skia:

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

9 years agoAdd unit tests for stroke rects and drawVertices
joshualitt [Mon, 11 May 2015 15:18:35 +0000 (08:18 -0700)]
Add unit tests for stroke rects and drawVertices

TBR=bsalomon@google.com
BUG=skia:

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

9 years agoAADistanceFieldPathRenderer unit tests
joshualitt [Mon, 11 May 2015 14:21:37 +0000 (07:21 -0700)]
AADistanceFieldPathRenderer unit tests

TBR=bsalomon@google.com
BUG=skia:

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

9 years agoPath ops formerly found the topmost unprocessed edge and determined its angle sort...
caryclark [Mon, 11 May 2015 14:21:27 +0000 (07:21 -0700)]
Path ops formerly found the topmost unprocessed edge and determined its angle sort order to initialize the winding. This never worked correctly with cubics and was flaky with paths consisting mostly of vertical edges.

This replacement shoots axis-aligned rays through all intersecting edges to find the outermost one either horizontally or vertically. The resulting code is smaller and twice as fast.

To support this, most of the horizontal / vertical intersection code was rewritten and standardized, and old code supporting the top-directed winding was deleted.

Contours were pointed to by an SkTDArray. Instead, put them in a linked list, and designate the list head with its own class to ensure that methods that take lists of contours start at the top. This change removed a large percentage of memory allocations used by path ops.

TBR=reed@google.com
BUG=skia:3588

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

9 years agoprint on unused uniforms in debug builds
joshualitt [Mon, 11 May 2015 13:21:34 +0000 (06:21 -0700)]
print on unused uniforms in debug builds

BUG=skia:

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

9 years agoAdd android_launch_app script to allow command line options to be passed to the sampl...
Derek Sollenberger [Mon, 11 May 2015 12:54:19 +0000 (08:54 -0400)]
Add android_launch_app script to allow command line options to be passed to the sampleApp when starting.

BUG=skia:3815
DOCS_PREVIEW= https://skia.org/?cl=1136753003
R=bungeman@google.com, tomhudson@google.com

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

9 years agoSkPictureShader: floor scaledSize not to exceed maxTextureSize
gen.kim [Mon, 11 May 2015 01:33:29 +0000 (18:33 -0700)]
SkPictureShader: floor scaledSize not to exceed maxTextureSize

scaledSize becomes larger than maxTextureSize by zoom level
because it is rounded.

BUG=chromium:485916

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

9 years agoOnly discard for XP dstCopies if we have a coverage value.
egdaniel [Sun, 10 May 2015 15:45:18 +0000 (08:45 -0700)]
Only discard for XP dstCopies if we have a coverage value.

TBR=bsalomon@google.com

BUG=skia:

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

9 years agoUpdate SKP version
skia.buildbots [Sun, 10 May 2015 08:14:35 +0000 (01:14 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agoDisable advance blend equations.
egdaniel [Fri, 8 May 2015 21:42:43 +0000 (14:42 -0700)]
Disable advance blend equations.

This is a temporary disabling of advanced blend equations till we can fix
the various bugs associated with it.

BUG=skia:3822

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

9 years agoRemove coverage multiplies when it is known to be fully opaque.
egdaniel [Fri, 8 May 2015 19:48:35 +0000 (12:48 -0700)]
Remove coverage multiplies when it is known to be fully opaque.

BUG=skia:

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

9 years agoRemove unused SK_SUPPORT_LEGACY_ROUND_MIPMAP_LEVEL_CHOICE guard
fmalita [Fri, 8 May 2015 18:40:41 +0000 (11:40 -0700)]
Remove unused SK_SUPPORT_LEGACY_ROUND_MIPMAP_LEVEL_CHOICE guard

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

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

9 years agowhitespace change (testing flaky bots)
halcanary [Fri, 8 May 2015 18:39:26 +0000 (11:39 -0700)]
whitespace change (testing flaky bots)
NOTRY=true
TBR=

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

9 years agowhitespace change
halcanary [Fri, 8 May 2015 17:53:29 +0000 (10:53 -0700)]
whitespace change
NOTRY=true
TBR=

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

9 years agoTrim whitespace from parsed filename in Android v21.
bungeman [Fri, 8 May 2015 15:31:54 +0000 (08:31 -0700)]
Trim whitespace from parsed filename in Android v21.

The entire text content of the 'font' element is currently used as the
file name. This wasn't an issue in earlier versions, as the 'file'
element was dedicated to only containing the file name. The new 'font'
element also contains a number of attributes and potentially other tags.
This means that a 'font' element can become quite long, making it
desireable to be able to split it across multiple lines.

However, splitting the 'font' element across multiple lines is currently
difficult and awkward as any whitespace outside of tags will be
considered part of the file name. This change means that any leading or
trailing whitespace will not be considered part of the file name.

This only applies to v21 and later files, so while this restricts font
file names from beginning and ending with whitespace, it is unlikely to
break any users in practice. It is probably also undesireable to have
font files with names that begin or end with whitespace in any event.

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

9 years agoremove legacy Gr things
bsalomon [Fri, 8 May 2015 14:17:05 +0000 (07:17 -0700)]
remove legacy Gr things

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

9 years agoFix convex-lineonly-paths GM so it plays nice with SampleApp
robertphillips [Fri, 8 May 2015 14:08:13 +0000 (07:08 -0700)]
Fix convex-lineonly-paths GM so it plays nice with SampleApp

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

9 years agoEnable GrAAConvexTessellator in GrAAConvexPathRenderer
robertphillips [Fri, 8 May 2015 11:46:51 +0000 (04:46 -0700)]
Enable GrAAConvexTessellator in GrAAConvexPathRenderer

This CL plumbs the GrAAConvexTessellator into the GrAAConvexPathRenderer but disables in Chrome & Android.

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