platform/upstream/libSkiaSharp.git
9 years agoAtomics overhaul.
mtklein [Mon, 2 Feb 2015 20:22:07 +0000 (12:22 -0800)]
Atomics overhaul.

This merges and refactors SkAtomics.h and SkBarriers.h into SkAtomics.h and
some ports/ implementations. The major new feature is that we can express
memory orders explicitly rather than only through comments.

The porting layer is reduced to four template functions:
  - sk_atomic_load
  - sk_atomic_store
  - sk_atomic_fetch_add
  - sk_atomic_compare_exchange
From those four we can reconstruct all our previous sk_atomic_foo.

There are three ports:
  - SkAtomics_std:    uses C++11 <atomic>,             used with MSVC
  - SkAtomics_atomic: uses newer GCC/Clang intrinsics, used on not-MSVC where possible
  - SkAtomics_sync:   uses older GCC/Clang intrinsics, used where SkAtomics_atomic not supported

No public API changes.
TBR=reed@google.com

BUG=skia:

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

9 years agoAdd missing SK_OVERRIDE
rmistry [Mon, 2 Feb 2015 20:08:18 +0000 (12:08 -0800)]
Add missing SK_OVERRIDE

Tested by running on clang head + ubuntu 14.04:
GYP_DEFINES=”skia_gpu=0 skia_warnings_as_errors=1" tools/xsan_build thread dm BUILDTYPE=Release
out/Release/dm -v

BUG=skia:3386

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

9 years agoadd missing SK_OVERRIDE
mtklein [Mon, 2 Feb 2015 19:49:05 +0000 (11:49 -0800)]
add missing SK_OVERRIDE

BUG=skia:

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

9 years agoDon't read unecessary font files on Android.
bungeman [Mon, 2 Feb 2015 19:19:44 +0000 (11:19 -0800)]
Don't read unecessary font files on Android.

With a new style fonts.xml (version >= 21) fallback fonts are specified
as font families without a name. The current code reads these, but then
also reads in the old fallback and vendor xml files. With this change,
when a new style xml file is encoutered, no further files will be read.
This both lowers memory use and speeds font lookup. Locally, this
change reduces the number of font families loaded on my 'L' device from
148 to 80. All of the families removed are duplicates.

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

