platform/upstream/libSkiaSharp.git
9 years agoFix up RecordReplaceDrawTest memory leak.
mtklein [Thu, 4 Dec 2014 15:53:21 +0000 (07:53 -0800)]
Fix up RecordReplaceDrawTest memory leak.

http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/151/steps/dm/logs/stdio

BUG=skia:

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

9 years agoChange clear() to respect the clip
reed [Thu, 4 Dec 2014 15:50:14 +0000 (07:50 -0800)]
Change clear() to respect the clip

This reverts commit af641a1c10f176cb9617026d3cc93c117a85d13d.

BUG=skia:
TBR=

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

9 years agoAdd SSSE3 acceleration for S32_D16_filter_DXDY
qiankun.miao [Thu, 4 Dec 2014 14:27:03 +0000 (06:27 -0800)]
Add SSSE3 acceleration for S32_D16_filter_DXDY

With this CL, related nanobench can be improved for 565 config.
                bitmap_BGRA_8888_scale_rotate_bilerp     115us -> 70.5us       0.61x
bitmap_BGRA_8888_update_volatile_scale_rotate_bilerp     115us -> 70.5us       0.61x
         bitmap_BGRA_8888_update_scale_rotate_bilerp     112us ->   68us       0.6x

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/45a05780867a06b9f8a8d5240cf6c5d5a2c15a35

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

