platform/upstream/libSkiaSharp.git
9 years agoFixing memory leak in ico decoder
msarett [Wed, 25 Mar 2015 13:29:18 +0000 (06:29 -0700)]
Fixing memory leak in ico decoder

BUG=skia:

NOTREECHECKS=true
TBR=scroggo@google.com
NOTRY=true

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

9 years agoEnabling ico decoding with use of png and bmp decoders
msarett [Wed, 25 Mar 2015 12:27:48 +0000 (05:27 -0700)]
Enabling ico decoding with use of png and bmp decoders

BUG=skia:3257

NOPRESUBMIT=true

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

9 years agoSkPDF refactor skpdfdocument
halcanary [Wed, 25 Mar 2015 12:06:30 +0000 (05:06 -0700)]
SkPDF refactor skpdfdocument

Most fields removed, made local to emitPDF function (since we never
emit twice).

Variables made into stack variables or auto-unrefed.

we hold devices, not pages.

addResourcesToCatalog inlined

unused setPage function removed.

deprecated getCountOfFontTypes function removed

private functions removed

BUG=skia:3585

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

9 years agoAdd copyright check to PRESUBMIT
borenet [Wed, 25 Mar 2015 11:47:02 +0000 (04:47 -0700)]
Add copyright check to PRESUBMIT

BUG=skia:1724

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

9 years agoSkChopCubicAt2 using Sk2s -- 2x faster
reed [Wed, 25 Mar 2015 02:24:34 +0000 (19:24 -0700)]
SkChopCubicAt2 using Sk2s -- 2x faster

BUG=skia:
TBR=

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

9 years agoSkPDF: unit test cleanup
halcanary [Tue, 24 Mar 2015 22:29:39 +0000 (15:29 -0700)]
SkPDF: unit test cleanup

BUG=skia:3585

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

