Commit Graph

20320 Commits

Author SHA1 Message Date
msarett
be1d55514b 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
2016-01-21 09:05:23 -08:00
bungeman
5eff9e79da 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
2016-01-21 08:18:43 -08:00
caryclark
1a7eb26664 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
2016-01-21 07:07:02 -08:00
caryclark
46895be918 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
2016-01-21 06:54:46 -08:00
senorblanco
d247e5862e 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
2016-01-21 06:49:15 -08:00
reed
b0d25466be 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
2016-01-21 06:44:18 -08:00
bsalomon
dfe3e50522 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
2016-01-21 06:44:09 -08:00
mtklein
d4387ea993 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
2016-01-21 06:13:52 -08:00
kjlubick
dba5734409 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
2016-01-21 05:03:28 -08:00
reed
744fdb5d78 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
2016-01-21 04:33:07 -08:00
joshualitt
269a82f288 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
2016-01-20 13:54:28 -08:00
mtklein
fac3d1b725 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
2016-01-20 13:35:21 -08:00
joshualitt
01836add2a 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
2016-01-20 13:09:12 -08:00
joshualitt
ae473fdfc3 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
2016-01-20 12:35:22 -08:00
robertphillips
8bc3cf88bb 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
2016-01-20 12:00:22 -08:00
mtklein
550e9b0ef1 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
2016-01-20 11:55:51 -08:00
caryclark
88651aeb55 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
2016-01-20 11:55:11 -08:00
fmalita
55b29b2551 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
2016-01-20 11:17:40 -08:00
reed
2252edabc1 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
2016-01-20 11:04:40 -08:00
joshualitt
4e8f567fa3 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
2016-01-20 10:54:58 -08:00
halcanary
76097f8235 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
2016-01-20 10:00:26 -08:00
mtklein
5352015fa3 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
2016-01-20 09:53:59 -08:00
fs
b1475b0d41 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
2016-01-20 09:51:08 -08:00
mtklein
3425cbaee1 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
2016-01-20 08:46:40 -08:00
mtklein
26def8687f 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
2016-01-20 08:34:00 -08:00
reed
bf361d3ba2 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
2016-01-20 08:12:02 -08:00
joshualitt
b59d1bc7a8 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
2016-01-20 08:07:02 -08:00
egdaniel
c1e710140b 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
2016-01-20 07:53:51 -08:00
caryclark
2b39ffc9d2 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
2016-01-20 07:46:05 -08:00
joshualitt
323c2ebe9e 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
2016-01-20 06:48:47 -08:00
joshualitt
0d2199b3db 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
2016-01-20 06:36:09 -08:00
bsalomon
e179a9167f 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
2016-01-20 06:18:10 -08:00
mtklein
31d59e71cf 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
2016-01-19 16:26:55 -08:00
hcm
4020665b81 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
2016-01-19 13:57:27 -08:00
reed
f2e2ad0479 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
2016-01-19 13:33:32 -08:00
msarett
53b9d29b97 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
2016-01-19 13:17:58 -08:00
mtklein
bc161d6fd7 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
2016-01-19 12:42:49 -08:00
mtklein
8a87bb4d5c 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
2016-01-19 12:35:24 -08:00
mtklein
3bd5aba2a0 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
2016-01-19 12:20:01 -08:00
msarett
bda86098ab 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
2016-01-19 10:40:12 -08:00
caryclark
94ec356ed4 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
2016-01-19 09:57:16 -08:00
benjaminwagner
e83c8ebbc4 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
2016-01-19 09:50:17 -08:00
scroggo
fe35455210 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
2016-01-19 08:54:18 -08:00
senorblanco
1ea67a31c5 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
2016-01-19 08:50:18 -08:00
caryclark
b6474dd1a5 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
2016-01-19 08:07:50 -08:00
scroggo
a913275bda 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
2016-01-19 07:53:39 -08:00
joshualitt
a6bf4c54aa 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
2016-01-19 06:59:29 -08:00
kkinnunen
973d92cf91 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
2016-01-18 01:18:35 -08:00
kkinnunen
3ca7336049 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
2016-01-18 00:47:14 -08:00
reed
ab11c3f14c 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
2016-01-17 14:16:12 -08:00