9 years agoRevert of move program descriptor generation to flush (patchset #7 id:120001 of https...
joshualitt [Thu, 4 Dec 2014 14:01:45 +0000 (06:01 -0800)]
Revert of move program descriptor generation to flush (patchset #7 id:120001 of https://codereview.chromium.org/777673003/)

Reason for revert:
breaking linux build

Original issue's description:
> move program descriptor generation to flush
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/829e1b80b1020b17f2078020c990e079b70c077c

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

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

9 years agoRevert of create and thread batch tracker object (patchset #9 id:160001 of https...
joshualitt [Thu, 4 Dec 2014 14:00:41 +0000 (06:00 -0800)]
Revert of create and thread batch tracker object (patchset #9 id:160001 of https://codereview.chromium.org/772513002/)

Reason for revert:
Breaking linux layout test

Original issue's description:
> create and thread batch tracker object
>
> I remove the factory on the next CL
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c3a6eb23483e5d28073b509a5f637f41660de294

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

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

9 years agomake clear private (before we delete it)
reed [Thu, 4 Dec 2014 11:48:34 +0000 (03:48 -0800)]
make clear private (before we delete it)

BUG=skia:

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

9 years agoUpdate SKP version
skia.buildbots [Thu, 4 Dec 2014 07:04:09 +0000 (23:04 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agoRevert of Add SSSE3 acceleration for S32_D16_filter_DXDY (patchset #3 id:40001 of...
jam [Wed, 3 Dec 2014 23:56:36 +0000 (15:56 -0800)]
Revert of Add SSSE3 acceleration for S32_D16_filter_DXDY (patchset #3 id:40001 of https://codereview.chromium.org/773753002/)

Reason for revert:
breaks build when not using SSE3, since the two method definitions differ in parameter types (typo)

Original issue's description:
> Add SSSE3 acceleration for S32_D16_filter_DXDY
>
> With this CL, related nanobench can be improved for 565 config.
>                 bitmap_BGRA_8888_scale_rotate_bilerp     115us -> 70.5us       0.61x
> bitmap_BGRA_8888_update_volatile_scale_rotate_bilerp     115us -> 70.5us       0.61x
>          bitmap_BGRA_8888_update_scale_rotate_bilerp     112us ->   68us       0.6x
>
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/45a05780867a06b9f8a8d5240cf6c5d5a2c15a35

TBR=mtklein@google.com,qkmiao@gmail.com,qiankun.miao@intel.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agocreate and thread batch tracker object
joshualitt [Wed, 3 Dec 2014 23:34:20 +0000 (15:34 -0800)]
create and thread batch tracker object

I remove the factory on the next CL

BUG=skia:

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

9 years agomove program descriptor generation to flush
joshualitt [Wed, 3 Dec 2014 21:57:36 +0000 (13:57 -0800)]
move program descriptor generation to flush

BUG=skia:

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

9 years agoRevert of Revert of remove unused device::eraseColor (patchset #1 id:1 of https:...
reed [Wed, 3 Dec 2014 21:17:29 +0000 (13:17 -0800)]
Revert of Revert of remove unused device::eraseColor (patchset #1 id:1 of https://codereview.chromium.org/777003002/)

Reason for revert:
fix landed in chrome to allow this (I hope)

Original issue's description:
> Revert of remove unused device::eraseColor (patchset #1 id:1 of https://codereview.chromium.org/765643004/)
>
> Reason for revert:
> ../../skia/ext/bitmap_platform_device_cairo.cc:131:13: error: no member named 'eraseColor' in 'skia::BitmapPlatformDevice'
>
>
> Original issue's description:
> > remove unused device::eraseColor
> >
> > BUG=skia:
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/b1ab276c3719d6690e58f347c25126d2b8929c5d
>
> TBR=reed@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8b0197ef2e32be9d62e79d58f8b50811975c79c6

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

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

9 years agoAdd SK_SUPPORT_LEGACY_PORTER_DUFF macro.
tfarina [Wed, 3 Dec 2014 21:13:02 +0000 (13:13 -0800)]
Add SK_SUPPORT_LEGACY_PORTER_DUFF macro.

This trick will be used to remove deprecated SkPorterDuff API. But first
we need to add it so Android can be updated later.

BUG=skia:3178
R=scroggo@google.com

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

9 years agoTurn on MPD threading in nanobench.
mtklein [Wed, 3 Dec 2014 21:07:39 +0000 (13:07 -0800)]
Turn on MPD threading in nanobench.

Seems okay after this small patch to skip lockPixels() / unlockPixels().

BUG=skia:3149

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot

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

9 years agoRemove guard on and enable vertexAttrib function pts on GrGLInterface.
egdaniel [Wed, 3 Dec 2014 20:22:51 +0000 (12:22 -0800)]
Remove guard on and enable vertexAttrib function pts on GrGLInterface.

BUG=skia:

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

9 years agoUse static XPF for porter duff xp factories.
egdaniel [Wed, 3 Dec 2014 19:41:54 +0000 (11:41 -0800)]
Use static XPF for porter duff xp factories.

BUG=skia:

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

9 years agoCopy src in SkDrawLooper::computeFastBounds().
mtklein [Wed, 3 Dec 2014 19:08:47 +0000 (11:08 -0800)]
Copy src in SkDrawLooper::computeFastBounds().

We do alias src and dst when building the BBH.  This meant we calculated
the wrong bounds in LayoutTests/ietestcenter/css3/text/textshadow-010.htm.

Not sure how best to test this inside Skia.  It may become moot after I
work through the API changes we were talking about today, but if not I'll
make sure it's tested somehow before I'm done with SkDrawLoopers.

BUG=skia:3186

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

9 years agoFix PdfViewer BGR byte order
halcanary [Wed, 3 Dec 2014 19:03:52 +0000 (11:03 -0800)]
Fix PdfViewer BGR byte order

BUG=skia:3184

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

9 years agoAdd glGetShaderPrecisionFormat
bsalomon [Wed, 3 Dec 2014 18:46:08 +0000 (10:46 -0800)]
Add glGetShaderPrecisionFormat

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

9 years agoRevert of remove unused device::eraseColor (patchset #1 id:1 of https://codereview...
halcanary [Wed, 3 Dec 2014 18:41:11 +0000 (10:41 -0800)]
Revert of remove unused device::eraseColor (patchset #1 id:1 of https://codereview.chromium.org/765643004/)

Reason for revert:
../../skia/ext/bitmap_platform_device_cairo.cc:131:13: error: no member named 'eraseColor' in 'skia::BitmapPlatformDevice'

Original issue's description:
> remove unused device::eraseColor
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/b1ab276c3719d6690e58f347c25126d2b8929c5d

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

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

9 years agoAdd XferProcessor factory in GrPaint and GrDrawState.
egdaniel [Wed, 3 Dec 2014 18:40:13 +0000 (10:40 -0800)]
Add XferProcessor factory in GrPaint and GrDrawState.

In this CL the XP should have zero effect on the actual rendering pipeline.

BUG=skia:

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

9 years agorebaseline images
Brian Salomon [Wed, 3 Dec 2014 18:36:10 +0000 (13:36 -0500)]
rebaseline images

TBR=

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

9 years agoUpdate color emoji GMs after https://codereview.chromium.org/759613005/.
jvanverth [Wed, 3 Dec 2014 18:35:37 +0000 (10:35 -0800)]
Update color emoji GMs after https://codereview.chromium.org/759613005/.

TBR=halcanary@google.com

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

9 years agoremove unused device::eraseColor
reed [Wed, 3 Dec 2014 17:47:48 +0000 (09:47 -0800)]
remove unused device::eraseColor

BUG=skia:
TBR=

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

9 years agobug fix for cubic low precision
joshualitt [Wed, 3 Dec 2014 17:29:52 +0000 (09:29 -0800)]
bug fix for cubic low precision

TBR=
BUG=skia:

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

9 years agoupdate tileimagefilter gm expectations
halcanary [Wed, 3 Dec 2014 16:59:48 +0000 (08:59 -0800)]
update tileimagefilter gm expectations

TBR=reed@google.com

NOTRY=true

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

9 years agoDecompose a weird assert.
mtklein [Wed, 3 Dec 2014 16:48:57 +0000 (08:48 -0800)]
Decompose a weird assert.

I got my hands on a list of new warnings coming out of MSVC when run with /analyze.

I scanned over them and didn't see any bugs, but I did notice this is just a weird
way to write this expression. (MSVC /analyze was wary of '=' in a boolean expression.)

BUG=skia:

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

9 years agoRebaseline verylargebitmap
Mike Klein [Wed, 3 Dec 2014 16:32:37 +0000 (11:32 -0500)]
Rebaseline verylargebitmap

BUG=skia:

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

9 years agoRemove unused constants.
mtklein [Wed, 3 Dec 2014 16:18:46 +0000 (08:18 -0800)]
Remove unused constants.

BUG=skia:

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

9 years ago(re)baseline several of my gms
halcanary [Wed, 3 Dec 2014 16:17:57 +0000 (08:17 -0800)]
(re)baseline several of my gms

TBR=
NOTRY=true

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

9 years agoFuse GrReplacements and GrLayerCache
robertphillips [Wed, 3 Dec 2014 15:33:57 +0000 (07:33 -0800)]
Fuse GrReplacements and GrLayerCache

The conversion step from GrCachedLayer to ReplacementInfo isn't necessary.

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

9 years agoFirst step to moving vertex attributes to the geometryProcessor
joshualitt [Wed, 3 Dec 2014 14:24:10 +0000 (06:24 -0800)]
First step to moving vertex attributes to the geometryProcessor

BUG=skia:

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

9 years agoMake debugger not fail with webpages_playback script and multiple skp files
kkinnunen [Wed, 3 Dec 2014 14:18:12 +0000 (06:18 -0800)]
Make debugger not fail with webpages_playback script and multiple skp files

The debugger accepts either a single skp or a directory as a parameter.
The webpages_playback script used to pass multiple files using a '*'
glob.

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

9 years agoUpdate webpages_playback documentation
kkinnunen [Wed, 3 Dec 2014 13:51:24 +0000 (05:51 -0800)]
Update webpages_playback documentation

Update the documentation on how to run webpages_playback. It was out of
date.

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

9 years agoRemove Google Storage scheme prefix correctly from gs base name in webpages_playback
kkinnunen [Wed, 3 Dec 2014 12:38:46 +0000 (04:38 -0800)]
Remove Google Storage scheme prefix correctly from gs base name in webpages_playback

In python, str.lstrip([chars]) means "lstrip any of the chars from str",
not "remove prefix". Thus "gs://skia".lstrip("gs://") yields "kia".

Replace with custom function stripping the prefix from lstrip()ed gs
base name.

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

9 years agoMake render_pdfs not crash webpages_playback script
kkinnunen [Wed, 3 Dec 2014 12:22:06 +0000 (04:22 -0800)]
Make render_pdfs not crash webpages_playback script

The render_pdfs nowadays seems to input the skps from
the dir passed as '-r' parameter.

The app will not output anything, but it will not crash the
webpages_playback script either. Affects only runs that have
--skia_tools=<dir> argument.

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

9 years agoUpdate SKP version
skia.buildbots [Wed, 3 Dec 2014 07:05:53 +0000 (23:05 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agoRevert of rebaseline after clear change -- pdf was not treating clear as SRC_MODE...
reed [Wed, 3 Dec 2014 04:04:40 +0000 (20:04 -0800)]
Revert of rebaseline after clear change -- pdf was not treating clear as SRC_MODE (patchset #1 id:1 of https://codereview.chromium.org/759303004/)

Reason for revert:
reverted clear() change

Original issue's description:
> rebaseline after clear change -- pdf was not treating clear as SRC_MODE
>
> BUG=skia:
> NOTRY=True
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/2fb352abebc342a322d4a66c054bbff8bd565767

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

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

9 years agoRevert "Change clear() to respect the clip"
reed [Wed, 3 Dec 2014 03:40:18 +0000 (19:40 -0800)]
Revert "Change clear() to respect the clip"

This reverts commit 3729469d6a12266037b697c2192768545e097ab0.

BUG=skia:
TBR=

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

9 years agoRevert of implement device::clear until we can remove callers in chrome skia/ext...
reed [Wed, 3 Dec 2014 03:11:30 +0000 (19:11 -0800)]
Revert of implement device::clear until we can remove callers in chrome skia/ext (patchset #1 id:1 of https://codereview.chromium.org/773903002/)

Reason for revert:
failing win unittests

Original issue's description:
> implement device::clear until we can remove callers in chrome skia/ext
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/252fccfb546efe83fb1d2c7a0b3c18a96ff46ea4

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

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

9 years agoAdd SSSE3 acceleration for S32_D16_filter_DXDY
qiankun.miao [Wed, 3 Dec 2014 02:26:09 +0000 (18:26 -0800)]
Add SSSE3 acceleration for S32_D16_filter_DXDY

With this CL, related nanobench can be improved for 565 config.
                bitmap_BGRA_8888_scale_rotate_bilerp     115us -> 70.5us       0.61x
bitmap_BGRA_8888_update_volatile_scale_rotate_bilerp     115us -> 70.5us       0.61x
         bitmap_BGRA_8888_update_scale_rotate_bilerp     112us ->   68us       0.6x

BUG=skia:

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

9 years agoAdd matrix operations to C canvas API
abarth [Tue, 2 Dec 2014 23:47:33 +0000 (15:47 -0800)]
Add matrix operations to C canvas API

R=reed@google.com
BUG=skia:

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

9 years agowork in progress
halcanary [Tue, 2 Dec 2014 22:01:46 +0000 (14:01 -0800)]
work in progress

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

9 years agocheck matrix does not have rotation or perspective transformation
derekf [Tue, 2 Dec 2014 21:51:29 +0000 (13:51 -0800)]
check matrix does not have rotation or perspective transformation

When checking whether we need apply AA to a rect for non-msaa target,
simply checking that the mapped rect is integer is not enough.
We need to check whether the transformation matrix has transformations
other than simple translation.

Original-Author: Henry Song <henrysong@samsung.com>

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

9 years agoFlail a little against LLVM crash.
mtklein [Tue, 2 Dec 2014 21:17:05 +0000 (13:17 -0800)]
Flail a little against LLVM crash.

Cannot reproduce this in my local Chromium checkout (using their Clang, just like the bots).

BUG=skia:

TBR=reed@google.com

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

9 years agoimplement device::clear until we can remove callers in chrome skia/ext
reed [Tue, 2 Dec 2014 20:53:04 +0000 (12:53 -0800)]
implement device::clear until we can remove callers in chrome skia/ext

BUG=skia:
TBR=

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

9 years agobaseline colorwheelnative
halcanary [Tue, 2 Dec 2014 20:31:26 +0000 (12:31 -0800)]
baseline colorwheelnative

TBR=scroggo@google.com
NOTRY=true

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

9 years agoRemove SK_SUPPORT_DEPRECATED_SCALARROUND.
scroggo [Tue, 2 Dec 2014 20:30:38 +0000 (12:30 -0800)]
Remove SK_SUPPORT_DEPRECATED_SCALARROUND.

Our clients no longer require it.

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

9 years agorebaseline after clear change -- pdf was not treating clear as SRC_MODE
reed [Tue, 2 Dec 2014 20:21:02 +0000 (12:21 -0800)]
rebaseline after clear change -- pdf was not treating clear as SRC_MODE

BUG=skia:
NOTRY=True
TBR=

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

9 years agoAdding a PictureResolution option to SkPictureImageFilter
Justin Novosad [Tue, 2 Dec 2014 19:50:56 +0000 (14:50 -0500)]
Adding a PictureResolution option to SkPictureImageFilter

This change adds an option to SkPictureImageFilter to make it
rasterize SkPicture in a resolution that matches the local coordinate
space (equivalent to the record-time device space).

BUG=skia:3176
R=reed@google.com, senorblanco@chromium.org

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

9 years agouse drawRect when drawing a bitmap with anti-aliasing on a non-msaa target
derekf [Tue, 2 Dec 2014 19:02:06 +0000 (11:02 -0800)]
use drawRect when drawing a bitmap with anti-aliasing on a non-msaa target

If the dest isn't pixel aligned, or if a non 90 degree rotation is
present, we need to use drawRect() for drawing anti-aliased bitmaps on
non-msaa targets or the edges won't be anti-aliased as intended.

Note: If the bitmap size is bigger than max texture size we fall back to drawBitmapCommon.

Original-Author: Henry Song <henrysong@samsung.com>

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

9 years agouse portable fonts
halcanary [Tue, 2 Dec 2014 19:00:40 +0000 (11:00 -0800)]
use portable fonts

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

9 years agoChange clear() to respect the clip
reed [Tue, 2 Dec 2014 18:08:11 +0000 (10:08 -0800)]
Change clear() to respect the clip

patch from issue 769703002 at patchset 1 (http://crrev.com/769703002#ps1)

BUG=skia:

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

9 years agoMake SkColorTable explicitly thread-safe.
mtklein [Tue, 2 Dec 2014 18:02:47 +0000 (10:02 -0800)]
Make SkColorTable explicitly thread-safe.

Mostly this means using SkLazyPtr for the 16-bit cache.
We can remove the copy constructor now and just ref it instead.

BUG=skia:

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

9 years agomove some copy surface stuff to GrFlushToGpuDrawTarget
bsalomon [Tue, 2 Dec 2014 17:40:12 +0000 (09:40 -0800)]
move some copy surface stuff to GrFlushToGpuDrawTarget

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

9 years agocolorwheelnative gm, to test that colors look right under all conditions.
halcanary [Tue, 2 Dec 2014 17:37:17 +0000 (09:37 -0800)]
colorwheelnative gm, to test that colors look right under all conditions.

Motivation: colorwheel on pdf-native (MacOS coregraphics) reverses Blue and Red.  I want to see if this has anything to do with image decoding.

BUG=skia:3184

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

9 years agoSkColorTable locking serves no purpose anymore.
mtklein [Tue, 2 Dec 2014 17:11:25 +0000 (09:11 -0800)]
SkColorTable locking serves no purpose anymore.

The only thing the unlock methods were doing was assert their balance.
This removes the unlock methods and renames the lock methods "read".

BUG=skia:

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

9 years agoRemove comment
robertphillips [Tue, 2 Dec 2014 17:00:59 +0000 (09:00 -0800)]
Remove comment

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

9 years agoskia: Prevent GL_RED from being used with MESA
hendrikw [Tue, 2 Dec 2014 15:30:30 +0000 (07:30 -0800)]
skia: Prevent GL_RED from being used with MESA

MESA unfortunately doesn't support GL_RED or GL_RG when used with frame buffers.
Don't allow fTextureRedSupport to be set when using MESA.

BUG=skia:3181

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

9 years agoupdated expectations from d476a176b774
halcanary [Tue, 2 Dec 2014 15:29:18 +0000 (07:29 -0800)]
updated expectations from d476a176b774

BUG=skia:3180
TBR=reed@google.com
NOTRY=true

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

9 years agoRemove PDF JPEG shortcut, since it fails on grayscale JPEGs.
halcanary [Tue, 2 Dec 2014 14:37:21 +0000 (06:37 -0800)]
Remove PDF JPEG shortcut, since it fails on grayscale JPEGs.

BUG=436079

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

9 years agoRemove support for OSX 10.5.
bungeman [Mon, 1 Dec 2014 23:04:53 +0000 (15:04 -0800)]
Remove support for OSX 10.5.

No user supports OSX 10.5 at this point, so remove the
last support for building there.

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

9 years agoRemove SkASSERT_CONTINUE.
bungeman [Mon, 1 Dec 2014 23:03:54 +0000 (15:03 -0800)]
Remove SkASSERT_CONTINUE.

This macro is no longer used.

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

9 years agoAdd scale and skew to C canvas API
abarth [Mon, 1 Dec 2014 22:04:03 +0000 (14:04 -0800)]
Add scale and skew to C canvas API

R=reed@chromium.org
BUG=skia:

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

9 years agoClean up FreeType library ref counting.
bungeman [Mon, 1 Dec 2014 22:01:32 +0000 (14:01 -0800)]
Clean up FreeType library ref counting.

The existing reference counting and code for LCD is difficult to
understand. This cleans it up a bit in preperation for the typefaces
holding the references and faces themselves which will clean this up
quite a bit more.

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

9 years agoadd gm to test rounding between clips and drawBitmapRect
reed [Mon, 1 Dec 2014 21:54:01 +0000 (13:54 -0800)]
add gm to test rounding between clips and drawBitmapRect

BUG=skia:3179

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

9 years agoSkDrawLooper: No need for virtual bounds computation methods.
mtklein [Mon, 1 Dec 2014 21:03:22 +0000 (13:03 -0800)]
SkDrawLooper: No need for virtual bounds computation methods.

No subclass overrides either method.

This is just warmup.  Perf is neutral.  The real meat of the time spent
is inside canComputeFastBounds / computeFastBounds, not getting to them.

BUG=skia:

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

9 years agoAdd function to return an unpremuled version of a GrColor
egdaniel [Mon, 1 Dec 2014 20:30:50 +0000 (12:30 -0800)]
Add function to return an unpremuled version of a GrColor

BUG=skia:

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

9 years agomultipage_pdf_profiler, gmtoskp
halcanary [Mon, 1 Dec 2014 20:21:25 +0000 (12:21 -0800)]
multipage_pdf_profiler, gmtoskp

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

9 years agoPre-cache local matrix type in shader constructor.
mtklein [Mon, 1 Dec 2014 20:06:24 +0000 (12:06 -0800)]
Pre-cache local matrix type in shader constructor.

TSAN points out we race when choosing our blitter without this.

BUG=437511

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

9 years agoRemove SK_SUPPORT_LEGACY_DEEPFLATTENING.
mtklein [Mon, 1 Dec 2014 19:47:08 +0000 (11:47 -0800)]
Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.

This was needed for pictures before v33, and we're now requiring v35+.

Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88

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

9 years agoAdd additional clean up code in MPD path
robertphillips [Mon, 1 Dec 2014 19:39:59 +0000 (11:39 -0800)]
Add additional clean up code in MPD path

This addresses an edge case where a picture only has one layer which is atlasable but doesn't make it into the atlas. In this case asserts can fire since there is no atlased layer to clean up the tracking picture object.

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

9 years agoRemove orphaned SkImageDecoder::Target.
scroggo [Mon, 1 Dec 2014 19:35:19 +0000 (11:35 -0800)]
Remove orphaned SkImageDecoder::Target.

This was used by an experimental method on SkImageDecoder, which no
longer exists.

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

9 years agoForce SkMatrix type while recording too.
mtklein [Mon, 1 Dec 2014 19:03:37 +0000 (11:03 -0800)]
Force SkMatrix type while recording too.

This switches to a new way of doing this, enforcing the caching with the type
recorded rather than having to do it in SkRecorder.  Should be more foolproof.

Updated SkPath and SkBitmap's equivalents too.  ImmutableBitmap was close,
but using inheritance now makes the rest of the code less weird.

BUG=437511

I'm not sure whether or not this will _fix_ the SkMatrix aspect of that bug.
There may be other SkMatrices that we're racing on.  It does cover the obvious
ones, though, and removing the SkTRacy<> wrapper will allow TSAN to show
us any other races.

It turned out to be easier to turn missing optional matrices into I early rather
than late.  I figure this should be harmless.  Recording and playback perf both
look neutral.

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

9 years agoRevert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (patchset #1 id:1 of https://coder...
mtklein [Mon, 1 Dec 2014 18:56:05 +0000 (10:56 -0800)]
Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (patchset #1 id:1 of https://codereview.chromium.org/769953002/)

Reason for revert:
Breaks canary builds.  Will reland after the Chromium change lands.

Original issue's description:
> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.
>
> This was needed for pictures before v33, and we're now requiring v35+.
>
> Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88

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

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

9 years agoRemove SK_SUPPORT_LEGACY_DEEPFLATTENING.
mtklein [Mon, 1 Dec 2014 18:23:11 +0000 (10:23 -0800)]
Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.

This was needed for pictures before v33, and we're now requiring v35+.

Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc

BUG=skia:

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

9 years agoUse variable length key (rather than accumulated matrix) as save layer hoisting key
robertphillips [Mon, 1 Dec 2014 17:09:27 +0000 (09:09 -0800)]
Use variable length key (rather than accumulated matrix) as save layer hoisting key

Adding the rendering canvas' CTM to the layer hoisting key (i.e., Add support for hoisting layers in pictures drawn with a matrix - https://codereview.chromium.org/748853002/) has increased the cache miss rate due to accumulated floating point error. This CL fixes part of the issue by using the chain of operation indices leading to each saveLayer as the key. The canvas' CTM must still form part of the key but should be less subject to accumulated error.

BUG=skia:2315

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

9 years agoIgnore SkGlyphCache gamma for nvpr text
cdalton [Mon, 1 Dec 2014 16:57:33 +0000 (08:57 -0800)]
Ignore SkGlyphCache gamma for nvpr text

BUG=skia:

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

9 years agoAdd color emoji fallback for nvpr text
cdalton [Mon, 1 Dec 2014 16:38:55 +0000 (08:38 -0800)]
Add color emoji fallback for nvpr text

BUG=skia:

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

9 years agoAdd a base class for GrIODB that handles geometry data
bsalomon [Mon, 1 Dec 2014 16:19:34 +0000 (08:19 -0800)]
Add a base class for GrIODB that handles geometry data

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

9 years agoForce path bounds in recording.
mtklein [Mon, 1 Dec 2014 14:59:54 +0000 (06:59 -0800)]
Force path bounds in recording.

The use of SKTRacy isn't safe in SkPathRef.
There are logical dependencies between the racy fields.

Doesn't seem to affect recording performance:

$ c --match skp --config nonrendering
               tabl_techmeme.skp 81.1us ->   86us 1.06x
                 desk_mapsvg.skp 1.23ms -> 1.26ms 1.02x
           desk_yahooanswers.skp  114us ->  117us 1.02x
                tabl_sahadan.skp 70.9us ->   72us 1.02x
               desk_fontwipe.skp 31.6us ->   32us 1.01x
           tabl_cuteoverload.skp  414us ->  419us 1.01x
             desk_mobilenews.skp  503us ->  508us 1.01x
               desk_tigersvg.skp  150us ->  152us 1.01x
               desk_samoasvg.skp  608us ->  610us 1x
                   tabl_digg.skp  636us ->  638us 1x
                 tabl_pravda.skp  155us ->  156us 1x
     desk_jsfiddlehumperclip.skp 33.9us -> 33.9us 1x
      tabl_culturalsolutions.skp  295us ->  295us 1x
                desk_youtube.skp  447us ->  448us 1x
                    desk_gws.skp  144us ->  144us 1x
               tabl_frantzen.skp   42us ->   42us 1x
                  tabl_gspro.skp 50.1us ->   50us 1x
         tabl_googlecalendar.skp  165us ->  165us 1x
                desk_twitter.skp  359us ->  358us 1x
              desk_wordpress.skp  588us ->  583us 0.99x
         desk_jsfiddlebigcar.skp 32.8us -> 32.5us 0.99x
                desk_booking.skp  838us ->  827us 0.99x
          tabl_androidpolice.skp 1.42ms ->  1.4ms 0.99x
                desk_blogger.skp  378us ->  372us 0.98x
                desk_wowwiki.skp 1.11ms -> 1.09ms 0.98x
                   tabl_cnet.skp  115us ->  112us 0.97x
            desk_silkfinance.skp 57.7us -> 55.9us 0.97x
                    tabl_cnn.skp  136us ->  131us 0.97x
                 desk_sfgate.skp  396us ->  377us 0.95x
             tabl_deviantart.skp  107us ->  102us 0.95x
                tabl_mozilla.skp  1.4ms -> 1.32ms 0.94x
BUG=437511

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

9 years agoBump min picture version.
mtklein [Mon, 1 Dec 2014 14:56:38 +0000 (06:56 -0800)]
Bump min picture version.

Chrome Stable is M39, which produces picture format v35:
    https://chromium.googlesource.com/skia/+/chrome/m39/include/core/SkPicture.h

We don't need any code to deal with pictures older than v35.

(When M40 goes stable, we can step up to v37, the current latest version.)

BUG=skia:

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

9 years agoAdd extra safety check to the EGL context setup.
joakim.landberg [Mon, 1 Dec 2014 14:46:01 +0000 (06:46 -0800)]
Add extra safety check to the EGL context setup.

Adds a check to make sure eglChooseConfig actually
found a valid config. Besides checking for EGL errors,
we also have to handle the case when no matching configs
are found, i.e when num_config is 0.

BUG=skia:

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

9 years agoFix Windows SkTime version
robertphillips [Mon, 1 Dec 2014 13:55:54 +0000 (05:55 -0800)]
Fix Windows SkTime version

Windows' GetSystemTime returns months in 1-12 range (http://msdn.microsoft.com/en-us/library/aa908737.aspx) while Linux' time returns months in 0-11 range.

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

9 years agoadd clip to PictureRenderer to better mimic Chromium's rendering method
robertphillips [Fri, 28 Nov 2014 15:42:16 +0000 (07:42 -0800)]
add clip to PictureRenderer to better mimic Chromium's rendering method

Since Chromium uses separate canvases when rendering tiles they get an implicit clip. This adds an explicit clip since the PictureRenderer reuses the same canvas.

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

9 years agoAdd float-to-half (binary16) conversion functions.
jvanverth [Wed, 26 Nov 2014 21:15:59 +0000 (13:15 -0800)]
Add float-to-half (binary16) conversion functions.

Based on code by Fabian Giesen at
https://fgiesen.wordpress.com/2012/03/28/half-to-float-done-quic/.

These will be needed for creating binary16 textures from floating point data.

BUG=skia:3103

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

9 years agoMake skia trace category disabled by default.
danakj [Wed, 26 Nov 2014 20:41:06 +0000 (12:41 -0800)]
Make skia trace category disabled by default.

BUG=skia:3088

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

9 years agosome cleanup around GrGpu/GrDrawTarget copySurface
bsalomon [Wed, 26 Nov 2014 20:28:00 +0000 (12:28 -0800)]
some cleanup around GrGpu/GrDrawTarget copySurface

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

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

9 years agoFix assert in GrMaskFormatBytesPerPixel.
jvanverth [Wed, 26 Nov 2014 20:07:33 +0000 (12:07 -0800)]
Fix assert in GrMaskFormatBytesPerPixel.

BUG=skia:3174

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

9 years agoRevert of some cleanup around GrGpu/GrDrawTarget copySurface (patchset #3 id:40001...
bsalomon [Wed, 26 Nov 2014 18:20:45 +0000 (10:20 -0800)]
Revert of some cleanup around GrGpu/GrDrawTarget copySurface (patchset #3 id:40001 of https://codereview.chromium.org/749903003/)

Reason for revert:
likely causing es rendering errors.

Original issue's description:
> some cleanup around GrGpu/GrDrawTarget copySurface
>
> Committed: https://skia.googlesource.com/skia/+/e9aa5dc4d5906788eaf691d7c69f1494928f401d

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

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

9 years agoadd basic tests for save/restore counting
reed [Wed, 26 Nov 2014 16:55:51 +0000 (08:55 -0800)]
add basic tests for save/restore counting

BUG=skia:

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

9 years agoUpdate effect key for descriptor to not record offsets.
egdaniel [Wed, 26 Nov 2014 16:50:50 +0000 (08:50 -0800)]
Update effect key for descriptor to not record offsets.

BUG=skia:

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

9 years agorename SkDrawable to SkADrawable
reed [Wed, 26 Nov 2014 16:50:45 +0000 (08:50 -0800)]
rename SkDrawable to SkADrawable

BUG=skia:

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

9 years agoadd sample to exercising hittesting
reed [Wed, 26 Nov 2014 16:45:36 +0000 (08:45 -0800)]
add sample to exercising hittesting

patch from issue 752403002 at patchset 1 (http://crrev.com/752403002#ps1)

BUG=skia:

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

9 years agosome cleanup around GrGpu/GrDrawTarget copySurface
bsalomon [Wed, 26 Nov 2014 16:45:30 +0000 (08:45 -0800)]
some cleanup around GrGpu/GrDrawTarget copySurface

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

9 years agoFix early out in GrResourceCache2::purgeAsNeeded
bsalomon [Wed, 26 Nov 2014 14:06:02 +0000 (06:06 -0800)]
Fix early out in GrResourceCache2::purgeAsNeeded

BUG=chromium:436846
TBR=robertphillips@google.com

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

9 years agoRevert of nanobench: lazily decode bitmaps in .skps. (patchset #1 id:1 of https:...
mtklein [Tue, 25 Nov 2014 22:57:26 +0000 (14:57 -0800)]
Revert of nanobench: lazily decode bitmaps in .skps. (patchset #1 id:1 of https://codereview.chromium.org/743613005/)

Reason for revert:
Some bots crashing.

Original issue's description:
> nanobench: lazily decode bitmaps in .skps.
>
> This cuts down on tool overhead when running something like recording only,
>     $ out/Release/nanobench --match skp --config nonrendering
> which doesn't usually ever need to decode the images.
>
> The actual measurements for recording don't change, as the decode is not in the timed section.  It just skips irrelevant code, removing it from the profile and making the tool run faster.
>
> This does, however, make a significant difference for playback speed.  Most skps draw faster with this patch, some slower.  I don't really have a good intuition for what's going on here.  There is a fixed clip acting as a viewport, so there are probably lots of images that don't ever need to be decoded.  Ideas?  Is this perhaps because we're now blitting from smaller, partially decoded source images?
>
> ~/skia (clean) $ compare clean.log lazy-decode-bitmaps.log
>                    tabl_slashdot.skp_1 2.76ms -> 4.33ms 1.57x
>                tabl_slashdot.skp_1_mpd 2.79ms -> 4.07ms 1.46x
>                     tabl_sahadan.skp_1 3.41ms -> 4.87ms 1.43x
>                  tabl_googleblog.skp_1 1.52ms -> 2.05ms 1.35x
>                tabl_techmeme.skp_1_mpd 1.14ms -> 1.51ms 1.32x
>                tabl_transformice.skp_1 2.61ms -> 3.43ms 1.31x
>                 tabl_sahadan.skp_1_mpd 3.54ms -> 4.48ms 1.26x
>                    tabl_techmeme.skp_1 1.01ms -> 1.27ms 1.26x
>                 tabl_nytimes.skp_1_mpd    1ms -> 1.23ms 1.23x
>            tabl_worldjournal.skp_1_mpd 1.98ms -> 2.43ms 1.23x
>                  tabl_pravda.skp_1_mpd 2.05ms -> 2.51ms 1.22x
>            tabl_transformice.skp_1_mpd 2.75ms -> 3.19ms 1.16x
>                     tabl_nytimes.skp_1  874us -> 1.01ms 1.15x
>                      tabl_pravda.skp_1 1.83ms -> 1.99ms 1.09x
>                tabl_worldjournal.skp_1 1.76ms -> 1.91ms 1.09x
>                 desk_wowwiki.skp_1_mpd  3.7ms ->  3.9ms 1.05x
>                        tabl_digg.skp_1 3.99ms -> 4.16ms 1.04x
>                   tabl_ukwsj.skp_1_mpd    3ms -> 3.12ms 1.04x
>                     desk_booking.skp_1 3.74ms -> 3.81ms 1.02x
>     desk_googlespreadsheetdashed.skp_1 10.6ms -> 10.6ms 1x
>                       tabl_ukwsj.skp_1 2.88ms -> 2.89ms 1x
> desk_googlespreadsheetdashed.skp_1_mpd 11.8ms -> 11.8ms 1x
>      desk_jsfiddlehumperclip.skp_1_mpd  891us ->  888us 1x
>           desk_googlespreadsheet.skp_1 4.65ms -> 4.62ms 0.99x
>                   tabl_gspro.skp_1_mpd 1.97ms -> 1.94ms 0.99x
>                 desk_booking.skp_1_mpd  4.1ms ->    4ms 0.98x
>                      desk_carsvg.skp_1 18.2ms -> 17.7ms 0.97x
>             desk_gmailthread.skp_1_mpd 2.81ms -> 2.73ms 0.97x
>                desk_tigersvg.skp_1_mpd 19.5ms -> 18.9ms 0.97x
>                      desk_mapsvg.skp_1 88.4ms -> 85.6ms 0.97x
>                    tabl_cnet.skp_1_mpd 1.43ms -> 1.38ms 0.97x
>              desk_jsfiddlebigcar.skp_1 1.26ms -> 1.22ms 0.96x
>                         desk_gws.skp_1 1.87ms ->  1.8ms 0.96x
>                    desk_linkedin.skp_1 2.07ms -> 1.98ms 0.96x
>              tabl_deviantart.skp_1_mpd  118ms ->  113ms 0.96x
>                        tabl_cnet.skp_1  1.2ms -> 1.14ms 0.95x
>           tabl_androidpolice.skp_1_mpd 5.95ms -> 5.63ms 0.95x
>                      desk_sfgate.skp_1 1.75ms -> 1.64ms 0.94x
>                     desk_twitter.skp_1   74ms -> 69.6ms 0.94x
>                 desk_youtube.skp_1_mpd 3.17ms -> 2.96ms 0.93x
>                 desk_gmailthread.skp_1 2.73ms -> 2.54ms 0.93x
>             desk_silkfinance.skp_1_mpd 1.71ms -> 1.59ms 0.93x
>          desk_jsfiddlebigcar.skp_1_mpd 1.45ms -> 1.35ms 0.93x
>             desk_pokemonwiki.skp_1_mpd 2.72ms -> 2.51ms 0.92x
>                     desk_gws.skp_1_mpd 2.14ms -> 1.98ms 0.92x
>                  desk_googlehome.skp_1  563us ->  517us 0.92x
>                        desk_espn.skp_1 4.24ms -> 3.89ms 0.92x
>           tabl_culturalsolutions.skp_1 12.7ms -> 11.6ms 0.91x
>                  desk_sfgate.skp_1_mpd 1.91ms -> 1.74ms 0.91x
>                        tabl_hsfi.skp_1 1.06ms ->  966us 0.91x
>                desk_samoasvg.skp_1_mpd 10.5ms -> 9.47ms 0.91x
>                desk_facebook.skp_1_mpd  3.8ms -> 3.43ms 0.9x
>                     desk_youtube.skp_1 3.52ms -> 3.14ms 0.89x
>                    desk_ebay.skp_1_mpd 2.95ms -> 2.62ms 0.89x
>                    desk_samoasvg.skp_1 10.9ms -> 9.66ms 0.89x
>       desk_googlespreadsheet.skp_1_mpd 5.59ms -> 4.94ms 0.88x
>                  desk_mapsvg.skp_1_mpd  100ms -> 87.9ms 0.88x
>                    desk_espn.skp_1_mpd  4.7ms -> 4.12ms 0.88x
>               desk_wordpress.skp_1_mpd 1.92ms -> 1.68ms 0.87x
>                  tabl_deviantart.skp_1  140ms ->  122ms 0.87x
>            tabl_cuteoverload.skp_1_mpd 4.41ms -> 3.83ms 0.87x
>                    desk_tigersvg.skp_1 19.6ms ->   17ms 0.87x
>              tabl_googlecalendar.skp_1 4.01ms -> 3.44ms 0.86x
>                     desk_blogger.skp_1 2.49ms -> 2.14ms 0.86x
>              desk_chalkboard.skp_1_mpd 52.7ms ->   45ms 0.85x
>                     desk_weather.skp_1 2.88ms -> 2.46ms 0.85x
>                  desk_chalkboard.skp_1   51ms -> 43.4ms 0.85x
>                desk_yahooanswers.skp_1 2.74ms -> 2.32ms 0.85x
>              desk_forecastio.skp_1_mpd 1.26ms -> 1.07ms 0.85x
>               tabl_androidpolice.skp_1 5.18ms -> 4.34ms 0.84x
>            desk_yahooanswers.skp_1_mpd 3.44ms -> 2.85ms 0.83x
>                     tabl_cnn.skp_1_mpd 2.59ms -> 2.15ms 0.83x
>                   desk_pinterest.skp_1 2.69ms -> 2.22ms 0.83x
>                    tabl_hsfi.skp_1_mpd  1.6ms -> 1.32ms 0.82x
>       tabl_culturalsolutions.skp_1_mpd 13.8ms -> 11.3ms 0.82x
>                 desk_twitter.skp_1_mpd 76.6ms ->   63ms 0.82x
>                        desk_ebay.skp_1 3.11ms -> 2.51ms 0.81x
>                     tabl_mlb.skp_1_mpd 3.17ms -> 2.53ms 0.8x
>                     tabl_mozilla.skp_1 2.42ms -> 1.91ms 0.79x
>                 desk_pokemonwiki.skp_1 2.84ms -> 2.22ms 0.78x
>                  desk_carsvg.skp_1_mpd 23.3ms -> 17.8ms 0.77x
>                     desk_wowwiki.skp_1 4.21ms -> 3.21ms 0.76x
>                      desk_amazon.skp_1  963us ->  728us 0.76x
>               desk_css3gradients.skp_1 2.58ms -> 1.92ms 0.74x
>                tabl_cuteoverload.skp_1 4.55ms -> 3.38ms 0.74x
>                         tabl_cnn.skp_1 3.13ms -> 2.29ms 0.73x
>              tabl_googleblog.skp_1_mpd 2.32ms ->  1.7ms 0.73x
>                  desk_mobilenews.skp_1 3.65ms -> 2.61ms 0.71x
>                  desk_googleplus.skp_1 3.76ms -> 2.66ms 0.71x
>                 tabl_mozilla.skp_1_mpd 2.88ms -> 2.03ms 0.71x
>               desk_pinterest.skp_1_mpd 3.17ms -> 2.21ms 0.7x
>           desk_css3gradients.skp_1_mpd 2.98ms -> 2.07ms 0.69x
>                 desk_silkfinance.skp_1 2.06ms -> 1.42ms 0.69x
>                    desk_facebook.skp_1  4.5ms -> 3.07ms 0.68x
>              desk_mobilenews.skp_1_mpd 4.05ms -> 2.73ms 0.68x
>                   desk_baidu.skp_1_mpd 2.73ms -> 1.81ms 0.66x
>                 desk_weather.skp_1_mpd 3.93ms ->  2.5ms 0.64x
>                   desk_wordpress.skp_1 2.15ms -> 1.36ms 0.63x
>              desk_googlehome.skp_1_mpd 1.02ms ->  605us 0.59x
>                    desk_fontwipe.skp_1  722us ->  402us 0.56x
>                desk_fontwipe.skp_1_mpd  897us ->  486us 0.54x
>                       desk_baidu.skp_1 3.02ms ->  1.6ms 0.53x
>                  desk_forecastio.skp_1 2.01ms ->  999us 0.5x
>                  desk_amazon.skp_1_mpd 1.77ms ->  860us 0.49x
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7e225bdb1f00ae4aed524ff8d0a61df3d3abb109

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

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

9 years agoremove proc key
joshualitt [Tue, 25 Nov 2014 22:52:21 +0000 (14:52 -0800)]
remove proc key

BUG=skia:

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

9 years agonanobench: lazily decode bitmaps in .skps.
mtklein [Tue, 25 Nov 2014 22:34:03 +0000 (14:34 -0800)]
nanobench: lazily decode bitmaps in .skps.

This cuts down on tool overhead when running something like recording only,
    $ out/Release/nanobench --match skp --config nonrendering
which doesn't usually ever need to decode the images.

The actual measurements for recording don't change, as the decode is not in the timed section.  It just skips irrelevant code, removing it from the profile and making the tool run faster.

This does, however, make a significant difference for playback speed.  Most skps draw faster with this patch, some slower.  I don't really have a good intuition for what's going on here.  There is a fixed clip acting as a viewport, so there are probably lots of images that don't ever need to be decoded.  Ideas?  Is this perhaps because we're now blitting from smaller, partially decoded source images?

~/skia (clean) $ compare clean.log lazy-decode-bitmaps.log
                   tabl_slashdot.skp_1 2.76ms -> 4.33ms 1.57x
               tabl_slashdot.skp_1_mpd 2.79ms -> 4.07ms 1.46x
                    tabl_sahadan.skp_1 3.41ms -> 4.87ms 1.43x
                 tabl_googleblog.skp_1 1.52ms -> 2.05ms 1.35x
               tabl_techmeme.skp_1_mpd 1.14ms -> 1.51ms 1.32x
               tabl_transformice.skp_1 2.61ms -> 3.43ms 1.31x
                tabl_sahadan.skp_1_mpd 3.54ms -> 4.48ms 1.26x
                   tabl_techmeme.skp_1 1.01ms -> 1.27ms 1.26x
                tabl_nytimes.skp_1_mpd    1ms -> 1.23ms 1.23x
           tabl_worldjournal.skp_1_mpd 1.98ms -> 2.43ms 1.23x
                 tabl_pravda.skp_1_mpd 2.05ms -> 2.51ms 1.22x
           tabl_transformice.skp_1_mpd 2.75ms -> 3.19ms 1.16x
                    tabl_nytimes.skp_1  874us -> 1.01ms 1.15x
                     tabl_pravda.skp_1 1.83ms -> 1.99ms 1.09x
               tabl_worldjournal.skp_1 1.76ms -> 1.91ms 1.09x
                desk_wowwiki.skp_1_mpd  3.7ms ->  3.9ms 1.05x
                       tabl_digg.skp_1 3.99ms -> 4.16ms 1.04x
                  tabl_ukwsj.skp_1_mpd    3ms -> 3.12ms 1.04x
                    desk_booking.skp_1 3.74ms -> 3.81ms 1.02x
    desk_googlespreadsheetdashed.skp_1 10.6ms -> 10.6ms 1x
                      tabl_ukwsj.skp_1 2.88ms -> 2.89ms 1x
desk_googlespreadsheetdashed.skp_1_mpd 11.8ms -> 11.8ms 1x
     desk_jsfiddlehumperclip.skp_1_mpd  891us ->  888us 1x
          desk_googlespreadsheet.skp_1 4.65ms -> 4.62ms 0.99x
                  tabl_gspro.skp_1_mpd 1.97ms -> 1.94ms 0.99x
                desk_booking.skp_1_mpd  4.1ms ->    4ms 0.98x
                     desk_carsvg.skp_1 18.2ms -> 17.7ms 0.97x
            desk_gmailthread.skp_1_mpd 2.81ms -> 2.73ms 0.97x
               desk_tigersvg.skp_1_mpd 19.5ms -> 18.9ms 0.97x
                     desk_mapsvg.skp_1 88.4ms -> 85.6ms 0.97x
                   tabl_cnet.skp_1_mpd 1.43ms -> 1.38ms 0.97x
             desk_jsfiddlebigcar.skp_1 1.26ms -> 1.22ms 0.96x
                        desk_gws.skp_1 1.87ms ->  1.8ms 0.96x
                   desk_linkedin.skp_1 2.07ms -> 1.98ms 0.96x
             tabl_deviantart.skp_1_mpd  118ms ->  113ms 0.96x
                       tabl_cnet.skp_1  1.2ms -> 1.14ms 0.95x
          tabl_androidpolice.skp_1_mpd 5.95ms -> 5.63ms 0.95x
                     desk_sfgate.skp_1 1.75ms -> 1.64ms 0.94x
                    desk_twitter.skp_1   74ms -> 69.6ms 0.94x
                desk_youtube.skp_1_mpd 3.17ms -> 2.96ms 0.93x
                desk_gmailthread.skp_1 2.73ms -> 2.54ms 0.93x
            desk_silkfinance.skp_1_mpd 1.71ms -> 1.59ms 0.93x
         desk_jsfiddlebigcar.skp_1_mpd 1.45ms -> 1.35ms 0.93x
            desk_pokemonwiki.skp_1_mpd 2.72ms -> 2.51ms 0.92x
                    desk_gws.skp_1_mpd 2.14ms -> 1.98ms 0.92x
                 desk_googlehome.skp_1  563us ->  517us 0.92x
                       desk_espn.skp_1 4.24ms -> 3.89ms 0.92x
          tabl_culturalsolutions.skp_1 12.7ms -> 11.6ms 0.91x
                 desk_sfgate.skp_1_mpd 1.91ms -> 1.74ms 0.91x
                       tabl_hsfi.skp_1 1.06ms ->  966us 0.91x
               desk_samoasvg.skp_1_mpd 10.5ms -> 9.47ms 0.91x
               desk_facebook.skp_1_mpd  3.8ms -> 3.43ms 0.9x
                    desk_youtube.skp_1 3.52ms -> 3.14ms 0.89x
                   desk_ebay.skp_1_mpd 2.95ms -> 2.62ms 0.89x
                   desk_samoasvg.skp_1 10.9ms -> 9.66ms 0.89x
      desk_googlespreadsheet.skp_1_mpd 5.59ms -> 4.94ms 0.88x
                 desk_mapsvg.skp_1_mpd  100ms -> 87.9ms 0.88x
                   desk_espn.skp_1_mpd  4.7ms -> 4.12ms 0.88x
              desk_wordpress.skp_1_mpd 1.92ms -> 1.68ms 0.87x
                 tabl_deviantart.skp_1  140ms ->  122ms 0.87x
           tabl_cuteoverload.skp_1_mpd 4.41ms -> 3.83ms 0.87x
                   desk_tigersvg.skp_1 19.6ms ->   17ms 0.87x
             tabl_googlecalendar.skp_1 4.01ms -> 3.44ms 0.86x
                    desk_blogger.skp_1 2.49ms -> 2.14ms 0.86x
             desk_chalkboard.skp_1_mpd 52.7ms ->   45ms 0.85x
                    desk_weather.skp_1 2.88ms -> 2.46ms 0.85x
                 desk_chalkboard.skp_1   51ms -> 43.4ms 0.85x
               desk_yahooanswers.skp_1 2.74ms -> 2.32ms 0.85x
             desk_forecastio.skp_1_mpd 1.26ms -> 1.07ms 0.85x
              tabl_androidpolice.skp_1 5.18ms -> 4.34ms 0.84x
           desk_yahooanswers.skp_1_mpd 3.44ms -> 2.85ms 0.83x
                    tabl_cnn.skp_1_mpd 2.59ms -> 2.15ms 0.83x
                  desk_pinterest.skp_1 2.69ms -> 2.22ms 0.83x
                   tabl_hsfi.skp_1_mpd  1.6ms -> 1.32ms 0.82x
      tabl_culturalsolutions.skp_1_mpd 13.8ms -> 11.3ms 0.82x
                desk_twitter.skp_1_mpd 76.6ms ->   63ms 0.82x
                       desk_ebay.skp_1 3.11ms -> 2.51ms 0.81x
                    tabl_mlb.skp_1_mpd 3.17ms -> 2.53ms 0.8x
                    tabl_mozilla.skp_1 2.42ms -> 1.91ms 0.79x
                desk_pokemonwiki.skp_1 2.84ms -> 2.22ms 0.78x
                 desk_carsvg.skp_1_mpd 23.3ms -> 17.8ms 0.77x
                    desk_wowwiki.skp_1 4.21ms -> 3.21ms 0.76x
                     desk_amazon.skp_1  963us ->  728us 0.76x
              desk_css3gradients.skp_1 2.58ms -> 1.92ms 0.74x
               tabl_cuteoverload.skp_1 4.55ms -> 3.38ms 0.74x
                        tabl_cnn.skp_1 3.13ms -> 2.29ms 0.73x
             tabl_googleblog.skp_1_mpd 2.32ms ->  1.7ms 0.73x
                 desk_mobilenews.skp_1 3.65ms -> 2.61ms 0.71x
                 desk_googleplus.skp_1 3.76ms -> 2.66ms 0.71x
                tabl_mozilla.skp_1_mpd 2.88ms -> 2.03ms 0.71x
              desk_pinterest.skp_1_mpd 3.17ms -> 2.21ms 0.7x
          desk_css3gradients.skp_1_mpd 2.98ms -> 2.07ms 0.69x
                desk_silkfinance.skp_1 2.06ms -> 1.42ms 0.69x
                   desk_facebook.skp_1  4.5ms -> 3.07ms 0.68x
             desk_mobilenews.skp_1_mpd 4.05ms -> 2.73ms 0.68x
                  desk_baidu.skp_1_mpd 2.73ms -> 1.81ms 0.66x
                desk_weather.skp_1_mpd 3.93ms ->  2.5ms 0.64x
                  desk_wordpress.skp_1 2.15ms -> 1.36ms 0.63x
             desk_googlehome.skp_1_mpd 1.02ms ->  605us 0.59x
                   desk_fontwipe.skp_1  722us ->  402us 0.56x
               desk_fontwipe.skp_1_mpd  897us ->  486us 0.54x
                      desk_baidu.skp_1 3.02ms ->  1.6ms 0.53x
                 desk_forecastio.skp_1 2.01ms ->  999us 0.5x
                 desk_amazon.skp_1_mpd 1.77ms ->  860us 0.49x

BUG=skia:

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

9 years agoremove one place we read from gpu key in effects
joshualitt [Tue, 25 Nov 2014 22:21:55 +0000 (14:21 -0800)]
remove one place we read from gpu key in effects

BUG=skia:

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

9 years agoAdd an Android-framework-only stable ID to SkPixelRef.
scroggo [Tue, 25 Nov 2014 21:42:12 +0000 (13:42 -0800)]
Add an Android-framework-only stable ID to SkPixelRef.

BUG:b/18245805

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