9 years agoRevert of pathops version two (patchset #16 id:150001 of https://codereview.chromium...
reed [Tue, 24 Mar 2015 20:55:33 +0000 (13:55 -0700)]
Revert of pathops version two (patchset #16 id:150001 of https://codereview.chromium.org/1002693002/)

Reason for revert:
ASAN investigation

Original issue's description:
> pathops version two
>
> R=reed@google.com
>
> marked 'no commit' to attempt to get trybots to run
>
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/ccec0f958ffc71a9986d236bc2eb335cb2111119

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

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

9 years agoRevert of remove obsolete tests (patchset #1 id:1 of https://codereview.chromium...
caryclark [Tue, 24 Mar 2015 20:52:49 +0000 (13:52 -0700)]
Revert of remove obsolete tests (patchset #1 id:1 of https://codereview.chromium.org/1030883002/)

Reason for revert:
working on asan fix

Original issue's description:
> remove obsolete tests
>
> remove tests that are breaking the build -- uninitialized memory
>
> TBR=reed
>
> Committed: https://skia.googlesource.com/skia/+/e02c944e97ad6a3b8befb1f4f784919767941ba6

TBR=reed@android.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoRevert of fix destructor order to fix build (patchset #1 id:1 of https://codereview...
caryclark [Tue, 24 Mar 2015 20:47:57 +0000 (13:47 -0700)]
Revert of fix destructor order to fix build (patchset #1 id:1 of https://codereview.chromium.org/1033703002/)

Reason for revert:
working on asan fix

Original issue's description:
> fix destructor order to fix build
>
> TBR=reed
>
> Committed: https://skia.googlesource.com/skia/+/c207f9b2e8d6fb5386197fa8a8d258d2c4603418

TBR=reed@android.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoRevert of Enabling ico decoding with use of png and bmp decoders (patchset #10 id...
tomhudson [Tue, 24 Mar 2015 20:47:41 +0000 (13:47 -0700)]
Revert of Enabling ico decoding with use of png and bmp decoders (patchset #10 id:280001 of https://codereview.chromium.org/1011343003/)

Reason for revert:
Reverting on suspicion of massive bot failures - possible command line too long?

Original issue's description:
> Enabling ico decoding with use of png and bmp decoders
>
> BUG=skia:3257
>
> Committed: https://skia.googlesource.com/skia/+/15bfd075d38e4422a477e22940d06a137f66cc97

TBR=scroggo@google.com,reed@google.com,djsollen@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3257

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

9 years agoSwitch DM to use utils/android/SkAndroidSDKCanvas
tomhudson [Tue, 24 Mar 2015 19:46:40 +0000 (12:46 -0700)]
Switch DM to use utils/android/SkAndroidSDKCanvas

Use (better) paint filter shared with nanobench, instead
of custom implementation.

R=djsollen@google.com

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

9 years agoEnabling ico decoding with use of png and bmp decoders
msarett [Tue, 24 Mar 2015 19:24:27 +0000 (12:24 -0700)]
Enabling ico decoding with use of png and bmp decoders

BUG=skia:3257

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

9 years agoFix assert in debugger
robertphillips [Tue, 24 Mar 2015 18:09:07 +0000 (11:09 -0700)]
Fix assert in debugger

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

9 years agoIncrease timeout of ukwsj to get more consistent SKP captures
rmistry [Tue, 24 Mar 2015 17:58:37 +0000 (10:58 -0700)]
Increase timeout of ukwsj to get more consistent SKP captures

BUG=skia:3574
TBR=borenet
NOTRY=true

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

9 years agoSkPDF: Fix leak in SkPDFShader
halcanary [Tue, 24 Mar 2015 17:21:34 +0000 (10:21 -0700)]
SkPDF: Fix leak in SkPDFShader

TBR=mtklein@google.com

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

9 years agoenable color-matrix-floats again, watching arm64 bots
reed [Tue, 24 Mar 2015 17:04:38 +0000 (10:04 -0700)]
enable color-matrix-floats again, watching arm64 bots

BUG=skia:
TBR=mtklein@google.com

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

9 years agoGo back to storeAligned / LoadAligned for SkPMFloat <->Sk4f.
mtklein [Tue, 24 Mar 2015 16:47:11 +0000 (09:47 -0700)]
Go back to storeAligned / LoadAligned for SkPMFloat <->Sk4f.

This seems to fix the miscompilation bug on ARM64 / Release / GCC 4.9.

We switched this over originally for perf issues with NEON, but I can't see any now.  Will keep an eye out.

BUG=skia:3570

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

9 years agofix destructor order to fix build
caryclark [Tue, 24 Mar 2015 16:16:25 +0000 (09:16 -0700)]
fix destructor order to fix build

TBR=reed

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

9 years agoremove obsolete tests
caryclark [Tue, 24 Mar 2015 15:17:16 +0000 (08:17 -0700)]
remove obsolete tests

remove tests that are breaking the build -- uninitialized memory

TBR=reed

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

9 years agoSkPDF: clean up extra references
halcanary [Tue, 24 Mar 2015 15:12:55 +0000 (08:12 -0700)]
SkPDF:  clean up extra references

This cleans up code left behind from  http://crrev.com/870333002

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

9 years agoMove SkMatrixImageFilter.h into src/core.
senorblanco [Tue, 24 Mar 2015 14:51:30 +0000 (07:51 -0700)]
Move SkMatrixImageFilter.h into src/core.

Callers in Blink have been updated to call
SkImageFilter::CreateMatrixFilter() instead.

BUG=skia:3568

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

9 years agopathops version two
caryclark [Tue, 24 Mar 2015 14:28:17 +0000 (07:28 -0700)]
pathops version two

R=reed@google.com

marked 'no commit' to attempt to get trybots to run

TBR=reed@google.com

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

9 years agoRevert of Revert of remove colorfilter native-565 support. complicating w/ no real...
reed [Tue, 24 Mar 2015 13:35:23 +0000 (06:35 -0700)]
Revert of Revert of remove colorfilter native-565 support. complicating w/ no real value. (patchset #1 id:1 of https://codereview.chromium.org/1022673007/)

Reason for revert:
fix for chrome has landed...

Original issue's description:
> Revert of remove colorfilter native-565 support. complicating w/ no real value. (patchset #2 id:20001 of https://codereview.chromium.org/1015533011/)
>
> Reason for revert:
> skia/ext/benchmarking_canvas.cc references HasFilter16 :(
>
> Original issue's description:
> > remove colorfilter native-565 support. complicating w/ no real value.
> >
> > BUG=skia:
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/2151353d161fe389cdc0db62cfe1932c7680f710
>
> TBR=reed@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/92b47c49016749249ff8521e424c4373b4a74241

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

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

9 years agoaacc + bbdd
mtklein [Tue, 24 Mar 2015 13:16:30 +0000 (06:16 -0700)]
aacc + bbdd

SkMatrix::mapPts() using aacc/bbdd was always worse than using badc():
  - On Intel, it was faster than exisiting swizzle, but badc() is 10% faster still (one pshufd instead of two).
  - On ARM, existing swizzle < badc() < aacc()+bbdd(), even though aacc() then bbdd() is really a single vtrn instruction.

I will revert SkMatrix.cpp before submitting.  Just thought you might like to look.

Will think more and try to gear up Instruments on ARM.

BUG=skia:

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

9 years agoRevert of remove colorfilter native-565 support. complicating w/ no real value. ...
reed [Tue, 24 Mar 2015 12:18:09 +0000 (05:18 -0700)]
Revert of remove colorfilter native-565 support. complicating w/ no real value. (patchset #2 id:20001 of https://codereview.chromium.org/1015533011/)

Reason for revert:
skia/ext/benchmarking_canvas.cc references HasFilter16 :(

Original issue's description:
> remove colorfilter native-565 support. complicating w/ no real value.
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/2151353d161fe389cdc0db62cfe1932c7680f710

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

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

9 years agoRevert "Revert of impl colormatrix w/ floats (patchset #7 id:120001 of https://codere...
reed [Tue, 24 Mar 2015 11:13:45 +0000 (04:13 -0700)]
Revert "Revert of impl colormatrix w/ floats (patchset #7 id:120001 of https://codereview.chromium.org/967943002/)"

disabled for the momment -- need to understand arm64 glitches

This reverts commit 374a4c3b744e8c77455efa73b139950136f7b374.

BUG=skia:
TBR=

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

9 years agoremove colorfilter native-565 support. complicating w/ no real value.
reed [Tue, 24 Mar 2015 10:50:22 +0000 (03:50 -0700)]
remove colorfilter native-565 support. complicating w/ no real value.

BUG=skia:
TBR=

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

9 years agoRevert of correct reporting of kAlphaUnchanged_Flag in ModeFilter (patchset #1 id...
reed [Tue, 24 Mar 2015 10:48:27 +0000 (03:48 -0700)]
Revert of correct reporting of kAlphaUnchanged_Flag in ModeFilter (patchset #1 id:1 of https://codereview.chromium.org/1033583002/)

Reason for revert:
reverting experiment. need to rebaseilne layouttest

svg/css/text-gradient-shadow.svg

Original issue's description:
> correct reporting of kAlphaUnchanged_Flag in ModeFilter
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/afced66b508ac4cd3616e2f707db27b7d6f670e1

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

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

9 years agocorrect reporting of kAlphaUnchanged_Flag in ModeFilter
reed [Tue, 24 Mar 2015 03:05:04 +0000 (20:05 -0700)]
correct reporting of kAlphaUnchanged_Flag in ModeFilter

BUG=skia:
TBR=

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

9 years agoRevert of impl colormatrix w/ floats (patchset #7 id:120001 of https://codereview...
reed [Tue, 24 Mar 2015 01:52:57 +0000 (18:52 -0700)]
Revert of impl colormatrix w/ floats (patchset #7 id:120001 of https://codereview.chromium.org/967943002/)

Reason for revert:
Arm64 seems to be having glitches :(

See gm:colormatrix on Arm64/TegraK1/Nexus9

last square should be all white, but it has stripes

Original issue's description:
> impl colormatrix w/ floats
>
> this needs to land first https://codereview.chromium.org/1031713003
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7971def11be91ed08eae7107b372322d24e67544

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

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

9 years agoimpl colormatrix w/ floats
reed [Mon, 23 Mar 2015 21:35:25 +0000 (14:35 -0700)]
impl colormatrix w/ floats

this needs to land first https://codereview.chromium.org/1031713003

BUG=skia:

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

9 years agoStart fresh on swizzles
mtklein [Mon, 23 Mar 2015 20:19:03 +0000 (13:19 -0700)]
Start fresh on swizzles

This removes all the existing Sk4x swizzles and adds badc(), which is
both fast on all implementations and currently useful.

BUG=skia:

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

9 years agoBoth DM and nanobench need this, so moving the duplicated code to
tomhudson [Mon, 23 Mar 2015 19:51:20 +0000 (12:51 -0700)]
Both DM and nanobench need this, so moving the duplicated code to
one common spot. (It's incomplete, and has had bugs, so it's not
like we can confidently write once, copy-paste, and not maintain
again.)

Because SkPathEffect::exposedInAndroidJavaAPI() only builds in the
Android Framework, we might want to make all this code Framework-only?

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

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

9 years agoReplace _mm_cvtps_epi32(x) with _mm_cvttps_epi32(_mm_add_ps(0.5f), x).
mtklein [Mon, 23 Mar 2015 19:01:45 +0000 (12:01 -0700)]
Replace _mm_cvtps_epi32(x) with _mm_cvttps_epi32(_mm_add_ps(0.5f), x).

We don't have control over which way _mm_cvtps_epi32 rounds.

  - This makes the SSE SkPMFloat rounding consistent with _neon and _none.
  - Sk4f::cast<Sk4i>() is closer to (int)float's behavior.  (Correct when >=0).

Add tests that would fail at head.

BUG=skia:

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

9 years agoAdd font "index" to lmp parser.
bungeman [Mon, 23 Mar 2015 16:08:54 +0000 (09:08 -0700)]
Add font "index" to lmp parser.

When ttc index support was added, it was added and tested on Android
with the jb parser. This adds it to the lmp parser.

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

9 years agoremove meaningless matrix benches, add mapPts() and add new benches
reed [Mon, 23 Mar 2015 15:15:14 +0000 (08:15 -0700)]
remove meaningless matrix benches, add mapPts() and add new benches

mapPts definitely faster than mapPoints (identity and perspective same speed). Up to 3x for large values of N.

cloned from https://codereview.chromium.org/1031443002/

BUG=skia:

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

9 years agoInitial change to move text blob to GrTextContext
joshualitt [Mon, 23 Mar 2015 15:13:04 +0000 (08:13 -0700)]
Initial change to move text blob to GrTextContext

BUG=skia:

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

9 years agoGet rid of excess cleverness in benchmark
tomhudson [Mon, 23 Mar 2015 14:46:13 +0000 (07:46 -0700)]
Get rid of excess cleverness in benchmark

RotatedRectBench was asking for its base layer size, which may
not be what it expects with odd canvas modes (particularly proxies).
Most benchmarks are not so sophisticated; they hard-wire their
size and just use that (expected) value.

R=mtklein@google.com,djsollen@google.com
BUG=skia:3566

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

9 years agoMake SkCanvas::getBaseLayerSize() virtual
tomhudson [Mon, 23 Mar 2015 14:22:40 +0000 (07:22 -0700)]
Make SkCanvas::getBaseLayerSize() virtual

Subclasses of SkCanvas may need to override the behavior here - for
example, any proxy or deferred canvas may not know its own size and
need to delegate to another object.

We'll also work on reducing use of this function
(https://skbug.com/3569), but some of the current uses seem to be
semantically necessary.

R=reed@google.com
BUG=skia:3566

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

9 years agoFix two typos in coding style
kkinnunen [Mon, 23 Mar 2015 13:27:23 +0000 (06:27 -0700)]
Fix two typos in coding style

Fix two typos in coding style:
- Memory Managemt
- if (NULL == x) equated to if (x)
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1032463002

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

9 years agoPreserve texture compression when saving a revised skp from debugger
robertphillips [Mon, 23 Mar 2015 12:46:51 +0000 (05:46 -0700)]
Preserve texture compression when saving a revised skp from debugger

Without this CL, saving a revised skp out the debugger can greatly expand the memory it requires.

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

9 years agoDo not playback pending commands for full deferred canvas writePixels
kkinnunen [Mon, 23 Mar 2015 09:18:02 +0000 (02:18 -0700)]
Do not playback pending commands for full deferred canvas writePixels

Do not playback pending commands for full deferred canvas writePixels.

Changes the test to catch cases where discard is done without
a snapshot.

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

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

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agoremove SK_SUPPORT_LEGACY_ARCTO_QUADS code
reed [Sat, 21 Mar 2015 02:41:10 +0000 (19:41 -0700)]
remove SK_SUPPORT_LEGACY_ARCTO_QUADS code

BUG=skia:
TBR=

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

9 years agochange default impl to facilitate transition in blink/chrome
reed [Fri, 20 Mar 2015 22:25:25 +0000 (15:25 -0700)]
change default impl to facilitate transition in blink/chrome

BUG=skia:
TBR=

need deps roll to see if this works... since skia can no longer build/test in this legacy mode.

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

9 years agoremove SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE code
reed [Fri, 20 Mar 2015 21:20:09 +0000 (14:20 -0700)]
remove SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE code

BUG=skia:
TBR=

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

9 years agoSome usability ideas around SkTHash.
mtklein [Fri, 20 Mar 2015 20:48:42 +0000 (13:48 -0700)]
Some usability ideas around SkTHash.

  - By default, use new SkGoodHash to hash keys, which is:
    * for 4 byte values, use SkChecksum::Mix,
    * for SkStrings, use SkChecksum::Murmur3 on the data,
    * for other structs, shallow hash the struct with Murmur3.
  - Expand SkChecksum::Murmur3 to support non-4-byte-aligned data.
  - Add const foreach() methods.
  - Have foreach() take a functor, which allows lambdas.

BUG=skia:

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

9 years agocleanup using constructors
reed [Fri, 20 Mar 2015 20:46:08 +0000 (13:46 -0700)]
cleanup using constructors

BUG=skia:
TBR=

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

9 years agouse Sk2s for conics
reed [Fri, 20 Mar 2015 20:23:43 +0000 (13:23 -0700)]
use Sk2s for conics

BUG=skia:

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

9 years agoSk2x::invert() and Sk2x::approxInvert()
mtklein [Fri, 20 Mar 2015 20:17:42 +0000 (13:17 -0700)]
Sk2x::invert() and Sk2x::approxInvert()

BUG=skia:

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

9 years agoReturn to old distance field glyph sizes.
jvanverth [Fri, 20 Mar 2015 19:35:07 +0000 (12:35 -0700)]
Return to old distance field glyph sizes.

Should fix some blurry or light glyphs on Windows.

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

9 years agoPDF: remove last use of SkPDFImage
halcanary [Fri, 20 Mar 2015 19:31:52 +0000 (12:31 -0700)]
PDF: remove last use of SkPDFImage

Add a GM.

BUG=skia:255

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

9 years agoHack around skia:3570 for now.
mtklein [Fri, 20 Mar 2015 19:21:53 +0000 (12:21 -0700)]
Hack around skia:3570 for now.

BUG=skia:3570

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

9 years agoAdd SkEncodedFormat, used by SkCodec.
scroggo [Fri, 20 Mar 2015 18:55:55 +0000 (11:55 -0700)]
Add SkEncodedFormat, used by SkCodec.

Needed by Android to determine the format.

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

9 years agoAdd divide to Sk2x, use native vdiv and vsqrt on ARM 64.
mtklein [Fri, 20 Mar 2015 18:28:52 +0000 (11:28 -0700)]
Add divide to Sk2x, use native vdiv and vsqrt on ARM 64.

Tests pass on N7 + N9.

BUG=skia:

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Build-Ubuntu-GCC-Arm64-Release-Android-Trybot

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

9 years agoAllow negative error for Sk4f::sqrt() test.
mtklein [Fri, 20 Mar 2015 18:20:12 +0000 (11:20 -0700)]
Allow negative error for Sk4f::sqrt() test.

BUG=skia:

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

9 years agoMake android framework depend on SkCodec.
scroggo [Fri, 20 Mar 2015 18:20:02 +0000 (11:20 -0700)]
Make android framework depend on SkCodec.

This results in exporting include/codec so the framework can use it.

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

9 years agoLet text contexts fall back directly to paths
joshualitt [Fri, 20 Mar 2015 17:30:14 +0000 (10:30 -0700)]
Let text contexts fall back directly to paths

BUG=skia:

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

9 years agoRevert of PDF: remove last use of SkPDFImage (patchset #5 id:120001 of https://codere...
reed [Fri, 20 Mar 2015 17:03:36 +0000 (10:03 -0700)]
Revert of PDF: remove last use of SkPDFImage (patchset #5 id:120001 of https://codereview.chromium.org/950633003/)

Reason for revert:
static void draw(SkCanvas* canvas,
                 const SkPaint& p,
                 const SkBitmap& src,
                 SkColorType colorType,
                 const char text[]) {
    SkASSERT(src.colorType() == colorType);
    canvas->drawBitmap(src, 0.0f, 0.0f);
    canvas->drawText(text, strlen(text), 0.0f, 12.0f, p);
}

This assert is firing, at least on macs, where all images get decoded into 32bit at the moment.

Original issue's description:
> PDF: remove last use of SkPDFImage
>
> Add a GM.
>
> BUG=skia:255
>
> Committed: https://skia.googlesource.com/skia/+/86ad8d643624a55b02e529100bbe4e2940115fa1

TBR=mtklein@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:255

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

9 years agoSpecialize Sk2d for ARM64
mtklein [Fri, 20 Mar 2015 16:25:26 +0000 (09:25 -0700)]
Specialize Sk2d for ARM64

The implementation is nearly identical to Sk2f, with these changes:
  - float32x2_t -> float64x2_t
  - vfoo -> vfooq
  - one extra Newton's method step in sqrt().

Also, generally fix NEON detection to be defined(SK_ARM_HAS_NEON).
SK_ARM_HAS_NEON is not being set on ARM64 bots right now (nor does the compiler
seem to set __ARM_NEON__), so this CL fixes everything up.

BUG=skia:

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

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Build-Ubuntu-GCC-Arm64-Release-Android-Trybot

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

9 years agoReplace SSE optimization of Color32A_D565
henrik.smiding [Fri, 20 Mar 2015 16:20:46 +0000 (09:20 -0700)]
Replace SSE optimization of Color32A_D565

Adds an SSE2 version of the Color32A_D565 function, to replace
the existing SSE4 version. Also does some minor cleanup.

Performance improvement in the following Skia benchmarks.
Measured on Atom Silvermont:
  Xfermode_SrcOver       - x3
  luma_colorfilter_large - x4.6
  luma_colorfilter_small - x2
  tablebench             - ~15%
  chart_bw               - ~10%

Measured on Corei7 Haswell:
luma_colorfilter_large running SSE2 - x2
luma_colorfilter_large running SSE4 - x2.3

Also improves performance in WPS Office application and 2D subtest of 0xbenchmark on Android.

Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
Review URL: https://codereview.chromium.org/923523002

9 years agoPDF: remove last use of SkPDFImage
halcanary [Fri, 20 Mar 2015 16:10:56 +0000 (09:10 -0700)]
PDF: remove last use of SkPDFImage

Add a GM.

BUG=skia:255

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

9 years agoAdd a new GM to show problems with shear/rotate CTM w/ image filters.
senorblanco [Fri, 20 Mar 2015 15:54:32 +0000 (08:54 -0700)]
Add a new GM to show problems with shear/rotate CTM w/ image filters.

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

9 years agoRevert of Specialize Sk2d for ARM64 (patchset #3 id:40001 of https://codereview.chrom...
mtklein [Fri, 20 Mar 2015 15:46:34 +0000 (08:46 -0700)]
Revert of Specialize Sk2d for ARM64 (patchset #3 id:40001 of https://codereview.chromium.org/1020963002/)

Reason for revert:
https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Mac10.7-Clang-Arm7-Debug-iOS/builds/2441/steps/build%20most/logs/stdio

https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Mac10.7-Clang-Arm7-Release-iOS/builds/2424/steps/build%20most/logs/stdio

https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Ubuntu-GCC-Arm64-Release-Android/builds/8/steps/build%20most/logs/stdio

Original issue's description:
> Specialize Sk2d for ARM64
>
> The implementation is nearly identical to Sk2f, with these changes:
>   - float32x2_t -> float64x2_t
>   - vfoo -> vfooq
>   - one extra Newton's method step in sqrt().
>
> Also, generally fix NEON detection to be defined(SK_ARM_HAS_NEON).
> SK_ARM_HAS_NEON is not being set on ARM64 bots right now (nor does the compiler
> seem to set __ARM_NEON__), so this CL fixes everything up.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e57b5cab261a243dcbefa74c91c896c28959bf09

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

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

9 years agoSpecialize Sk2d for ARM64
mtklein [Fri, 20 Mar 2015 15:32:35 +0000 (08:32 -0700)]
Specialize Sk2d for ARM64

The implementation is nearly identical to Sk2f, with these changes:
  - float32x2_t -> float64x2_t
  - vfoo -> vfooq
  - one extra Newton's method step in sqrt().

Also, generally fix NEON detection to be defined(SK_ARM_HAS_NEON).
SK_ARM_HAS_NEON is not being set on ARM64 bots right now (nor does the compiler
seem to set __ARM_NEON__), so this CL fixes everything up.

BUG=skia:

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

9 years agoFix ambiguity in negate()s.
Mike Klein [Fri, 20 Mar 2015 15:19:01 +0000 (11:19 -0400)]
Fix ambiguity in negate()s.

BUG=skia:

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

9 years agoSk2x/Sk4x: add negate(), operator -()
mtklein [Fri, 20 Mar 2015 15:12:06 +0000 (08:12 -0700)]
Sk2x/Sk4x: add negate(), operator -()

BUG=skia:

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

9 years agoOnly use 256x256 tiles on hd2000 nanobench bots
egdaniel [Fri, 20 Mar 2015 14:03:52 +0000 (07:03 -0700)]
Only use 256x256 tiles on hd2000 nanobench bots

Initial experiments did show that the 256 tile size fixed the hd2000 win7
nanobot failures. However it did not have any effect on other bots, so this
change is to move back to the larger tile size on all bots expect for the
hd2000.

BUG=skia:

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

9 years agoDisable sharing of stencil buffers across differently sized rendertargets
robertphillips [Fri, 20 Mar 2015 13:43:11 +0000 (06:43 -0700)]
Disable sharing of stencil buffers across differently sized rendertargets

Due to revertapalooza, stencil buffers shared across differently sized rendertargets aren't getting cleared correctly. This CL disables the sharing until the clearing issues can be remedied. Note that stencil buffers should still be shared between identically sized render targets and should still be lazily allocated.

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

9 years agoMove SkMatrixImageFilter into core, and add a factory fn for it.
senorblanco [Fri, 20 Mar 2015 13:38:17 +0000 (06:38 -0700)]
Move SkMatrixImageFilter into core, and add a factory fn for it.

BUG=skia:

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

9 years agoRemove deprecated flavour of SkDropShadowImageFilter::Create().
senorblanco [Fri, 20 Mar 2015 13:38:00 +0000 (06:38 -0700)]
Remove deprecated flavour of SkDropShadowImageFilter::Create().

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

9 years agoGuard SIMD code with !defined(SKNX_NO_SIMD).
mtklein [Fri, 20 Mar 2015 13:33:02 +0000 (06:33 -0700)]
Guard SIMD code with !defined(SKNX_NO_SIMD).

This should make it easy to compare performance of the non-SIMD Sk2x / Sk4x
code with our existing portable scalar code.  I'm not adding this to SkPMFloat
only because we don't have an existing scalar baseline there to compare to.

We'll have to keep our wits about us: I just tried your new benchmarks, and
Clang's autovectorizer produced almost as good SSE as we did with intrinsics for
geo_evalquadat1 and geo_evalquadtangentat1, but not for geo_chopquadat1,
which went serial.

BUG=skia:

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

9 years agodisable LCD for layers w/ filters
reed [Fri, 20 Mar 2015 13:32:52 +0000 (06:32 -0700)]
disable LCD for layers w/ filters

BUG=468311

see also skiabug.com/3567

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

9 years agouse Sk2s for EvalQuadTangent and ChopQuadAt
reed [Fri, 20 Mar 2015 13:01:08 +0000 (06:01 -0700)]
use Sk2s for EvalQuadTangent and ChopQuadAt

cloned from https://codereview.chromium.org/1026633002/

BUG=skia:

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

9 years agooperator overloads for Sk4x, use them all where possible
mtklein [Fri, 20 Mar 2015 13:00:57 +0000 (06:00 -0700)]
operator overloads for Sk4x, use them all where possible

BUG=skia:
NOTRY=true

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

9 years agoadd SkMatrix::decomposeScale
reed [Thu, 19 Mar 2015 23:10:54 +0000 (16:10 -0700)]
add SkMatrix::decomposeScale

BUG=skia:

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

9 years agoTry out operator overloads for Sk2x.
mtklein [Thu, 19 Mar 2015 21:28:31 +0000 (14:28 -0700)]
Try out operator overloads for Sk2x.

BUG=skia:

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

9 years agoSupport BGR with DirectWrite.
bungeman [Thu, 19 Mar 2015 20:57:36 +0000 (13:57 -0700)]
Support BGR with DirectWrite.

BUG=chromium:468509

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

9 years agoRemove now-unused uniqueID param from SkDropShadowImageFilter::Create().
senorblanco [Thu, 19 Mar 2015 20:39:19 +0000 (13:39 -0700)]
Remove now-unused uniqueID param from SkDropShadowImageFilter::Create().

Also make both input & crop rect default NULL, as in other filter Create functions.

BUG=skia:

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

9 years agoBlacklist certain win7 gms that are never finishing on dm
egdaniel [Thu, 19 Mar 2015 20:09:17 +0000 (13:09 -0700)]
Blacklist certain win7 gms that are never finishing on dm

BUG=skia:

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

9 years agoSk2x for NEON
mtklein [Thu, 19 Mar 2015 19:08:29 +0000 (12:08 -0700)]
Sk2x for NEON

Also decreases the precision of Sk4f::rsqrt() for speed, keeping Sk4f::sqrt() the same:
instead of doing two estimation steps in rsqrt(), do one there and one more in sqrt().

Tests pass on my Nexus 7.  float64x2_t is still a TODO for when I get a hold of a Nexus 9.

BUG=skia:

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

9 years agoPort to real Sk2f.
mtklein [Thu, 19 Mar 2015 19:03:29 +0000 (12:03 -0700)]
Port to real Sk2f.

The bench improves from 39 to 30, about half from porting to Sk2f, half from
x.add(x) instead of x.multiply(two).

Remove Sk4f Load2/store2 now that we have Sk2f.

BUG=skia:

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

9 years agoremove unneeded SK_SUPPORT_LEGACY_MIPMAP_EFFECTIVE_SCALE guard
reed [Thu, 19 Mar 2015 18:37:18 +0000 (11:37 -0700)]
remove unneeded SK_SUPPORT_LEGACY_MIPMAP_EFFECTIVE_SCALE guard

BUG=skia:
TBR=

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

9 years agoAdd minimum size for using distance fields.
jvanverth [Thu, 19 Mar 2015 18:34:13 +0000 (11:34 -0700)]
Add minimum size for using distance fields.

Since we're not scaling down as far, we can increase the base
sizes a little.

Also darken debug text colors to get better value comparison
with black.

BUG=skia:3541

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

9 years agoMove skp nanobench tile size back to 256x256 to see if it fixes nanobench crashes
egdaniel [Thu, 19 Mar 2015 18:00:09 +0000 (11:00 -0700)]
Move skp nanobench tile size back to 256x256 to see if it fixes nanobench crashes

Going back to old nanobench tile size to see if the increase to tile is what has been
causing recent nanobench crashes. The crashes seem very nondeterministic and hard to
debug manually.

256x256 is too small of a tile to give accurate gpu results but if this fixes we can try some compromise in the middle

BUG=skia:

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

9 years agoSk2x
mtklein [Thu, 19 Mar 2015 17:44:27 +0000 (10:44 -0700)]
Sk2x

This adds an API, an SSE impl, a portable impl, and some tests for Sk2f/Sk2d/Sk2s.

BUG=skia:

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

9 years agoUse typographic font metrics when the font requests.
bungeman [Thu, 19 Mar 2015 17:43:57 +0000 (10:43 -0700)]
Use typographic font metrics when the font requests.

FreeType always returns the 'hhea' font metrics for ascent and descent,
and ignores the 'OS/2'::fsSelection::UseTypoMetrics bit. (It also
ignores the VDMX table, which makes this change correct.) This change
uses the typographic font metrics when the font requests their use.

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

9 years agoReorg Sk4x to match the pattern of SkPMFloat.
mtklein [Thu, 19 Mar 2015 17:19:48 +0000 (10:19 -0700)]
Reorg Sk4x to match the pattern of SkPMFloat.

No real changes here, just moving files around:
  - move impl files into src/opts
  - rename _portable _none

BUG=skia:

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

9 years agoalt SkEvalQuadAt that returns its answer, using Sk2f
reed [Thu, 19 Mar 2015 17:18:47 +0000 (10:18 -0700)]
alt SkEvalQuadAt that returns its answer, using Sk2f

BUG=skia:

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

9 years agoremove unused clip parameter to SkEdge::setClip
reed [Thu, 19 Mar 2015 16:49:09 +0000 (09:49 -0700)]
remove unused clip parameter to SkEdge::setClip

BUG=skia:

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

9 years agoguarded change to SkImageGenerator to make getInfo() const
reed [Thu, 19 Mar 2015 15:31:14 +0000 (08:31 -0700)]
guarded change to SkImageGenerator to make getInfo() const

BUG=skia:

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

9 years agoWhitespace change to test the CQ
rmistry [Thu, 19 Mar 2015 14:56:12 +0000 (07:56 -0700)]
Whitespace change to test the CQ

BUG=skia:
TBR=

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

9 years agoEnsure that we use different glyph entries for regular and df text.
jvanverth [Thu, 19 Mar 2015 13:08:31 +0000 (06:08 -0700)]
Ensure that we use different glyph entries for regular and df text.

Currently if we switch between regular text and df text while using
the same GrContext, they may use the same entry in the Ganesh font cache,
which is incorrect. This change ensures that they will have different entries.

Committed: https://skia.googlesource.com/skia/+/8dc58edd71c11f232860724dfa3b566895478034

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

9 years agoRun CodecSrc DM.
scroggo [Thu, 19 Mar 2015 13:03:39 +0000 (06:03 -0700)]
Run CodecSrc  DM.

Rather than making SkCodec an option instead of SkImageDecoder,
create a separate CodecSrc. This allows us to compare the two.

For both CodecSrc and ImageSrc, do not decode to a gpu backend.

BUG=skia:3475

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

9 years agoRevert of replace SkFixedDiv impl with native 64bit math (patchset #2 id:20001 of...
reed [Thu, 19 Mar 2015 11:10:42 +0000 (04:10 -0700)]
Revert of replace SkFixedDiv impl with native 64bit math (patchset #2 id:20001 of https://codereview.chromium.org/1022543003/)

Reason for revert:
http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/53096

layouttests failures

Original issue's description:
> replace SkFixedDiv impl with native 64bit math
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/7c44ca926bf42b3b2e56131f250c0fd58f87ac71

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

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

9 years agoremove unused SkXRay functions
reed [Thu, 19 Mar 2015 02:32:47 +0000 (19:32 -0700)]
remove unused SkXRay functions

BUG=skia:
TBR=

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

9 years agoreplace SkFixedDiv impl with native 64bit math
reed [Thu, 19 Mar 2015 02:04:43 +0000 (19:04 -0700)]
replace SkFixedDiv impl with native 64bit math

BUG=skia:
TBR=

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

9 years agoRevert of Ensure that we use different glyph entries for regular and df text. (patchs...
jvanverth [Wed, 18 Mar 2015 22:14:05 +0000 (15:14 -0700)]
Revert of Ensure that we use different glyph entries for regular and df text. (patchset #2 id:20001 of https://codereview.chromium.org/1020593003/)

Reason for revert:
Bad glyphs in dftext GM.

Original issue's description:
> Ensure that we use different glyph entries for regular and df text.
>
> Currently if we switch between regular text and df text while using
> the same GrContext, they may use the same entry in the Ganesh font cache,
> which is incorrect. This change ensures that they will have different entries.
>
> Committed: https://skia.googlesource.com/skia/+/8dc58edd71c11f232860724dfa3b566895478034

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

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

9 years agoEnsure that we use different glyph entries for regular and df text.
jvanverth [Wed, 18 Mar 2015 21:46:38 +0000 (14:46 -0700)]
Ensure that we use different glyph entries for regular and df text.

Currently if we switch between regular text and df text while using
the same GrContext, they may use the same entry in the Ganesh font cache,
which is incorrect. This change ensures that they will have different entries.

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

9 years agotemporarily stifle Math test on TSAN bot
mtklein [Wed, 18 Mar 2015 21:06:55 +0000 (14:06 -0700)]
temporarily stifle Math test on TSAN bot

BUG=skia:3562

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