9 years agoRevert of Revert of SSE4 opaque blend using intrinsics instead of assembly. (patchset...
stephana [Mon, 2 Feb 2015 18:02:48 +0000 (10:02 -0800)]
Revert of Revert of SSE4 opaque blend using intrinsics instead of assembly. (patchset #1 id:1 of https://codereview.chromium.org/873553003/)

Reason for revert:
Reverted the wrong CL.

Original issue's description:
> Revert of SSE4 opaque blend using intrinsics instead of assembly. (patchset #16 id:300001 of https://codereview.chromium.org/874863002/)
>
> Reason for revert:
> This causes a bug on the 'hittestpath' GM on MacMini 4,1
>
> See:
>
> https://gold.skia.org/#/triage/hittestpath?head=0
>
> for details.
>
> Original issue's description:
> > SSE4 opaque blend using intrinsics instead of assembly.
> >
> > Since we had such a hard time with the assembly versions of this blit (to the
> > point that we have them completely disabled everywhere), I thought I'd take
> > a shot at writing a version of the blit using intrinsics.
> >
> > The key feature of SSE4 we're exploiting is that we can use ptest (_mm_test*)
> > to skip the blend when the 16 src pixels we consider each loop are all opaque
> > or all transparent.  _mm_shuffle_epi8 from SSSE3 also lends a hand to extract
> > all those alphas.
> >
> > It's worth looking to see if we can backport this type of logic to SSE2 using
> > _mm_movemask_epi8, or up to 32 pixels at a time using AVX.
> >
> > My local performance testing doesn't show this to be an unambiguous win
> > (there are probably microbenchmarks and SKPs where we'd be better off just
> > powering through the blend rather than looking at alphas), but the potential
> > does seem tantalizing enough to let skiaperf vet it on the bots.  (< 1.0x is a win.)
> >
> > DM says it draws pixel perfect compare to the old code.
> >
> > Microbenchmarks:
> >                bitmap_RGBA_8888_A_source_stripes_two   14us -> 14.4us 1.03x
> >              bitmap_RGBA_8888_A_source_stripes_three 14.3us -> 14.5us 1.01x
> >                        bitmap_RGBA_8888_scale_bilerp 61.9us -> 62.2us 1.01x
> > bitmap_RGBA_8888_update_volatile_scale_rotate_bilerp  102us ->  101us 0.99x
> >                 bitmap_RGBA_8888_scale_rotate_bilerp  103us ->  101us 0.99x
> >                               bitmap_RGBA_8888_scale 18.4us -> 18.2us 0.99x
> >              bitmap_RGBA_8888_A_scale_rotate_bicubic   71us ->   70us 0.99x
> >          bitmap_RGBA_8888_update_scale_rotate_bilerp  103us ->  101us 0.99x
> >               bitmap_RGBA_8888_A_scale_rotate_bilerp  112us ->  109us 0.98x
> >                     bitmap_RGBA_8888_update_volatile 5.72us -> 5.58us 0.98x
> >                                     bitmap_RGBA_8888 5.73us -> 5.58us 0.97x
> >                              bitmap_RGBA_8888_update 5.78us ->  5.6us 0.97x
> >                      bitmap_RGBA_8888_A_scale_bilerp 70.7us ->   68us 0.96x
> >                     bitmap_RGBA_8888_A_scale_bicubic 23.7us -> 21.8us 0.92x
> >                                   bitmap_RGBA_8888_A 13.9us -> 10.9us 0.78x
> >                     bitmap_RGBA_8888_A_source_opaque   14us -> 6.29us 0.45x
> >                bitmap_RGBA_8888_A_source_transparent   14us -> 3.65us 0.26x
> >
> > Running over our ~70 SKP web page captures, this looks like we spend 0.7x
> > the time in S32A_Opaque_BlitRow compared to the SSE2 version, which should
> > be a decent predictor of real-world impact.
> >
> > BUG=chromium:399842
> >
> > Committed: https://skia.googlesource.com/skia/+/04bc91b972417038fecfa87c484771eac2b9b785
> >
> > CQ_EXTRA_TRYBOTS=client.skia:Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release-Trybot
> >
> > Committed: https://skia.googlesource.com/skia/+/6dbfb21a6c88af6d94e8c823c3ad559f1a41b493
>
> TBR=henrik.smiding@intel.com,mtklein@google.com,herb@google.com,reed@google.com,thakis@chromium.org,mtklein@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:399842
>
> Committed: https://skia.googlesource.com/skia/+/4988891a1173cd405bf1c1dd3a3668c451f45e4c

TBR=henrik.smiding@intel.com,mtklein@google.com,herb@google.com,reed@google.com,thakis@chromium.org,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:399842

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

9 years agoRevert of SSE4 opaque blend using intrinsics instead of assembly. (patchset #16 id...
stephana [Mon, 2 Feb 2015 17:52:43 +0000 (09:52 -0800)]
Revert of SSE4 opaque blend using intrinsics instead of assembly. (patchset #16 id:300001 of https://codereview.chromium.org/874863002/)

Reason for revert:
This causes a bug on the 'hittestpath' GM on MacMini 4,1

See:

https://gold.skia.org/#/triage/hittestpath?head=0

for details.

Original issue's description:
> SSE4 opaque blend using intrinsics instead of assembly.
>
> Since we had such a hard time with the assembly versions of this blit (to the
> point that we have them completely disabled everywhere), I thought I'd take
> a shot at writing a version of the blit using intrinsics.
>
> The key feature of SSE4 we're exploiting is that we can use ptest (_mm_test*)
> to skip the blend when the 16 src pixels we consider each loop are all opaque
> or all transparent.  _mm_shuffle_epi8 from SSSE3 also lends a hand to extract
> all those alphas.
>
> It's worth looking to see if we can backport this type of logic to SSE2 using
> _mm_movemask_epi8, or up to 32 pixels at a time using AVX.
>
> My local performance testing doesn't show this to be an unambiguous win
> (there are probably microbenchmarks and SKPs where we'd be better off just
> powering through the blend rather than looking at alphas), but the potential
> does seem tantalizing enough to let skiaperf vet it on the bots.  (< 1.0x is a win.)
>
> DM says it draws pixel perfect compare to the old code.
>
> Microbenchmarks:
>                bitmap_RGBA_8888_A_source_stripes_two   14us -> 14.4us 1.03x
>              bitmap_RGBA_8888_A_source_stripes_three 14.3us -> 14.5us 1.01x
>                        bitmap_RGBA_8888_scale_bilerp 61.9us -> 62.2us 1.01x
> bitmap_RGBA_8888_update_volatile_scale_rotate_bilerp  102us ->  101us 0.99x
>                 bitmap_RGBA_8888_scale_rotate_bilerp  103us ->  101us 0.99x
>                               bitmap_RGBA_8888_scale 18.4us -> 18.2us 0.99x
>              bitmap_RGBA_8888_A_scale_rotate_bicubic   71us ->   70us 0.99x
>          bitmap_RGBA_8888_update_scale_rotate_bilerp  103us ->  101us 0.99x
>               bitmap_RGBA_8888_A_scale_rotate_bilerp  112us ->  109us 0.98x
>                     bitmap_RGBA_8888_update_volatile 5.72us -> 5.58us 0.98x
>                                     bitmap_RGBA_8888 5.73us -> 5.58us 0.97x
>                              bitmap_RGBA_8888_update 5.78us ->  5.6us 0.97x
>                      bitmap_RGBA_8888_A_scale_bilerp 70.7us ->   68us 0.96x
>                     bitmap_RGBA_8888_A_scale_bicubic 23.7us -> 21.8us 0.92x
>                                   bitmap_RGBA_8888_A 13.9us -> 10.9us 0.78x
>                     bitmap_RGBA_8888_A_source_opaque   14us -> 6.29us 0.45x
>                bitmap_RGBA_8888_A_source_transparent   14us -> 3.65us 0.26x
>
> Running over our ~70 SKP web page captures, this looks like we spend 0.7x
> the time in S32A_Opaque_BlitRow compared to the SSE2 version, which should
> be a decent predictor of real-world impact.
>
> BUG=chromium:399842
>
> Committed: https://skia.googlesource.com/skia/+/04bc91b972417038fecfa87c484771eac2b9b785
>
> CQ_EXTRA_TRYBOTS=client.skia:Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/6dbfb21a6c88af6d94e8c823c3ad559f1a41b493

TBR=henrik.smiding@intel.com,mtklein@google.com,herb@google.com,reed@google.com,thakis@chromium.org,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:399842

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

9 years agoAdd resourcePath to running dm on Android doc.
bungeman [Mon, 2 Feb 2015 17:27:14 +0000 (09:27 -0800)]
Add resourcePath to running dm on Android doc.

Without specifying the resource path a number of tests and gms do not
work properly. The example given in the docs should specify the
resource path so that the example run is exemplary.

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

9 years agoOptimize SSE2 opaque blend
qiankun.miao [Mon, 2 Feb 2015 14:28:53 +0000 (06:28 -0800)]
Optimize SSE2 opaque blend

Backport optimization from https://codereview.chromium.org/874863002/.
Microbenchmarks data compared to previous SSE2 implementation:
             bitmap_BGRA_8888_A_source_stripes_three    7.52us -> 8.67us        1.15x
               bitmap_BGRA_8888_A_source_stripes_two    7.48us -> 8.56us        1.15x
         bitmap_BGRA_8888_update_scale_rotate_bilerp    63.4us ->   64us        1.01x
                    bitmap_BGRA_8888_update_volatile    3.31us -> 3.33us        1.01x
                              bitmap_BGRA_8888_scale    11.1us -> 11.2us        1x
                       bitmap_BGRA_8888_scale_bilerp    35.8us -> 35.9us        1x
                                    bitmap_BGRA_8888    3.33us -> 3.33us        1x
             bitmap_BGRA_8888_A_scale_rotate_bicubic    66.7us -> 66.5us        1x
bitmap_BGRA_8888_update_volatile_scale_rotate_bilerp    65.1us ->   64us        0.98x
                bitmap_BGRA_8888_scale_rotate_bilerp    65.1us ->   64us        0.98x
                    bitmap_BGRA_8888_A_scale_bicubic    30.6us -> 29.9us        0.98x
                     bitmap_BGRA_8888_A_scale_bilerp    42.7us -> 41.4us        0.97x
              bitmap_BGRA_8888_A_scale_rotate_bilerp      71us -> 67.7us        0.95x
                                  bitmap_BGRA_8888_A    7.44us ->  5.7us        0.77x
                    bitmap_BGRA_8888_A_source_opaque    7.46us -> 3.72us        0.5x
               bitmap_BGRA_8888_A_source_transparent    7.46us -> 1.96us        0.26x

BUG=skia:

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

9 years agoDisable LCD text when rasterizing SkPictureShader tiles.
fmalita [Mon, 2 Feb 2015 13:25:04 +0000 (05:25 -0800)]
Disable LCD text when rasterizing SkPictureShader tiles.

BUG=chromium:453299
R=reed@google.com

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

9 years agoUpdate SKP version
skia.buildbots [Mon, 2 Feb 2015 06:36:03 +0000 (22:36 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agoallow GMs to animate
reed [Mon, 2 Feb 2015 03:01:04 +0000 (19:01 -0800)]
allow GMs to animate

BUG=skia:

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

9 years agoUpdate SKP version
skia.buildbots [Sun, 1 Feb 2015 06:53:02 +0000 (22:53 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agoRevert of Move npot resizing out of GrContext and simplify GrContext texture function...
bsalomon [Sun, 1 Feb 2015 04:10:56 +0000 (20:10 -0800)]
Revert of Move npot resizing out of GrContext and simplify GrContext texture functions. (patchset #10 id:200001 of https://codereview.chromium.org/882223003/)

Reason for revert:
perf fix didn't fix the cr webgl conformance tests

Original issue's description:
> Move npot resizing out of GrContext and simplify GrContext texture functions.
>
> Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54
>
> Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0

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

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

9 years agoSVG backend in DM
mtklein [Sun, 1 Feb 2015 04:00:58 +0000 (20:00 -0800)]
SVG backend in DM

Not enabled by default, but this should get you SKPs, GMs etc for free to play with.

$ out/Debug/dm -w svgs --src gm skp --config svg

BUG=skia:

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

9 years agoMove npot resizing out of GrContext and simplify GrContext texture functions.
bsalomon [Sun, 1 Feb 2015 03:27:53 +0000 (19:27 -0800)]
Move npot resizing out of GrContext and simplify GrContext texture functions.

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

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

9 years agoRemove extraneous newline.
Brian Salomon [Sat, 31 Jan 2015 19:29:16 +0000 (14:29 -0500)]
Remove extraneous newline.

TBR=mtklein@google.com

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

9 years agoAdd standard way to indicate GM is GPU-only.
bsalomon [Sat, 31 Jan 2015 15:51:14 +0000 (07:51 -0800)]
Add standard way to indicate GM is GPU-only.

TBR=egdaniel@google.com,mtklein@google.com

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

9 years agoRevert of Move npot resizing out of GrContext and simplify GrContext texture function...
fmalita [Sat, 31 Jan 2015 15:02:18 +0000 (07:02 -0800)]
Revert of Move npot resizing out of GrContext and simplify GrContext texture functions. (patchset #9 id:160001 of https://codereview.chromium.org/882223003/)

Reason for revert:
webGL conformance failures:

WebglConformance.conformance_textures_tex_image_and_sub_image_2d_with_video
WebglConformance.conformance_textures_texture_npot_video

https://codereview.chromium.org/892773003/
http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/29272

Original issue's description:
> Move npot resizing out of GrContext and simplify GrContext texture functions.
>
> Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54

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

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

9 years agoUpdate SKP version
skia.buildbots [Sat, 31 Jan 2015 07:00:10 +0000 (23:00 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agoUpdate dump code in FontConfigParser test.
bungeman [Sat, 31 Jan 2015 03:58:19 +0000 (19:58 -0800)]
Update dump code in FontConfigParser test.

This code is still quite useful for debugging, but has bit rotted.
Update to match current structure of code.

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

9 years agoConvert FamilyData to Skia style field names.
bungeman [Fri, 30 Jan 2015 23:35:09 +0000 (15:35 -0800)]
Convert FamilyData to Skia style field names.

The Skia convention is to prefix field names with 'f'.
This change is mostly mechanical.

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

9 years agoDo not leak FamilyData in Android SkFontMgr.
bungeman [Fri, 30 Jan 2015 23:24:49 +0000 (15:24 -0800)]
Do not leak FamilyData in Android SkFontMgr.

Currently, it appears one FamilyData is leaking per scanned file.
This also cleans up the hanging currentFamily memory management.

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

9 years agoexport SkImageInfo
reed [Fri, 30 Jan 2015 22:54:38 +0000 (14:54 -0800)]
export SkImageInfo

BUG=skia:

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

9 years agoDo not add indirection to XML_Parser.
bungeman [Fri, 30 Jan 2015 22:52:58 +0000 (14:52 -0800)]
Do not add indirection to XML_Parser.

The expat type XML_Parser is already a pointer, so pass it by value
instead of by indirection.

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

9 years agoRevert of Add device space "nudge" to gpu draws (patchset #6 id:90001 of https:/...
robertphillips [Fri, 30 Jan 2015 22:44:22 +0000 (14:44 -0800)]
Revert of Add device space "nudge" to gpu draws (patchset #6 id:90001 of https://codereview.chromium.org/877473005/)

Reason for revert:
Blink layout tests this time :(

Original issue's description:
> Add device space "nudge" to gpu draws
>
> This CL nudges all the GPU draws and clips slightly to match raster's round behavior for BW draws. We assume the effect will be negligible and do it for AA draws too.
>
> BUG=423834
>
> Committed: https://skia.googlesource.com/skia/+/2d55d07501c56310f97d2092d789a2bc9fa01b78
>
> Committed: https://skia.googlesource.com/skia/+/b9329991426d0b77ea194a380d72d73fb855308a

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

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

9 years agoSuggestions and merge in the other CL.
mtklein [Fri, 30 Jan 2015 21:22:23 +0000 (13:22 -0800)]
Suggestions and merge in the other CL.

I had some suggestions on the subset CL, and took the opportunity to rebase it
against head and merge in the other color type CL.

BUG=skia:

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

9 years agoReland "remove unused SkAvoidXfermode"
scroggo [Fri, 30 Jan 2015 21:16:02 +0000 (13:16 -0800)]
Reland "remove unused SkAvoidXfermode"

(patchset #2 id:20001 of https://codereview.chromium.org/860583002/)

SkAvoidXfermode has been moved into Android, so it is safe to remove.

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

9 years agoDisable the noisiest /analyze warning in Chrome. ~3,700/12,000
brucedawson [Fri, 30 Jan 2015 20:57:50 +0000 (12:57 -0800)]
Disable the noisiest /analyze warning in Chrome. ~3,700/12,000

Decades ago Intel decided that the bsr (Bit Scan Reverse) instruction
should have undefined results if its argument is zero. This probably
makes the instruction harder to implement and it definitely makes it
more difficult to use.

In SkCLZ_portable it requires a check for a zero argument, but despite
that check /analyze still warns that _BitScanReverse might fail
(because it doesn't know what can cause failures). Because this warning
occurs in a frequently included header file it ends up being very noisy,
accounting for ~30% of all warnings (before deduplication).

Suppressing this useless warning will make the raw results easier to
look through.

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

9 years agoMove npot resizing out of GrContext and simplify GrContext texture functions.
bsalomon [Fri, 30 Jan 2015 20:43:44 +0000 (12:43 -0800)]
Move npot resizing out of GrContext and simplify GrContext texture functions.

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

9 years agoFirst cut at cleaning up Sergio's example code and moving some common code to SkWindow.
caryclark [Fri, 30 Jan 2015 20:37:02 +0000 (12:37 -0800)]
First cut at cleaning up Sergio's example code and moving some common code to SkWindow.

Eventually, this will be moved to be a peer of SampleApp so it is compiled by the bots to avoid future bit rot.

Also ignore XCode auto-generated flag in CommandLineFlags, and remove the unused multiple-example part.

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

9 years agoDM: paths as implict strings too.
mtklein [Fri, 30 Jan 2015 19:42:31 +0000 (11:42 -0800)]
DM: paths as implict strings too.

BUG=skia:

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

9 years agoAdd device space "nudge" to gpu draws
robertphillips [Fri, 30 Jan 2015 19:24:50 +0000 (11:24 -0800)]
Add device space "nudge" to gpu draws

This CL nudges all the GPU draws and clips slightly to match raster's round behavior for BW draws. We assume the effect will be negligible and do it for AA draws too.

BUG=423834

Committed: https://skia.googlesource.com/skia/+/2d55d07501c56310f97d2092d789a2bc9fa01b78

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

9 years agoDM::NullSink
halcanary [Fri, 30 Jan 2015 19:00:12 +0000 (11:00 -0800)]
DM::NullSink

Motivation:  The null sink can act as a control for experiments.

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

9 years agodm: allow multiple --images flags, allow single files
halcanary [Fri, 30 Jan 2015 17:58:58 +0000 (09:58 -0800)]
dm: allow multiple --images flags, allow single files

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

9 years agoInitial SVG backend stubbing
fmalita [Fri, 30 Jan 2015 17:03:29 +0000 (09:03 -0800)]
Initial SVG backend stubbing

This adds SkSVGDevice and a small utility for converting SKP files to SVG (skp2svg).

R=reed@google.com,jcgregorio@google.com
BUG=skia:3368

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

9 years agoRemove unused globalRef/globalUnref.
scroggo [Fri, 30 Jan 2015 15:34:48 +0000 (07:34 -0800)]
Remove unused globalRef/globalUnref.

BUG=skia:1482

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

9 years agodm: allow multiple --skp flags, allow single files
halcanary [Fri, 30 Jan 2015 15:31:19 +0000 (07:31 -0800)]
dm: allow multiple --skp flags, allow single files

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

9 years agoRemove unused hasLocalMatrix.
scroggo [Fri, 30 Jan 2015 15:14:03 +0000 (07:14 -0800)]
Remove unused hasLocalMatrix.

This method is not called anywhere on Android or Chrome, and it
has a FIXME that it may not be correct.

A client can still getLocalMatrix().isIdentity() if they need this
information. (It has the same FIXME, and perhaps we should revisit
it. In the meantime, this convenience method is not needed.)

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

9 years agodocumentation: Writing Unit and Rendering Tests
halcanary [Fri, 30 Jan 2015 15:00:42 +0000 (07:00 -0800)]
documentation: Writing Unit and Rendering Tests

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

9 years agoDefine SK_OVERRIDE when building for Android framework.
scroggo [Fri, 30 Jan 2015 14:19:44 +0000 (06:19 -0800)]
Define SK_OVERRIDE when building for Android framework.

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

9 years agoUpdate SKP version
skia.buildbots [Fri, 30 Jan 2015 06:57:53 +0000 (22:57 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agoStart SampleApp documentation
herb [Fri, 30 Jan 2015 04:31:04 +0000 (20:31 -0800)]
Start SampleApp documentation

BUG=skia:359

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

9 years agoRemove always true if statement and commented out code in GrBitmapTextContext
qiankun.miao [Fri, 30 Jan 2015 02:36:52 +0000 (18:36 -0800)]
Remove always true if statement and commented out code in GrBitmapTextContext

BUG=skia:

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

9 years agoClean up commented out code in GrDistanceFieldTextContext
qiankun.miao [Fri, 30 Jan 2015 02:35:25 +0000 (18:35 -0800)]
Clean up commented out code in GrDistanceFieldTextContext

SkCLZ isn't used any more. Just remove it.

BUG=skia:

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

9 years agoUpdate comment for SkMallocPixelRef::NewWithProc.
scroggo [Thu, 29 Jan 2015 21:52:13 +0000 (13:52 -0800)]
Update comment for SkMallocPixelRef::NewWithProc.

Add a comment about using a NULL ReleaseProc.

BUG=skia:2185

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

9 years agoshare code between arcTo and addArc, update dox
reed [Thu, 29 Jan 2015 20:59:11 +0000 (12:59 -0800)]
share code between arcTo and addArc, update dox

BUG=skia:

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

9 years agoConservative blob bounds cleanup
fmalita [Thu, 29 Jan 2015 20:24:24 +0000 (12:24 -0800)]
Conservative blob bounds cleanup

* drop SK_SUPPORT_LEGACY_BLOB_BOUNDS
* remove horizontal & fully position tight bounds support (always using
  conservative bounds now)
* special-case horizontal run bounds logic to avoid unnecessary vertical
  min-maxing

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

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

9 years agoreorg some path routines, preparing to switch arcs to conics
reed [Thu, 29 Jan 2015 20:03:58 +0000 (12:03 -0800)]
reorg some path routines, preparing to switch arcs to conics

BUG=skia:

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

9 years agoMake SkWriter32::snapshotAsData() a dumb copy.
mtklein [Thu, 29 Jan 2015 20:03:53 +0000 (12:03 -0800)]
Make SkWriter32::snapshotAsData() a dumb copy.

SkWriter32::snapshotAsData() is no longer performance critical.
It's only used when we're serializing to disk.

BUG=skia:2289

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

9 years agoRemove SkProxyCanvas.
scroggo [Thu, 29 Jan 2015 19:58:51 +0000 (11:58 -0800)]
Remove SkProxyCanvas.

SkProxyCanvas is redundant with SkNWayCanvas, and means another class
we have to keep in sync with the SkCanvas interface.

Remove tests which use an SkProxyCanvas.

Requires a change to chromium.

BUG=skia:3279
BUG=skia:500

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

9 years agoSkStream::read() only returns 0 at end.
scroggo [Thu, 29 Jan 2015 19:58:45 +0000 (11:58 -0800)]
SkStream::read() only returns 0 at end.

All implementations behave this way, so respect it.

BUG=skia:2936

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

9 years agoadd new gm for SkPath::addArc()
reed [Thu, 29 Jan 2015 18:48:16 +0000 (10:48 -0800)]
add new gm for SkPath::addArc()

BUG=skia:
TBR=

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

9 years agoremove experimental pixman files
caryclark [Thu, 29 Jan 2015 18:44:35 +0000 (10:44 -0800)]
remove experimental pixman files

these files have never worked, and contain nother of value

R=reed@google.com

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

9 years agoThe original instantiation of pathops was in the experimental/Intersection directory...
caryclark [Thu, 29 Jan 2015 18:43:09 +0000 (10:43 -0800)]
The original instantiation of pathops was in the experimental/Intersection directory. Anything of value has been copied into the mainline.

The obsolete gyp files are also included, along with a pixman test that never functioned but accidentally referenced some of these deleted files.

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

9 years agoenable subpixel text on the subpixel translate sample
humper [Thu, 29 Jan 2015 18:26:37 +0000 (10:26 -0800)]
enable subpixel text on the subpixel translate sample

BUG=skia:

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

9 years agoUse draws instead of clears as temporary workaround for Qualcomm stencil clear bug
bsalomon [Thu, 29 Jan 2015 18:07:32 +0000 (10:07 -0800)]
Use draws instead of clears as temporary workaround for Qualcomm stencil clear bug

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

9 years agofix bit rotted code to create test font
caryclark [Thu, 29 Jan 2015 17:59:53 +0000 (09:59 -0800)]
fix bit rotted code to create test font

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

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

9 years agoAdd docs for running docserver locally.
jcgregorio [Thu, 29 Jan 2015 17:55:14 +0000 (09:55 -0800)]
Add docs for running docserver locally.

BUG=skia:3346

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

9 years agofix parsing SVG strings to paths with comma delimiters
caryclark [Thu, 29 Jan 2015 17:45:44 +0000 (09:45 -0800)]
fix parsing SVG strings to paths with comma delimiters

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

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

9 years agoApply prePathMatrix in SkGpuDevice as view matrix preconcat when possible
bsalomon [Thu, 29 Jan 2015 17:34:18 +0000 (09:34 -0800)]
Apply prePathMatrix in SkGpuDevice as view matrix preconcat when possible

BUG=skia:3055

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

9 years agoMore win64 warning fixes.
fmalita [Thu, 29 Jan 2015 15:44:24 +0000 (07:44 -0800)]
More win64 warning fixes.

TBR=bsalomon@google.com
NOTREECHECKS=true

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

9 years agoFix win64 warnings.
bsalomon [Thu, 29 Jan 2015 15:13:20 +0000 (07:13 -0800)]
Fix win64 warnings.

TBR=joshualitt@google.com

NOTREECHECKS=true

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

9 years agoskia: blend32_16_row for neon version
mlee [Thu, 29 Jan 2015 14:22:41 +0000 (06:22 -0800)]
skia: blend32_16_row for neon version

This includes blend32_16_row neon implementation
for aarch32 and aarch64.

For performance,
blend32_16_row is called in following tests in nanobench.
 - Xfermode_SrcOver
 - tablebench
 - rotated_rects_bw_alternating_transparent_and_opaque_srcover
 - rotated_rects_bw_changing_transparent_srcover
 - rotated_rects_bw_same_transparent_srcover
 - luma_colorfilter_large
 - luma_colorfilter_small
 - chart_bw

I can see perf increase in following two tests, especially. For others, looks
similar.
For each, I tried to run two times.

1) Xfermode_SrcOver
<org>
 - D/skia    ( 2000):    3M        57      17.3µs  17.4µs  17.4µs  17.7µs  1%
  █▃▂▃▂▂▂▁▃▂      565     Xfermode_SrcOver
 - D/skia    ( 1915):    3M        70      13.5µs  16.9µs  16.7µs  18.8µs  9%
  ▆█▄▅█▁▅▅▆▄      565     Xfermode_SrcOver

<new>
 - D/skia    ( 2000):    3M        8       11.6µs  11.8µs  12.1µs  14.4µs  7%
  ▃█▁▁▂▁▁▁▂▂      565     Xfermode_SrcOver
 - D/skia    ( 2004):    3M        62      10.3µs  12.9µs  13µs    15.2µs  11%
  █▅▅▆▁▅▅▅▇▃      565     Xfermode_SrcOver

2)
luma_colorfilter_large
<org>
 - D/skia    ( 2000):  159M        8       136µs   136µs   136µs   139µs   1%
  █▃▁▂▁▁▁▁▁▁      565     luma_colorfilter_large
 - D/skia    ( 1915):  158M        2       135µs   177µs   182µs   269µs   22%
  ▆▃█▁▁▃▃▃▃▃      565     luma_colorfilter_large

<new>
 - D/skia    ( 2000):  157M        5       84.2µs  85.3µs  87.5µs  110µs   9%
  █▁▂▁▁▁▁▁▁▁      565     luma_colorfilter_large
 - D/skia    ( 2004):  159M        6       84.7µs  110µs   112µs   144µs   18%
  █▄▇▁▁▄▃▄▄▆      565     luma_colorfilter_large

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

9 years agoRevert of Add device space "nudge" to gpu draws (patchset #5 id:70001 of https:/...
robertphillips [Thu, 29 Jan 2015 01:37:33 +0000 (17:37 -0800)]
Revert of Add device space "nudge" to gpu draws (patchset #5 id:70001 of https://codereview.chromium.org/877473005/)

Reason for revert:
Chrome pixel test :(

Original issue's description:
> Add device space "nudge" to gpu draws
>
> This CL nudges all the GPU draws and clips slightly to match raster's round behavior for BW draws. We assume the effect will be negligible and do it for AA draws too.
>
> BUG=423834
>
> Committed: https://skia.googlesource.com/skia/+/2d55d07501c56310f97d2092d789a2bc9fa01b78

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

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

9 years agoRevert of Remove 'f' from 0.05f in shader code (patchset #1 id:1 of https://coderevie...
robertphillips [Thu, 29 Jan 2015 01:33:45 +0000 (17:33 -0800)]
Revert of Remove 'f' from 0.05f in shader code (patchset #1 id:1 of https://codereview.chromium.org/888483002/)

Reason for revert:
Chrome pixel test

Original issue's description:
> Remove 'f' from 0.05f in shader code
>
> TBR=bsalomon@google.com
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/1726997861fac8daa8213d1a51d5c8fbe44428d1

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

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

9 years agoRevert of DM::SKPSrc::size() reports correct size. (patchset #3 id:40001 of https...
mtklein [Wed, 28 Jan 2015 23:32:24 +0000 (15:32 -0800)]
Revert of DM::SKPSrc::size() reports correct size. (patchset #3 id:40001 of https://codereview.chromium.org/863243005/)

Reason for revert:
Still no good on Chrome OS bot:

http://build.chromium.org/p/client.skia/builders/Test-ChromeOS-Alex-GMA3150-x86-Release/builds/628/steps/dm/logs/stdio

Original issue's description:
> DM::SKPSrc::size() reports correct size.
>
> Also, DM::GPUSink and DM::RasterSink crop DM::Src::size() to 2048x2048.
>
> Motivation:
>   Improve PDF testing by printing the entire SKP.
>
> Source: http://crrev.com/863243004
>
> BUG=skia:3365
>
> Committed: https://skia.googlesource.com/skia/+/441b10eac09a1f44983e35da827a6b438a409e63
>
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Release-Trybot,Test-ChromeOS-Alex-GMA3150-x86-Release-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/d4dd58e43ca4551531ad6a9f54bfc5632ea45a80

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

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

9 years agoRemove 'f' from 0.05f in shader code
robertphillips [Wed, 28 Jan 2015 23:19:53 +0000 (15:19 -0800)]
Remove 'f' from 0.05f in shader code

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

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

9 years agoAdd device space "nudge" to gpu draws
robertphillips [Wed, 28 Jan 2015 22:41:57 +0000 (14:41 -0800)]
Add device space "nudge" to gpu draws

This CL nudges all the GPU draws and clips slightly to match raster's round behavior for BW draws. We assume the effect will be negligible and do it for AA draws too.

BUG=423834

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

9 years agoauthors update- add herb and reorganize
hcm [Wed, 28 Jan 2015 22:16:43 +0000 (14:16 -0800)]
authors update- add herb and reorganize

BUG=skia:

TBR=reed@google.com

NOTRY=true

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

9 years agoMake char hash dynamic when needed.
herb [Wed, 28 Jan 2015 22:12:12 +0000 (14:12 -0800)]
Make char hash dynamic when needed.

BUG=skia:

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

9 years agoDM::SKPSrc::size() reports correct size.
mtklein [Wed, 28 Jan 2015 21:59:42 +0000 (13:59 -0800)]
DM::SKPSrc::size() reports correct size.

Also, DM::GPUSink and DM::RasterSink crop DM::Src::size() to 2048x2048.

Motivation:
  Improve PDF testing by printing the entire SKP.

Source: http://crrev.com/863243004

BUG=skia:3365

Committed: https://skia.googlesource.com/skia/+/441b10eac09a1f44983e35da827a6b438a409e63

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Release-Trybot

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

9 years agoUse murmur3 finisher to improve font hash efficiency.
reed [Wed, 28 Jan 2015 21:28:53 +0000 (13:28 -0800)]
Use murmur3 finisher to improve font hash efficiency.
Add dump() method to inspect glyphcache strikes.

Murmur addition improves hash efficient roughly 50%

BUG=skia:

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

9 years agoFixed clusterfuzz issue
sugoi [Wed, 28 Jan 2015 21:15:32 +0000 (13:15 -0800)]
Fixed clusterfuzz issue

BUG=448423

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

9 years agoUse distance fields for glyphs > 256 pt, before switching to paths.
jvanverth [Wed, 28 Jan 2015 21:08:40 +0000 (13:08 -0800)]
Use distance fields for glyphs > 256 pt, before switching to paths.

BUG=452313

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

9 years agoGrBatchPrototype
joshualitt [Wed, 28 Jan 2015 20:53:54 +0000 (12:53 -0800)]
GrBatchPrototype

BUG=skia:

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

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

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

9 years agoRevert of DM::SKPSrc::size() reports correct size. (patchset #1 id:1 of https://coder...
mtklein [Wed, 28 Jan 2015 20:04:08 +0000 (12:04 -0800)]
Revert of DM::SKPSrc::size() reports correct size. (patchset #1 id:1 of https://codereview.chromium.org/863243005/)

Reason for revert:
OOM on 32-bit machines.

Original issue's description:
> DM::SKPSrc::size() reports correct size.
>
> Also, DM::GPUSink and DM::RasterSink crop DM::Src::size() to 2048x2048.
>
> Motivation:
>   Improve PDF testing by printing the entire SKP.
>
> Source: http://crrev.com/863243004
>
> BUG=skia:3365
>
> Committed: https://skia.googlesource.com/skia/+/441b10eac09a1f44983e35da827a6b438a409e63

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

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

9 years agoDM::PDFSink::draw excercises multi-page pdf
halcanary [Wed, 28 Jan 2015 19:45:58 +0000 (11:45 -0800)]
DM::PDFSink::draw excercises multi-page pdf

BUG=skia:3365

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

9 years agoadd more checks for computing clamp counts, remove dead code
reed [Wed, 28 Jan 2015 19:44:48 +0000 (11:44 -0800)]
add more checks for computing clamp counts, remove dead code

BUG=448299

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

9 years agoFix wrapped content keys for npot textures.
bsalomon [Wed, 28 Jan 2015 19:39:48 +0000 (11:39 -0800)]
Fix wrapped content keys for npot textures.

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

9 years agoFold gmtoskp into DM, as --src gm --config skp.
mtklein [Wed, 28 Jan 2015 19:35:18 +0000 (11:35 -0800)]
Fold gmtoskp into DM, as --src gm --config skp.

BUG=skia:

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

9 years agoDM::SKPSrc::size() reports correct size.
mtklein [Wed, 28 Jan 2015 19:12:25 +0000 (11:12 -0800)]
DM::SKPSrc::size() reports correct size.

Also, DM::GPUSink and DM::RasterSink crop DM::Src::size() to 2048x2048.

Motivation:
  Improve PDF testing by printing the entire SKP.

Source: http://crrev.com/863243004

BUG=skia:3365

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

9 years agodstread gm
joshualitt [Wed, 28 Jan 2015 19:08:00 +0000 (11:08 -0800)]
dstread gm

TBR=
BUG=skia:

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

9 years agoAdd a flag to flush the canvases during SkMultiPictureDraw::draw().
senorblanco [Wed, 28 Jan 2015 19:01:06 +0000 (11:01 -0800)]
Add a flag to flush the canvases during SkMultiPictureDraw::draw().

This is necessary for multisampling, so that each multisampled render
target resolves before Chrome's compositor attempts to draw the
texture.

BUG=skia:

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

9 years agoConservative SkTextBlob bounds.
fmalita [Wed, 28 Jan 2015 18:56:06 +0000 (10:56 -0800)]
Conservative SkTextBlob bounds.

Compute cheaper/more conservative text blob bounds based on the typeface
maximum glyph bbox.

BUG=chromium:451401
R=reed@google.com,bungeman@google.com

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

9 years agoUpdate SKP version
skia.buildbots [Wed, 28 Jan 2015 18:56:00 +0000 (10:56 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agoAdd a script to fetch the latest SKPs.
mtklein [Wed, 28 Jan 2015 17:39:10 +0000 (09:39 -0800)]
Add a script to fetch the latest SKPs.

I keep forgetting how best to do this.

NOTRY=true
NOTREECHECKS=true

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

9 years agoadd a paranoid assert
mtklein [Wed, 28 Jan 2015 15:20:28 +0000 (07:20 -0800)]
add a paranoid assert

NOTREECHECKS=true

BUG=chromium:399842

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

9 years agoRevert of GrBatchPrototype (patchset #32 id:630001 of https://codereview.chromium...
joshualitt [Wed, 28 Jan 2015 14:54:30 +0000 (06:54 -0800)]
Revert of GrBatchPrototype (patchset #32 id:630001 of https://codereview.chromium.org/845103005/)

Reason for revert:
One last try to fix mac perf regression

Original issue's description:
> GrBatchPrototype
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d15e4e45374275c045572b304c229237c4a82be4
>
> Committed: https://skia.googlesource.com/skia/+/d5a7db4a867c7e6ccf8451a053d987b470099198

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

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

9 years agowhitespace
joshualitt [Wed, 28 Jan 2015 00:27:12 +0000 (16:27 -0800)]
whitespace

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

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

9 years agoRevert of patch from issue 885453002 at patchset 20001 (http://crrev.com/885453002...
mtklein [Tue, 27 Jan 2015 23:39:19 +0000 (15:39 -0800)]
Revert of patch from issue 885453002 at patchset 20001 (crrev.com/885453002#ps20001) (patchset #1 id:1 of https://codereview.chromium.org/881953002/)

Reason for revert:
==32435==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x621000d8cd00

Lots of info here:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-ASAN/builds/1198/steps/dm/logs/stdio

Original issue's description:
> patch from issue 885453002 at patchset 20001 (http://crrev.com/885453002#ps20001)
>
> Make the char cache dynamic in SkGlyphCache
> because it is rarely used.
>
> Landing on behalf of Herb.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/95faa61d63a6f62916f6f7be58c4624da8357e3b

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

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

9 years agoGrBatchPrototype
joshualitt [Tue, 27 Jan 2015 23:39:06 +0000 (15:39 -0800)]
GrBatchPrototype

BUG=skia:

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

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

9 years agopatch from issue 885453002 at patchset 20001 (http://crrev.com/885453002#ps20001)
mtklein [Tue, 27 Jan 2015 23:10:17 +0000 (15:10 -0800)]
patch from issue 885453002 at patchset 20001 (crrev.com/885453002#ps20001)

Make the char cache dynamic in SkGlyphCache
because it is rarely used.

Landing on behalf of Herb.

BUG=skia:

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

9 years agoadd -r to DM
mtklein [Tue, 27 Jan 2015 22:46:26 +0000 (14:46 -0800)]
add -r to DM

$ out/Debug/dm -w good
$ out/Debug/dm -r good -w bad && echo "hooray no diffs!"

BUG=skia:

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

9 years agoSSE4 opaque blend using intrinsics instead of assembly.
mtklein [Tue, 27 Jan 2015 22:35:18 +0000 (14:35 -0800)]
SSE4 opaque blend using intrinsics instead of assembly.

Since we had such a hard time with the assembly versions of this blit (to the
point that we have them completely disabled everywhere), I thought I'd take
a shot at writing a version of the blit using intrinsics.

The key feature of SSE4 we're exploiting is that we can use ptest (_mm_test*)
to skip the blend when the 16 src pixels we consider each loop are all opaque
or all transparent.  _mm_shuffle_epi8 from SSSE3 also lends a hand to extract
all those alphas.

It's worth looking to see if we can backport this type of logic to SSE2 using
_mm_movemask_epi8, or up to 32 pixels at a time using AVX.

My local performance testing doesn't show this to be an unambiguous win
(there are probably microbenchmarks and SKPs where we'd be better off just
powering through the blend rather than looking at alphas), but the potential
does seem tantalizing enough to let skiaperf vet it on the bots.  (< 1.0x is a win.)

DM says it draws pixel perfect compare to the old code.

Microbenchmarks:
               bitmap_RGBA_8888_A_source_stripes_two   14us -> 14.4us 1.03x
             bitmap_RGBA_8888_A_source_stripes_three 14.3us -> 14.5us 1.01x
                       bitmap_RGBA_8888_scale_bilerp 61.9us -> 62.2us 1.01x
bitmap_RGBA_8888_update_volatile_scale_rotate_bilerp  102us ->  101us 0.99x
                bitmap_RGBA_8888_scale_rotate_bilerp  103us ->  101us 0.99x
                              bitmap_RGBA_8888_scale 18.4us -> 18.2us 0.99x
             bitmap_RGBA_8888_A_scale_rotate_bicubic   71us ->   70us 0.99x
         bitmap_RGBA_8888_update_scale_rotate_bilerp  103us ->  101us 0.99x
              bitmap_RGBA_8888_A_scale_rotate_bilerp  112us ->  109us 0.98x
                    bitmap_RGBA_8888_update_volatile 5.72us -> 5.58us 0.98x
                                    bitmap_RGBA_8888 5.73us -> 5.58us 0.97x
                             bitmap_RGBA_8888_update 5.78us ->  5.6us 0.97x
                     bitmap_RGBA_8888_A_scale_bilerp 70.7us ->   68us 0.96x
                    bitmap_RGBA_8888_A_scale_bicubic 23.7us -> 21.8us 0.92x
                                  bitmap_RGBA_8888_A 13.9us -> 10.9us 0.78x
                    bitmap_RGBA_8888_A_source_opaque   14us -> 6.29us 0.45x
               bitmap_RGBA_8888_A_source_transparent   14us -> 3.65us 0.26x

Running over our ~70 SKP web page captures, this looks like we spend 0.7x
the time in S32A_Opaque_BlitRow compared to the SSE2 version, which should
be a decent predictor of real-world impact.

BUG=chromium:399842

Committed: https://skia.googlesource.com/skia/+/04bc91b972417038fecfa87c484771eac2b9b785

CQ_EXTRA_TRYBOTS=client.skia:Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Release-Trybot

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

9 years agoRemove unused methods from SkScalerContext.
bungeman [Tue, 27 Jan 2015 19:01:42 +0000 (11:01 -0800)]
Remove unused methods from SkScalerContext.

The methods getLocalMatrixWithoutTextSize and
getSingleMatrixWithoutTextSize on SkScalerContext were added as a
temporary measure for CoreText issues. Now that the CoreText
SkScalerContext is using other means to fix these issues more completely,
remove these now unused methods.

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

9 years agoSkFontHost_FreeType takes advantage of SkStreamAsset.
bungeman [Tue, 27 Jan 2015 18:41:17 +0000 (10:41 -0800)]
SkFontHost_FreeType takes advantage of SkStreamAsset.

With recent changes, SkTypeface now deals in SkStreamAsset instead of
SkStream. Take advantage of this for performance with FreeType.

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

9 years agoFix GPU resource cache related assertions.
bsalomon [Tue, 27 Jan 2015 17:56:04 +0000 (09:56 -0800)]
Fix GPU resource cache related assertions.

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

9 years agoSetup Android framework builds to use the appropriate shared lib defines.
djsollen [Tue, 27 Jan 2015 17:01:01 +0000 (09:01 -0800)]
Setup Android framework builds to use the appropriate shared lib defines.

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

9 years agosk_tool_utils::draw_checkerboard uses SkXfermode::kSrc_Mode to fix valgrind error.
halcanary [Tue, 27 Jan 2015 16:38:35 +0000 (08:38 -0800)]
sk_tool_utils::draw_checkerboard uses SkXfermode::kSrc_Mode to fix valgrind error.

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

9 years agoUse highp for distance field texture coordinates.
jvanverth [Tue, 27 Jan 2015 16:19:33 +0000 (08:19 -0800)]
Use highp for distance field texture coordinates.

Addresses issues with wavy text (probably due to low-precision aliasing)

BUG=429080

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