History log of /external/skia/bench/nanobench.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5ec26ae9bfca635ccc98283aad5deda11519d826 25-Feb-2016 bsalomon <bsalomon@google.com> Move Budgeted enum out of SkSurface, use in GrTextureProvider

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
DOCS_PREVIEW= https://skia.org/?cl=1728093005

Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1728093005
/external/skia/bench/nanobench.cpp
bd500f09ce5b1ca464431d693f9ec5da60a59230 25-Feb-2016 bsalomon <bsalomon@google.com> Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (patchset #6 id:100001 of https://codereview.chromium.org/1728093005/ )

Reason for revert:
Need workaround for chrome to build

Original issue's description:
> Move Budgeted enum out of SkSurface, use in GrTextureProvider
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
> DOCS_PREVIEW= https://skia.org/?cl=1728093005
>
> Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1734043002
/external/skia/bench/nanobench.cpp
57599fe6c0336feaeeeb9b1996e77b70219b483c 25-Feb-2016 bsalomon <bsalomon@google.com> Move Budgeted enum out of SkSurface, use in GrTextureProvider

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
DOCS_PREVIEW= https://skia.org/?cl=1728093005

Review URL: https://codereview.chromium.org/1728093005
/external/skia/bench/nanobench.cpp
91e457d17f8c6c06de33eb2bb430a90ba472eda5 17-Feb-2016 cdalton <cdalton@nvidia.com> Fix "^" in --match flag for nanobench SKPs

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1706923002

Review URL: https://codereview.chromium.org/1706923002
/external/skia/bench/nanobench.cpp
84451024bfe06d138629dd7c27cf2ec0f9774dbe 11-Feb-2016 msarett <msarett@google.com> Add AndroidCodecBench to time scaled decodes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685693003

Review URL: https://codereview.chromium.org/1685693003
/external/skia/bench/nanobench.cpp
3ebd050be551e9d1364dbd115708e8f86397cd6f 09-Feb-2016 joshualitt <joshualitt@chromium.org> Create a thermal manager class and wire it in to nanobench behind a flag

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671573002

Review URL: https://codereview.chromium.org/1671573002
/external/skia/bench/nanobench.cpp
7a5ada8c429b99b6ea061d7ea710d3c8349502ac 08-Feb-2016 brianosman <brianosman@google.com> Support --dryRun in nanobench to get a list of benchmarks.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1681583002

Review URL: https://codereview.chromium.org/1681583002
/external/skia/bench/nanobench.cpp
8673714d75ff1020f78217ff8839f1e18c3591e4 03-Feb-2016 scroggo <scroggo@google.com> Treat bad values passed to --images as a fatal error

If an option is passed to --images that is either a non-existent path or
a folder with no images matching the supported types, assume this is
an error and exit, so they can supply a valid path instead.

Share code between DM and nanobench in SkCommonFlags.

nanobench now behaves more like DM - it will check a directory for
images that match the supported extensions.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1611323004

Review URL: https://codereview.chromium.org/1611323004
/external/skia/bench/nanobench.cpp
65dfd2fe5d93d63b655663707c7233917e293acc 03-Feb-2016 mtklein <mtklein@chromium.org> Add --benchType and --sourceType to nanobench.

To run only codec benches:
$ out/Release/nanobench --images <> --benchType skcodec

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666743002

Review URL: https://codereview.chromium.org/1666743002
/external/skia/bench/nanobench.cpp
ad38ed6003ad89a21e40d76987db4bba7d42f3d0 29-Jan-2016 scroggo <scroggo@google.com> Revert of Treat bad values passed to --images as a fatal error (patchset #17 id:320001 of https://codereview.chromium.org/1611323004/ )

Reason for revert:
Speculative to fix windows bots

Original issue's description:
> Treat bad values passed to --images as a fatal error
>
> If an option is passed to --images that is either a non-existent path or
> a folder with no images matching the supported types, assume this is
> an error and exit, so they can supply a valid path instead.
>
> Share code between DM and nanobench in SkCommonFlags.
>
> nanobench now behaves more like DM - it will check a directory for
> images that match the supported extensions.
>
> Only consider image paths ending in RAW suffixes as images if
> SK_CODE_DECODES_RAW is defined. This prevents us from seeing failure
> to decode errors on platforms that cannot decode it.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1611323004
>
> Committed: https://skia.googlesource.com/skia/+/7579786f3bd5a8fda84a1abc45b16213c3371f93

TBR=mtklein@google.com,borenet@google.com,msarett@google.com

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review URL: https://codereview.chromium.org/1653543002
/external/skia/bench/nanobench.cpp
f2b340fc885ad2a12d2d73974eff9c8f4c94192c 29-Jan-2016 djsollen <djsollen@google.com> Consolidate SK_CRASH and sk_throw into SK_ABORT

TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1648343003

Review URL: https://codereview.chromium.org/1648343003
/external/skia/bench/nanobench.cpp
817c72ad40bfbb42824010837c0bcc572a9eb9bc 28-Jan-2016 djsollen <djsollen@google.com> Fix broken Android framework builds
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1641173003

Review URL: https://codereview.chromium.org/1641173003
/external/skia/bench/nanobench.cpp
7579786f3bd5a8fda84a1abc45b16213c3371f93 28-Jan-2016 scroggo <scroggo@google.com> Treat bad values passed to --images as a fatal error

If an option is passed to --images that is either a non-existent path or
a folder with no images matching the supported types, assume this is
an error and exit, so they can supply a valid path instead.

Share code between DM and nanobench in SkCommonFlags.

nanobench now behaves more like DM - it will check a directory for
images that match the supported extensions.

Only consider image paths ending in RAW suffixes as images if
SK_CODE_DECODES_RAW is defined. This prevents us from seeing failure
to decode errors on platforms that cannot decode it.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1611323004

Review URL: https://codereview.chromium.org/1611323004
/external/skia/bench/nanobench.cpp
c47635e0ed52970fa40a16ffb280071e6b838a52 28-Jan-2016 svaisanen <svaisanen@nvidia.com> Adding support for parsing extended gpu config parameters in nanobench

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1603063005

Review URL: https://codereview.chromium.org/1603063005
/external/skia/bench/nanobench.cpp
0edf1693dfd8360f5b8256e0700c2240854c010f 27-Jan-2016 scroggo <scroggo@google.com> Stop testing SkImageDecoder in DM/nanobench

We have already used it for comparison, and are switching forward
to using SkCodec. This also allows us to simplify the code for checking
the extensions we support for images.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1641663002

Review URL: https://codereview.chromium.org/1641663002
/external/skia/bench/nanobench.cpp
8d61f0dd1b6fde5202a14dfafcc1bceccf0d74ad 25-Jan-2016 benjaminwagner <benjaminwagner@google.com> Add pre_log option to nanobench; make this option default true in nanobench_flags.py and dm_flags.py.

BUG=skia:4826
BUG=skia:4827
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1612483002

Review URL: https://codereview.chromium.org/1612483002
/external/skia/bench/nanobench.cpp
aa97a84404c7505738713a4c19b42347c7daef9e 22-Jan-2016 djsollen <djsollen@google.com> Revert of Consolidate SK_CRASH and sk_throw into SK_ABORT (patchset #5 id:80001 of https://codereview.chromium.org/1610823002/ )

Reason for revert:
Chrome is calling SK_CRASH

Original issue's description:
> Consolidate SK_CRASH and sk_throw into SK_ABORT
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1610823002
>
> Committed: https://skia.googlesource.com/skia/+/4c5cd7d527ed29aabfa72aa47b23a4496eeda357

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1620333002
/external/skia/bench/nanobench.cpp
4c5cd7d527ed29aabfa72aa47b23a4496eeda357 22-Jan-2016 djsollen <djsollen@google.com> Consolidate SK_CRASH and sk_throw into SK_ABORT
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1610823002

Review URL: https://codereview.chromium.org/1610823002
/external/skia/bench/nanobench.cpp
01836add2ab778ed085735fa8a206b54d5fc4f23 20-Jan-2016 joshualitt <joshualitt@chromium.org> Revert to old behavior for swap buffers

New behavior is preserved with 'syncOrSwap' call

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1606883005

Review URL: https://codereview.chromium.org/1606883005
/external/skia/bench/nanobench.cpp
5352015fa318fc6c25b789cb0a81d2d586d6121f 20-Jan-2016 mtklein <mtklein@chromium.org> Make nanobench --outResultsFile only work with Release builds.

It is very, very misleading to report performance numbers for Debug builds.
This makes it impossible for us to upload them to perf.skia.org.

BUG=skia:4828
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1606323002

Review URL: https://codereview.chromium.org/1606323002
/external/skia/bench/nanobench.cpp
e5cf2c6d940fa6a1d7c3016f631c734d3d29dec2 11-Jan-2016 mtklein <mtklein@chromium.org> Have nanobench report bench median sample time too.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577963002

Review URL: https://codereview.chromium.org/1577963002
/external/skia/bench/nanobench.cpp
6f0ff91c6561549a1ea8de3e8896b80a584c45b9 11-Jan-2016 mtklein <mtklein@chromium.org> apply --match to image file names too, like we do for .skps

This should make skipping an image much cheaper.

Before:
$ time out/Release/nanobench --images resources/ --match sdkjlfasjlfds
4.65 real 4.41 user 0.19 sys
$ time out/Release/nanobench --images resources/ --match sdkjlfasjlfds
0.05 real 0.03 user 0.01 sys

The effect should be much more dramatic when there are more images to skip (e.g. on the bots).
This cuts about 6 minutes off the Debug CQ trybot.

BUG=skia:4768
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577873002

Review URL: https://codereview.chromium.org/1577873002
/external/skia/bench/nanobench.cpp
c7796b93f02e736df967301d3c46cec46dd02d5c 07-Jan-2016 msarett <msarett@google.com> Make CodecBench test kPremul and kUnpremul

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568913002

Review URL: https://codereview.chromium.org/1568913002
/external/skia/bench/nanobench.cpp
38ce0a7fe93444aa9184f1492656ceefdd75e74b 07-Jan-2016 scroggo <scroggo@google.com> Add missing include for sleep

This fixes the AOSP mips build. Mirrors the same change needed in DM.cpp at crrev.com/1425843003

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568883002

Review URL: https://codereview.chromium.org/1568883002
/external/skia/bench/nanobench.cpp
3405800d7a5407365143eed93e300fd5896cacee 07-Jan-2016 kkinnunen <kkinnunen@nvidia.com> Make SkGLContext lifetime more well-defined

Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005

Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

Review URL: https://codereview.chromium.org/1511773005
/external/skia/bench/nanobench.cpp
54e2ca5a2338b6700fd4c147ad2f934c70ecac90 05-Jan-2016 jcgregorio <jcgregorio@google.com> Revert of Make SkGLContext lifetime more well-defined (patchset #7 id:120001 of https://codereview.chromium.org/1511773005/ )

Reason for revert:
Broke tests on Android, iOS, Mac and Windows.

Original issue's description:
> Make SkGLContext lifetime more well-defined
>
> Remove refcounting from SkGLContext.
>
> SkGLContext is expected to behave like GrContextFactory would own
> it, as implied by the GrContextFactory function.
>
> If it is refcounted, this does not hold.
>
> Also other use sites, such as in SkOSWindow_win (command buffer gl
> object), confirm the behavior. The object is explicitly owned and
> destroyed, not shared.
>
> Also fixes potential crashes from using GL context of an abandoned
> context.
>
> Also fixes potential crashes in DM/nanobench, if the GrContext lives
> longer than GLContext through internal refing of GrContext.
>
> Moves the non-trivial implementations from GrContextFactory.h to
> .cpp, just for consistency sake.
>
> Changes pathops_unittest.gyp. The pathops_unittest uses
> GrContextFactory, but did not link to its implementation. The reason
> they worked was that the implementation used (constructors, destructors)
> happened to be in the .h file.
>
> This works towards being able to use command buffer and NVPR from
> the SampleApp.
>
> BUG=skia:2992
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005
>
> Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

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

Review URL: https://codereview.chromium.org/1555053003
/external/skia/bench/nanobench.cpp
830e012187f951d49d7e46e196ac8d1e653a25da 05-Jan-2016 kkinnunen <kkinnunen@nvidia.com> Make SkGLContext lifetime more well-defined

Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

BUG=skia:2992
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005

Review URL: https://codereview.chromium.org/1511773005
/external/skia/bench/nanobench.cpp
c149f0e36e0ca0ff35ec6e2f79419b58d529db40 04-Jan-2016 msarett <msarett@google.com> On Valgrind bots, print a message every 20 minutes

I believe that the timeout failure on the Valgrind bot occurs
because we skip many tests consecutively without printing any
output. Skipping these tests requires non-trivial work.

Printing a message every 20 minutes will avoid timeouts.

BUG=skia:4740
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1554193002

Review URL: https://codereview.chromium.org/1554193002
/external/skia/bench/nanobench.cpp
3e980c3d88fbc509b79e7ccef16ca38f5bbfb180 23-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.

Extended form: 'backend(option=value,...)'

Possible backends and options:

gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.

Predefined configs:

gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

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

Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

Review URL: https://codereview.chromium.org/1490113005
/external/skia/bench/nanobench.cpp
0f515bd4284ee6e88cd04c62cb6c67e1f23db616 22-Dec-2015 rmistry <rmistry@google.com> Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #21 id:400001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
The Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug builder fails after this CL.

Links to specific builds:
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1689
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1690
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1691

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
> --config: type: string default: 565 8888 gpu nonrendering
> Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
> nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
> xps or use extended form 'backend(option=value,...)'.
>
> Extended form: 'backend(option=value,...)'
>
> Possible backends and options:
>
> gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
> api type: string default: native.
> Select graphics API to use with gpu backend.
> Options:
> native Use platform default OpenGL or OpenGL ES backend.
> gl Use OpenGL.
> gles Use OpenGL ES.
> debug Use debug OpenGL.
> null Use null OpenGL.
> dit type: bool default: false.
> Use device independent text.
> nvpr type: bool default: false.
> Use NV_path_rendering OpenGL and OpenGL ES extension.
> samples type: int default: 0.
> Use multisampling with N samples.
>
> Predefined configs:
>
> gpu = gpu()
> msaa4 = gpu(samples=4)
> msaa16 = gpu(samples=16)
> nvprmsaa4 = gpu(nvpr=true,samples=4)
> nvprmsaa16 = gpu(nvpr=true,samples=16)
> gpudft = gpu(dit=true)
> gpudebug = gpu(api=debug)
> gpunull = gpu(api=null)
> debug = gpu(api=debug)
> nullgpu = gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
>
> Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

TBR=mtklein@google.com,bsalomon@google.com,joshualitt@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1548683002
/external/skia/bench/nanobench.cpp
9ebc3f0ee6db215dde461dc4777d85988cf272dd 22-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.

Extended form: 'backend(option=value,...)'

Possible backends and options:

gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.

Predefined configs:

gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

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

Review URL: https://codereview.chromium.org/1490113005
/external/skia/bench/nanobench.cpp
4dabf83cbe3096eaa7b80c101ba0e9c277b560d2 18-Dec-2015 joshualitt <joshualitt@google.com> Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #18 id:340001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
This CL changed 1200 images on gold, when I wouldn't expect any diffs from the description.

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
> --config: type: string default: 565 8888 gpu nonrendering
> Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
> nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
> xps or use extended form 'backend(option=value,...)'.
>
> Extended form: 'backend(option=value,...)'
>
> Possible backends and options:
>
> gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
> api type: string default: native.
> Select graphics API to use with gpu backend.
> Options:
> native Use platform default OpenGL or OpenGL ES backend.
> gl Use OpenGL.
> gles Use OpenGL ES.
> debug Use debug OpenGL.
> null Use null OpenGL.
> dit type: bool default: false.
> Use device independent text.
> nvpr type: bool default: false.
> Use NV_path_rendering OpenGL and OpenGL ES extension.
> samples type: int default: 0.
> Use multisampling with N samples.
>
> Predefined configs:
>
> gpu = gpu()
> msaa4 = gpu(samples=4)
> msaa16 = gpu(samples=16)
> nvprmsaa4 = gpu(nvpr=true,samples=4)
> nvprmsaa16 = gpu(nvpr=true,samples=16)
> gpudft = gpu(dit=true)
> gpudebug = gpu(api=debug)
> gpunull = gpu(api=null)
> debug = gpu(api=debug)
> nullgpu = gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

TBR=mtklein@google.com,bsalomon@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1536963002
/external/skia/bench/nanobench.cpp
c8b4336444e7b90382e04e33665fb3b8490b825b 18-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.

Extended form: 'backend(option=value,...)'

Possible backends and options:

gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.

Predefined configs:

gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Review URL: https://codereview.chromium.org/1490113005
/external/skia/bench/nanobench.cpp
789fd996599fc7fc29963ed2db9e4b7427973be9 16-Dec-2015 scroggo <scroggo@google.com> Remove Subset*Benches

These were originally used to compare to the old implementation of
subset decoding in SkImageDecoder. The old implementation has been
removed, and they do not provide useful information that is not
covered by the BitmapRegionDecoderBenches.

This will greatly speed up some of our infra bots, which spend a lot of
time decoding interlaced PNGs repeatedly (thanks to
SubsetTranslateBench).

BUG=skia:4715
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1531833002

Review URL: https://codereview.chromium.org/1531833002
/external/skia/bench/nanobench.cpp
4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee 14-Dec-2015 reed <reed@google.com> Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #12 id:220001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
speculative revert to see if it unblocks the DEPS roll

https://codereview.chromium.org/1529443002

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
> --config: type: string default: 565 8888 gpu nonrendering
> Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
> nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
> xps or use extended form 'backend(option=value,...)'.
>
> Extended form: 'backend(option=value,...)'
>
> Possible backends and options:
>
> gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
> api type: string default: native.
> Select graphics API to use with gpu backend.
> Options:
> native Use platform default OpenGL or OpenGL ES backend.
> gl Use OpenGL.
> gles Use OpenGL ES.
> debug Use debug OpenGL.
> null Use null OpenGL.
> dit type: bool default: false.
> Use device independent text.
> nvpr type: bool default: false.
> Use NV_path_rendering OpenGL and OpenGL ES extension.
> samples type: int default: 0.
> Use multisampling with N samples.
>
> Predefined configs:
>
> gpu = gpu()
> msaa4 = gpu(samples=4)
> msaa16 = gpu(samples=16)
> nvprmsaa4 = gpu(nvpr=true,samples=4)
> nvprmsaa16 = gpu(nvpr=true,samples=16)
> gpudft = gpu(dit=true)
> gpudebug = gpu(api=debug)
> gpunull = gpu(api=null)
> debug = gpu(api=debug)
> nullgpu = gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23

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

Review URL: https://codereview.chromium.org/1528473002
/external/skia/bench/nanobench.cpp
e13ca329fca4c28cf4e078561f591ab27b743d23 14-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.

Extended form: 'backend(option=value,...)'

Possible backends and options:

gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.

Predefined configs:

gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)

BUG=skia:2992

Review URL: https://codereview.chromium.org/1490113005
/external/skia/bench/nanobench.cpp
5219fd9ff7aa6ebf64c905ad40f5e0027a39962b 10-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Make NVPR a GL context option instead of a GL context

Make NVPR a GL context option instead of a GL context.
This may enable NVPR to be run with command buffer
interface.

No functionality change in DM or nanobench. NVPR can
only be run with normal GL APIs.

BUG=skia:2992

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

Committed: https://skia.googlesource.com/skia/+/64492c43c3faee7ab0f69b1c84e0267616f85e52

Review URL: https://codereview.chromium.org/1448883002
/external/skia/bench/nanobench.cpp
9d66696f6b1651b52adad1b0202aca013ef7da58 09-Dec-2015 borenet <borenet@google.com> Revert of Make NVPR a GL context option instead of a GL context (patchset #9 id:160001 of https://codereview.chromium.org/1448883002/ )

Reason for revert:
"Could not create surface" on Linux GTX660 bots

Original issue's description:
> Make NVPR a GL context option instead of a GL context
>
> Make NVPR a GL context option instead of a GL context.
> This may enable NVPR to be run with command buffer
> interface.
>
> No functionality change in DM or nanobench. NVPR can
> only be run with normal GL APIs.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1
>
> Committed: https://skia.googlesource.com/skia/+/64492c43c3faee7ab0f69b1c84e0267616f85e52

TBR=mtklein@google.com,bsalomon@google.com,jvanverth@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1513703002
/external/skia/bench/nanobench.cpp
64492c43c3faee7ab0f69b1c84e0267616f85e52 08-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Make NVPR a GL context option instead of a GL context

Make NVPR a GL context option instead of a GL context.
This may enable NVPR to be run with command buffer
interface.

No functionality change in DM or nanobench. NVPR can
only be run with normal GL APIs.

BUG=skia:2992

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

Review URL: https://codereview.chromium.org/1448883002
/external/skia/bench/nanobench.cpp
66cfcffd5d0a430f00bf0e36bedb088a25957183 04-Dec-2015 mtklein <mtklein@chromium.org> simplify nanobench --quiet / -q output

This tries to cut things down to the very minimum you might want to know:

$ out/Release/nanobench --match nytimes --config 8888 gpu -q
Timer overhead: 29.6ns
! -> high variance, ? -> moderate variance
micros bench
2479.05 ! desk_nytimes.skp_1_mpd 8888
1313.92 desk_nytimes.skp_1_mpd gpu
3617.65 desk_nytimes.skp_1 8888
1158.34 desk_nytimes.skp_1 gpu
1368.99 ! keymobi_nytimes_com_.skp_1_mpd 8888
393.40 keymobi_nytimes_com_.skp_1_mpd gpu
1179.68 ! keymobi_nytimes_com_.skp_1 8888
342.74 keymobi_nytimes_com_.skp_1 gpu

All times are printed in microseconds, and high variance runs are marked.

BUG=skia:

Review URL: https://codereview.chromium.org/1493313003
/external/skia/bench/nanobench.cpp
e45c81c8f3bb62e45f2ff3b8772b4b23f1ddc6ca 02-Dec-2015 joshualitt <joshualitt@chromium.org> Began logging more gpu stats from nanobench

BUG=skia:

Review URL: https://codereview.chromium.org/1489033004
/external/skia/bench/nanobench.cpp
9323dc6a72de301f23e1187adc2365395b4b23d8 01-Dec-2015 scroggo <scroggo@google.com> Revert of Fix Android framework build (patchset #1 id:1 of https://codereview.chromium.org/1491563003/ )

Reason for revert:
eeebdb538d476c1bfc8b63a946094ca1b505ecd1 was reverted, so this one needs to be reverted, too

Original issue's description:
> Fix Android framework build
>
> eeebdb538d476c1bfc8b63a946094ca1b505ecd1 did not update a Config that
> only builds if SK_BUILD_FOR_ANDROID_FRAMEWORK. This appears to be the
> necessary parameter that is missing.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/cb6cb21cd9d27054810d2c80ef534dcddd615d4b

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

Review URL: https://codereview.chromium.org/1487033002
/external/skia/bench/nanobench.cpp
a0a024e323ebf73ea4559d4b29f937902703828b 01-Dec-2015 bsalomon <bsalomon@google.com> Revert of Make NVPR a GL context option instead of a GL context (patchset #2 id:20001 of https://codereview.chromium.org/1448883002/ )

Reason for revert:
BUG=skia:4609

skbug.com/4609

Seems like GrContextFactory needs to fail when the NVPR option is requested but the driver version isn't sufficiently high.

Original issue's description:
> Make NVPR a GL context option instead of a GL context
>
> Make NVPR a GL context option instead of a GL context.
> This may enable NVPR to be run with command buffer
> interface.
>
> No functionality change in DM or nanobench. NVPR can
> only be run with normal GL APIs.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1

TBR=mtklein@google.com,jvanverth@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1486153002
/external/skia/bench/nanobench.cpp
cb6cb21cd9d27054810d2c80ef534dcddd615d4b 01-Dec-2015 scroggo <scroggo@google.com> Fix Android framework build

eeebdb538d476c1bfc8b63a946094ca1b505ecd1 did not update a Config that
only builds if SK_BUILD_FOR_ANDROID_FRAMEWORK. This appears to be the
necessary parameter that is missing.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1491563003
/external/skia/bench/nanobench.cpp
eeebdb538d476c1bfc8b63a946094ca1b505ecd1 01-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Make NVPR a GL context option instead of a GL context

Make NVPR a GL context option instead of a GL context.
This may enable NVPR to be run with command buffer
interface.

No functionality change in DM or nanobench. NVPR can
only be run with normal GL APIs.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1448883002
/external/skia/bench/nanobench.cpp
5931922997b8904b1243240120014c016064b9fa 23-Nov-2015 kkinnunen <kkinnunen@nvidia.com> Remove GrContextFactory::getGLContext

Remove GrContextFactory::getGLContext, it is problematic:

It has the bug of not checking for the context type.

It also is error-prone, since the GL context is not made
current, but it is callers may assume it is current.

It is also not used very much.

Clients can use GrContextFactory::getContextInfo.

BUG=skia:

Review URL: https://codereview.chromium.org/1455093003
/external/skia/bench/nanobench.cpp
0459c9425f567b6d11ca534fb13a05de9f37b7ee 10-Nov-2015 msarett <msarett@google.com> Delete dead subset benches from nanobench

This approach to subset decoding is no longer supported.
We have replaced it with an implementation that does not
depend on forked libraries.
https://codereview.chromium.org/1406153015/

BUG=skia:

Review URL: https://codereview.chromium.org/1430493005
/external/skia/bench/nanobench.cpp
6950de6c4166fabb35e6c756fc009e0cf1c47819 07-Nov-2015 halcanary <halcanary@google.com> Comments Style: s/skbug.com/bug.skia.org/
DOCS_PREVIEW= https://skia.org/?cl=1432503003

Review URL: https://codereview.chromium.org/1432503003
/external/skia/bench/nanobench.cpp
5cb4885b4cd1ac5eb3fc92dac5f5509d7c810464 06-Nov-2015 msarett <msarett@google.com> Rename SkBitmapRegionDecoder and Create function

We no longer need to worry about namespace
conflicts SkBitmapRegionDecoder in Android (which
we are replacing).

Additionally, the static Create() function does not
need to repeat the name BitmapRegionDecoder.

BUG=skia:

Review URL: https://codereview.chromium.org/1415243007
/external/skia/bench/nanobench.cpp
501b7344f116ccc821d437d324aa7883d7ce97bf 03-Nov-2015 scroggo <scroggo@chromium.org> Combine native sampling with sampling

In SkSampledCodec, allow the native codec to do its scaling first, then
sample on top of that. Since the only codec which can do native scaling
is JPEG, and we know what it can do, hard-code for JPEG. Check to see
if the sampleSize is something JPEG supports, or a multiple of
something it supports. If so, use JPEG directly or combine them.

BUG=skia:4320

Review URL: https://codereview.chromium.org/1417583009
/external/skia/bench/nanobench.cpp
bbba16878f343b232d844281fbdf056c00e20fb6 28-Oct-2015 mtklein <mtklein@chromium.org> nanobench: fix and simplify --samplingTime

Recent changes to WallTimer broke --samplingTime. In particular, this idiom became nonsensical:
WallTimer timer;
timer.start();
do {
...
timer.end();
} while(timer.fWall < ...);

WallTimer started making private use of fWall between when start() and end() were called, so the second time around the loop we end up with nonsense.

If that makes no sense, don't worry. The code here using now_ms() is just as fast, just as precise, and clearer.

I took the opportunity to simplify --samplingTime <complicated string parsing> to --ms <int>, and to simplify the code that depends on it.

BUG=skia:

Review URL: https://codereview.chromium.org/1419103004
/external/skia/bench/nanobench.cpp
35e5d1b4495478ca3bede66914ae07f50a447c4d 27-Oct-2015 msarett <msarett@google.com> Refactor SkBitmapRegionDecoderInterface for Android

The result SkBitmap, the pixel allocator, and the alpha
preference need to be communicated from the client to
the region decoder.

BUG=skia:

Review URL: https://codereview.chromium.org/1418093006
/external/skia/bench/nanobench.cpp
26ad17b8f872fc8bc18df7f49067edbd8b9799e8 22-Oct-2015 msarett <msarett@google.com> Implementation of SkBitmapRegionDecoder using SkAndroidCodec

Includes testing in DM and nanobench

BUG=skia:

Review URL: https://codereview.chromium.org/1402863002
/external/skia/bench/nanobench.cpp
74deb981d5e9c11c88fe431e78166d6cf8dacc1a 21-Oct-2015 msarett <msarett@google.com> Valgrind experiment

I don't really expect this to fix the errors, but I think
it's worth it to try shaking up the valgrind bot overnight.
There's some strange behavior with regard to color type on
the valgrind bot that I can't reproduce and that we aren't
seeing on any of the other bots.

TBR=mtklein,scroggo

BUG=skia:

Review URL: https://codereview.chromium.org/1418723002
/external/skia/bench/nanobench.cpp
4dfdbb19ba861bbd5e1a306bb23f32464ea5e2c5 20-Oct-2015 mtklein <mtklein@chromium.org> nanobench: Add some Valgrind failure paranoia.

Trying to figure out

http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind/builds/586/steps/nanobench/logs/stdio

BUG=skia:4482

Review URL: https://codereview.chromium.org/1418633002
/external/skia/bench/nanobench.cpp
860e8a67190e024b7375e52e270e6bd0a17af86e 15-Oct-2015 scroggo <scroggo@google.com> Renable image benchmarking

- Remove --images '' to renable image benchmarking
- Add a flag to disable testing JPEG's buildTileIndex, since it also leaks memory
- Do not run images on GPU
- Do not run large interlaced images on 32 bit bots
- When buildTileIndex is not being used in the subset benches, do not use it for BRD

BUG=skia:3418
BUG=skia:4469
BUG=skia:4471
BUG=skia:4360

Review URL: https://codereview.chromium.org/1396113002
/external/skia/bench/nanobench.cpp
fd2b067b9e6a8cc93581a61c67bb8ce3c626f60f 14-Oct-2015 scroggo <scroggo@google.com> Remove unnecessary allocation in nanobench

Review URL: https://codereview.chromium.org/1408593002
/external/skia/bench/nanobench.cpp
2da1a854b0836001533aa29ade89d87f420cbbc3 13-Oct-2015 scroggo <scroggo@google.com> Stop benching PNG buildTileIndex by default

It leaks memory and kills the bots. Supply an option to run it for
local comparison.

BUG=skia:4360
BUG=skia:3418

Review URL: https://codereview.chromium.org/1396613007
/external/skia/bench/nanobench.cpp
ab12c2715886e7f04c415028a7db49fb0b1e67f3 08-Oct-2015 scroggo <scroggo@google.com> Update Subset benches to support interlacing and fix bugs

Instead of decoding one line at a time, if the ScanlineOrder is kNone,
decode all of the lines in one pass, and then copy the subset into the
output. This will allow us to more realistically test subset decodes
for interlaced png. It also makes running them not take forever.

Do *not* support other modes (besides kTopDown), since they are not
used by the big three we need to replace BitmapRegionDecoder
implementation (skbug.com/4428).

Fix a bug in SubsetTranslateBench and SubsetZoomBench:
When we decode another subset, we need to reset the scanline decode
first. This bug appears to have been present since the introduction of
these tests in crrev.com/1160953002

BUG=skia:4205
BUG=skia:3418

Review URL: https://codereview.chromium.org/1387233002
/external/skia/bench/nanobench.cpp
303fa350125f372bbfc29bec1235885493dab9b4 05-Oct-2015 scroggo <scroggo@google.com> Specify bench_type & source_type for image benches

This will allow us to use perf filtering for comparing SkImageDecoder
to SkCodec.

BUG=skia:3418

Review URL: https://codereview.chromium.org/1387863002
/external/skia/bench/nanobench.cpp
a1ebeb25e9acfcd801e089e063311d716b83b8a5 01-Oct-2015 mtklein <mtklein@chromium.org> Remove const from `const int loops`.

This drives me nuts, and prevents `while (loops --> 0)`.

BUG=skia:

Review URL: https://codereview.chromium.org/1379923005
/external/skia/bench/nanobench.cpp
8a6697af95b340aad6dee7e6228048fa305c1e59 30-Sep-2015 joshualitt <joshualitt@chromium.org> Fix for nexus 5 crashing in GL benches

GLBenches do not expect gl state to change between onPerCanvasPreDraw and *PostDraw, but we do a clear and sometimes we clear as draw. This causes us to bind vertex objects / programs / etc.

This change creates two new virtual methods which are called right before and immediately after timing.

BUG=skia:

Review URL: https://codereview.chromium.org/1379853003
/external/skia/bench/nanobench.cpp
46c574725676b26ada63ac15e42cda309dcd5090 30-Sep-2015 scroggo <scroggo@google.com> Merge SkCodec with SkScanlineDecoder

Benefits:
- This mimics other decoding APIs (including the ones SkCodec relies
on, e.g. a png_struct, which can be used to decode an entire image or
one line at a time).

- It allows a client to ask us to do what we can do efficiently - i.e.
start from encoded data and either decode the whole thing or scanlines.

- It removes the duplicate methods which appeared in both SkCodec and
SkScanlineDecoder (some of which, e.g. in SkJpegScanlineDecoder, just
call fCodec->sameMethod()).

- It simplifies moving more checks into the base class (e.g. the
examples in skbug.com/4284).

BUG=skia:4175
BUG=skia:4284

=====================================================================

SkScanlineDecoder.h/.cpp:
Removed.

SkCodec.h/.cpp:
Add methods, enums, and variables which were previously in
SkScanlineDecoder.
Default fCurrScanline to -1, as a sentinel that start has not been
called.

General changes:
Convert SkScanlineDecoders to SkCodecs.

General changes in SkCodec subclasses:
Merge SkScanlineDecoder implementation into SkCodec. Most (all?) owned
an SkCodec, so they now call this-> instead of fCodec->.

SkBmpCodec.h/.cpp:
Replace the unused rowOrder method with an override for
onGetScanlineOrder.
Make getDstRow const, since it is called by onGetY, which is const.

SkCodec_libpng.h/.cpp:
Make SkPngCodec an abstract class, with two subclasses which handle
scanline decoding separately (they share code for decoding the entire
image). Reimplement onReallyHasAlpha so that it can return the most
recent result (e.g. after a scanline decode which only decoded part
of the image) or a better answer (e.g. if the whole image is known to
be opaque).
Compute fNumberPasses early, so we know which subclass to instantiate.
Make SkPngInterlaceScanlineDecoder use the base class' fCurrScanline
rather than a separate variable.

CodexTest.cpp:
Add tests for the state changes in SkCodec (need to call start before
decoding scanlines; calling getPixels means that start will need to
be called again before decoding more scanlines).
Add a test which decodes in stripes, currently only used for an
interlaced PNG.

TODO: Add tests for onReallyHasAlpha.

Review URL: https://codereview.chromium.org/1365313002
/external/skia/bench/nanobench.cpp
7f69144aaabbedf51ad2a1feddc9e0689f2c5ee9 22-Sep-2015 msarett <msarett@google.com> Add nanobench tests for BitmapRegionDecoder

SkBitmapRegionDecoderInterface provides an interface
for multiple implementations of Android's
BitmapRegionDecoder.

We already have correctness tests in DM that will enable us
to compare the quality of our various BRD implementations.

We also need these performance tests to compare the speed
of our various implementations.

BUG=skia:4357

Review URL: https://codereview.chromium.org/1344993003
/external/skia/bench/nanobench.cpp
eddbefb4a5794b1d9f4e58a7cdf4e768b837c17f 11-Sep-2015 hendrikw <hendrikw@chromium.org> skia: Add ANGLE with GL backend to nanobench/DM

This will allow us to test this without hacking it in, might be useful
for others too.

Review URL: https://codereview.chromium.org/1338003002
/external/skia/bench/nanobench.cpp
afcd7cd32497cc79035e61fd64b0baa03ed04bcc 31-Aug-2015 bsalomon <bsalomon@google.com> Rename flag from "distance field" to "device independent."

Review URL: https://codereview.chromium.org/1322433006
/external/skia/bench/nanobench.cpp
885bf0925514b9dfe3365bab227d36897d866b5d 27-Aug-2015 hendrikw <hendrikw@chromium.org> skia: add ability to load command_buffer_gles2

BUG=skia:

Review URL: https://codereview.chromium.org/1306823003
/external/skia/bench/nanobench.cpp
96fcdcc219d2a0d3579719b84b28bede76efba64 27-Aug-2015 halcanary <halcanary@google.com> Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
/external/skia/bench/nanobench.cpp
385fe4d4b62d7d1dd76116dd570df3290a2f487b 26-Aug-2015 halcanary <halcanary@google.com> Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
/external/skia/bench/nanobench.cpp
60e0fee6d4acff638ccc9670c4055aced529a7a0 26-Aug-2015 bungeman <bungeman@google.com> Remove include of stdlib.h from SkTypes.h.

Unfortunately, immintrin.h (which is also included by SkTypes)
includes xmmintrin.h which includes mm_malloc.h which includes
stdlib.h for malloc even though, from the implementation, it is
difficult to see why.

Fortunately, arm_neon.h does not seem to be involved in such
shenanigans, so building for Android will keep things sane.

TBR=reed@google.com
Doesn't change Skia API, just moves an include.

Review URL: https://codereview.chromium.org/1313203003
/external/skia/bench/nanobench.cpp
1c005e4a38e29d648ecebada25d3a718155043a3 04-Aug-2015 scroggo <scroggo@chromium.org> Create a scanline decoder without creating a codec

Prior to this CL, if a client wanted to decode scanlines, they had to
create an SkCodec in order to get an SkScanlineDecoder. This introduces
complications if input data is not easily shared between the two
objects.

Instead, add methods to SkScanlineDecoder for creating a new one from
input data, and remove the creation functions from SkCodec.

Update DM and tests.

Review URL: https://codereview.chromium.org/1267583002
/external/skia/bench/nanobench.cpp
9b2cdbf4811477487f107a78edc130c733b309ea 10-Jul-2015 scroggo <scroggo@chromium.org> Allow creating multiple scanline decoders.

Make getScanlineDecoder return a new object each time, which is
owned by the caller, and independent from any existing scanline
decoders and the SkCodec itself.

Since the SkCodec already contains the entire state machine, and it
is used by the scanline decoders, simply create a new SkCodec which
is now owned by the scanline decoder.

Move code that cleans up after using a scanline decoder into its
destructor

One side effect is that creating the first scanline decoder requires
a duplication of the stream and re-reading the header. (With some
more complexity/changes, we could pass the state machine to the
scanline decoder and make the SkCodec recreate its own state machine
instead.) The typical client of the scanline decoder (region decoder)
uses an SkMemoryStream, so the duplication is cheap, although we
should consider the extra time to reread the header/recreate the state
machine. (If/when we use the scanline decoder for other purposes,
where the stream may not be cheaply duplicated, we should consider
passing the state machine.)

One (intended) result of this change is that a client can create a
new scanline decoder in a new thread, and decode different pieces of
the image simultaneously.

In SkPngCodec::decodePalette, use fBitDepth rather than a parameter.

Review URL: https://codereview.chromium.org/1230033004
/external/skia/bench/nanobench.cpp
cc29d26f5742449eb2a2bafa7bbb6ec5ee701aef 09-Jul-2015 mtklein <mtklein@chromium.org> Have nanobench pay attention to --threads.

TBR=

BUG=skia:

Review URL: https://codereview.chromium.org/1229953002
/external/skia/bench/nanobench.cpp
eb602a5c94078fb2956c9bdc64bbf47a31b9c0e5 09-Jul-2015 scroggo <scroggo@chromium.org> SkCodec no longer inherits from SkImageGenerator.

SkImageGenerator makes some assumptions that are not necessarily valid
for SkCodec. For example, SkCodec does not assume that it can always be
rewound.

We also have an ongoing question of what an SkCodec should report as
its default settings (i.e. the return from getInfo). It makes sense for
an SkCodec to report that its pixels are unpremultiplied, if that is
the case for the underlying data, but if a client of SkImageGenerator
uses the default settings (as many do), they will receive
unpremultiplied pixels which cannot (currently) be drawn with Skia. We
may ultimately decide to revisit SkCodec reporting an SkImageInfo, but
I have left it unchanged for now.

Import features of SkImageGenerator used by SkCodec into SkCodec.

I have left SkImageGenerator unchanged for now, but it no longer needs
Result or Options. This will require changes to Chromium.

Manually handle the lifetime of fScanlineDecoder, so SkScanlineDecoder.h
can include SkCodec.h (where Result is), and SkCodec.h does not need
to include it (to delete fScanlineDecoder).

In many places, make the following simple changes:
- Now include SkScanlineDecoder.h, which is no longer included by
SkCodec.h
- Use the enums in SkCodec, rather than SkImageGenerator
- Stop including SkImageGenerator.h where no longer needed

Review URL: https://codereview.chromium.org/1220733013
/external/skia/bench/nanobench.cpp
63a82855b1f0b83952b65fca330954c50ebe7a4b 29-Jun-2015 cdalton <cdalton@nvidia.com> Make nanobench zoom animation time based

BUG=skia:

Review URL: https://codereview.chromium.org/1211253003
/external/skia/bench/nanobench.cpp
2c56ba5cde25a5cdbeca2afd660b497b428e8f07 26-Jun-2015 cdalton <cdalton@nvidia.com> Don't suppress nanobench output table in verbose mode

Changes verbose mode to print both the table and the individual sample
values. No need to hold back information in verbose mode.

BUG=skia:

Review URL: https://codereview.chromium.org/1208763003
/external/skia/bench/nanobench.cpp
3bf9206ada256277a39988c263f0379d544fc27b 26-Jun-2015 egdaniel <egdaniel@google.com> Fix nanobench to reset gl/gr context after every config run.

BUG=skia:

Review URL: https://codereview.chromium.org/1214703002
/external/skia/bench/nanobench.cpp
e1b8958877a512bf83cbc2c72bb31e7d71b06f43 26-Jun-2015 cdalton <cdalton@nvidia.com> Add samplingTime mode to nanobench

Adds a nanobench mode that takes samples for a fixed amount of time,
rather than taking a fixed amount of samples.

BUG=skia:

Review URL: https://codereview.chromium.org/1204153002
/external/skia/bench/nanobench.cpp
b4022965a280dd1ed64d6103dd29e2189abe6e00 25-Jun-2015 cdalton <cdalton@nvidia.com> Add loopSKP flag to nanobench

Adds a loopSKP flag that forces SKPBenches to draw with only 1 loop.

BUG=skia:

Review URL: https://codereview.chromium.org/1203193002
/external/skia/bench/nanobench.cpp
d416a5b10ff9e6d4f55a1f5b0419722132d68ff3 23-Jun-2015 cdalton <cdalton@nvidia.com> Implement SkGLContext swapBuffers with fence syncs

Improves the GPU measuring accuracy of nanobench by using fence syncs.
Fence syncs are very widely supported and available on almost every
platform.

NO_MERGE_BUILDS
BUG=skia:

Review URL: https://codereview.chromium.org/1194783003
/external/skia/bench/nanobench.cpp
ab80e35fbddd5b534b486cf9d331b5da00e5aa4f 17-Jun-2015 msarett <msarett@google.com> Improved subset benchmarks

I think these changes to the subset benchmarks cover what we discussed yesterday.

I removed the divisor benchmarks (2x2, 3x3) and changed the single subset benchmarks.

Also, we will no longer benchmark subset decodes on small images.

BUG=skia:

Review URL: https://codereview.chromium.org/1188223002
/external/skia/bench/nanobench.cpp
c751ecb3681072fda53dd3cebeb2eb41fc73b314 15-Jun-2015 mtklein <mtklein@chromium.org> When --mpd is true, run _mpd variants first, then non-mpd.

This makes it easier to benchmark _mpd variants in a profiler.

E.g.,

<profiler> out/Release/nanobench --images --config 8888 --loops -1 --match sp_desk_nytimes

BUG=skia:

Review URL: https://codereview.chromium.org/1184673006
/external/skia/bench/nanobench.cpp
b23e6aa6767816ac4bc6c191e78ef62d6e765671 09-Jun-2015 msarett <msarett@google.com> Subset decoding benchmarks

It was my goal to create benchmarks that could measure all
of the use cases that we have identified. I think single
subsets, translating, and scaling are the important ones.

It might be a good idea to discuss the document in greater
detail as well. I just wanted to share this to aid the
discussion.
https://docs.google.com/a/google.com/document/d/1OxW96GDMAlw6dnzNXmiNX-F9oDBBlGXzSsgd0DMIkbI/edit?usp=sharing

BUG=skia:

Review URL: https://codereview.chromium.org/1160953002
/external/skia/bench/nanobench.cpp
762286309545c8a1e4bbc05dcd1fe3085d2a1f47 29-May-2015 bsalomon <bsalomon@google.com> Add direct getter for GrCaps to GrContext.

TBR=joshualitt@google.com

Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99

Review URL: https://codereview.chromium.org/1149773005
/external/skia/bench/nanobench.cpp
084d1b61bca3b9e246cdf26377c373744ab6411c 28-May-2015 bsalomon <bsalomon@google.com> Revert of Add direct getter for GrCaps to GrContext. (patchset #4 id:60001 of https://codereview.chromium.org/1149773005/)

Reason for revert:
Breaking

Original issue's description:
> Add direct getter for GrCaps to GrContext.
>
> TBR=joshualitt@google.com
>
> Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99

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

Review URL: https://codereview.chromium.org/1164443002
/external/skia/bench/nanobench.cpp
9138c46e572085870638b6f7ad7fcdfcdf3cac99 28-May-2015 bsalomon <bsalomon@google.com> Add direct getter for GrCaps to GrContext.

TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1149773005
/external/skia/bench/nanobench.cpp
682c269a1511200322916af83053e26004c0ec40 22-May-2015 bsalomon <bsalomon@google.com> Store context options on caps.

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

Review URL: https://codereview.chromium.org/1158433006
/external/skia/bench/nanobench.cpp
08bf86d1b7b03cc6829f2488d9adcb0502e84b97 22-May-2015 bsalomon <bsalomon@google.com> Revert of Store context options on caps. (patchset #3 id:40001 of https://codereview.chromium.org/1158433006/)

Reason for revert:
breaking chromeos build (???)

Original issue's description:
> Store context options on caps.
>
> Committed: https://skia.googlesource.com/skia/+/f28cff71db2cbb1ff18a8fbf1e80ca761d1f69bc

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

Review URL: https://codereview.chromium.org/1151603005
/external/skia/bench/nanobench.cpp
f28cff71db2cbb1ff18a8fbf1e80ca761d1f69bc 22-May-2015 bsalomon <bsalomon@google.com> Store context options on caps.

Review URL: https://codereview.chromium.org/1158433006
/external/skia/bench/nanobench.cpp
d75c466ef57ef4dbdf96390b2c01121e4de36f23 30-Apr-2015 mtklein <mtklein@chromium.org> DM+nanobench: print both current and max RSS.

out/Debug/dm:
( 360/380 MB 2112) 396ms gpu gm xfermodes

out/Release/nanobench:
32/33 MB 1659 2.46µs 2.55µs 2.54µs 2.67µs 2% ▄▄▄▅▅▃▂▁▂█ gpu gradient_conicalZero_clamp_hicolor

out/Debug/nanobench:
42/42 MB desk_css3gradients.skp_1 8888

BUG=skia:

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1115203002
/external/skia/bench/nanobench.cpp
261c3ad7fde95748da92550735decc949dc73bf2 27-Apr-2015 joshualitt <joshualitt@chromium.org> Change to add zoom animations to nanobench

BUG=skia:

Review URL: https://codereview.chromium.org/1061323003
/external/skia/bench/nanobench.cpp
9d9725c892743cf8fc66ea6cdd5ce21fe2df6d14 24-Apr-2015 msarett <msarett@google.com> Do not crash nanobench in debug mode

Instead print an error message

BUG=skia:

Review URL: https://codereview.chromium.org/1102083002
/external/skia/bench/nanobench.cpp
21027994192f395bbd1507558b84f59b3c7cf0da 02-Apr-2015 scroggo <scroggo@google.com> Test SkCodec to kIndex8 in nanobench.

BUG=skia:3257
BUG=skia:3475

Review URL: https://codereview.chromium.org/1051973002
/external/skia/bench/nanobench.cpp
081a8a4f843508484c8915860effc4aa9c3b8fcc 01-Apr-2015 scroggo <scroggo@google.com> nanobench does not need to handle failed rewind.

Now that all SkCodecs can rewind (assuming the stream is rewindable),
we do not need to special case it.

Pointed out by Derek in the code review that added this.

TBR=djsollen

Review URL: https://codereview.chromium.org/1058633002
/external/skia/bench/nanobench.cpp
60869a42a133942f852dd0f1696444c2a5c9ad83 01-Apr-2015 scroggo <scroggo@google.com> Add timing SkCodec to nanobench.

CodecBench:
Add new class for timing using SkCodec.

DecodingBench:
Include creating a decoder inside the loop. This is to have a better
comparison against SkCodec. SkCodec's factory function does not
necessarily read the same amount as SkImageDecoder's, so in order to
have a meaningful comparison, read the entire stream from the
beginning. Also for comparison, create a new SkStream from the
SkData each time.
Add a debugging check to make sure we have an SkImageDecoder.
Add include guards.

nanobench.cpp:
Decode using SkCodec.
When decoding using SkImageDecoder, exclude benches where we decoded
to a different color type than requested. SkImageDecoder may decide to
decode to a different type, in which case the name is misleading.

TODOs:
Now that we ignore color types that do not match the desired
color type, we should add Index8. This also means calling the more
complex version of getPixels so CodecBench can support kIndex8.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1044363002
/external/skia/bench/nanobench.cpp
75a0ebb0d0bd852e3b068bf14370c6689242a89c 27-Mar-2015 tomhudson <tomhudson@google.com> Minor cleanup in nanobench

Simplify time() by removing conditionals; reduce the amount of
parameter passing.
Add a convenience function to Target.

R=mtklein@google.com
BUG=skia:3595

Review URL: https://codereview.chromium.org/1039253002
/external/skia/bench/nanobench.cpp
d968a6f29e92230ee118ec9cdfff0329bf83d602 26-Mar-2015 tomhudson <tomhudson@google.com> Android HWUI backend Nanobench

Uses filtering canvas from utils/android, shared with DM.
Follow-up plans in https://skbug.com/3589, https://skbug.com/3595

R=djsollen@google.com

Review URL: https://codereview.chromium.org/1029423010
/external/skia/bench/nanobench.cpp
e0b19d4985846d64bb581013828a9dc5af401a5d 26-Mar-2015 joshualitt <joshualitt@chromium.org> small fix for nanobench segfault when not running any tests

BUG=skia:

Review URL: https://codereview.chromium.org/1030353004
/external/skia/bench/nanobench.cpp
95553d917c73ef333ede967521560957a5b6a0ad 12-Mar-2015 mtklein <mtklein@chromium.org> DM: display current memory usage (instead of peak) when available.

Seems strictly more useful.

This implements Mac and Windows, which seemed easy. Don't know how to do this on Linux yet.

BUG=skia:

CQ_EXTRA_TRYBOTS=client.skia:Test-Mac10.9-MacMini6.2-HD4000-x86_64-Debug-Trybot

NOTREECHECKS=true
TBR=halcanary@google.com

Review URL: https://codereview.chromium.org/990723002
/external/skia/bench/nanobench.cpp
95f192d19938b98a45dd1fa4112d965f60d10516 13-Feb-2015 msarett <msarett@google.com> Adding new benchmark to test image decoding performance.

BUG=skia:

Review URL: https://codereview.chromium.org/918673002
/external/skia/bench/nanobench.cpp
57f27bdcbd328491a121918b4ab9301fbcdec642 09-Feb-2015 mtklein <mtklein@google.com> Revert of nanobench: lazily decode bitmaps in .skps. (patchset #1 id:1 of https://codereview.chromium.org/743613005/)

Reason for revert:
Well, it still crashes.

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
>
> Committed: https://skia.googlesource.com/skia/+/1b6b626f9bc0deebe4fe2e63f422d6b122419205

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

Review URL: https://codereview.chromium.org/902783005
/external/skia/bench/nanobench.cpp
1b6b626f9bc0deebe4fe2e63f422d6b122419205 09-Feb-2015 mtklein <mtklein@chromium.org> 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

Review URL: https://codereview.chromium.org/743613005
/external/skia/bench/nanobench.cpp
b12ea41286ce36e085c5a14711da0cf9f240fdf1 03-Feb-2015 bsalomon <bsalomon@google.com> Add texture create/upload stats and make nanobench have explicit gpu stats flag

Review URL: https://codereview.chromium.org/891973002
/external/skia/bench/nanobench.cpp
cf5d9c993dcbd75d4cefe2d1de25c2b9645f6957 23-Jan-2015 mtklein <mtklein@chromium.org> Spin off GM::runAsBench() from flags.

This will let us kill flags.

BUG=skia:

Review URL: https://codereview.chromium.org/873753002
/external/skia/bench/nanobench.cpp
55e88b226ccb85d2c712a9e3e9e1f5bdcaac05ac 22-Jan-2015 mtklein <mtklein@chromium.org> More natural way to serialize GPU tasks and tests.

This basically takes out the Windows-only hacks and promotes them to
cross-platform behavior driven by --gpu_threading.
- When --gpu_threading is false (the default), this puts GPU tasks and tests
together in the same GPU enclave. They all run serially.
- When --gpu_threading is true, both the tests and the tasks run totally
independently, just like the thread-safe CPU-bound work.

BUG=skia:3255

Review URL: https://codereview.chromium.org/847273005
/external/skia/bench/nanobench.cpp
a1193e4b0e34a7e4e1bd33e9708d7341679f8321 21-Jan-2015 scroggo <scroggo@google.com> Make SkStream *not* ref counted.

SkStream is a stateful object, so it does not make sense for it to have
multiple owners. Make SkStream inherit directly from SkNoncopyable.

Update methods which previously called SkStream::ref() (e.g.
SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(),
which required the existing owners to call SkStream::unref()) to take
ownership of their SkStream parameters and delete when done (including
on failure).

Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some
cases this means heap allocating streams that were previously stack
allocated.

Respect ownership rules of SkTypeface::CreateFromStream() and
SkImageDecoder::buildTileIndex().

Update the comments for exceptional methods which do not affect the
ownership of their SkStream parameters (e.g.
SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be
explicit about ownership.

Remove test_stream_life, which tested that buildTileIndex() behaved
correctly when SkStream was a ref counted object. The test does not
make sense now that it is not.

In SkPDFStream, remove the SkMemoryStream member. Instead of using it,
create a new SkMemoryStream to pass to fDataStream (which is now an
SkAutoTDelete).

Make other pdf rasterizers behave like SkPDFDocumentToBitmap.

SkPDFDocumentToBitmap delete the SkStream, so do the same in the
following pdf rasterizers:

SkPopplerRasterizePDF
SkNativeRasterizePDF
SkNoRasterizePDF

Requires a change to Android, which currently treats SkStreams as ref
counted objects.

Review URL: https://codereview.chromium.org/849103004
/external/skia/bench/nanobench.cpp
afe3005be3392e43bc51eb7eb2017eefaed85ad1 16-Jan-2015 bsalomon <bsalomon@google.com> Require budget decision when creating a RenderTarget SkSurface.

Restructure SkGpuDevice creation:
*SkSurfaceProps are optional.
*Use SkSurfaceProps to communicate DF text rather than a flag.
*Tell SkGpuDevice::Create whether RT comes from cache or not.

Review URL: https://codereview.chromium.org/848903004
/external/skia/bench/nanobench.cpp
748ca3bf2d170708f263693e8579e6722389d0ef 15-Jan-2015 mtklein <mtklein@chromium.org> Sketch DM refactor.

BUG=skia:3255

I think this supports everything DM used to, but has completely refactored how
it works to fit the design in the bug.

Configs like "tiles-gpu" are automatically wired up.

I wouldn't suggest looking at this as a diff. There's just a bunch of deleted
files, a few new files, and one new file that shares a name with a deleted file
(DM.cpp).

NOTREECHECKS=true

Committed: https://skia.googlesource.com/skia/+/709d2c3e5062c5b57f91273bfc11a751f5b2bb88

Review URL: https://codereview.chromium.org/788243008
/external/skia/bench/nanobench.cpp
114c3cd0543d77aa0ac08d8af436ac7f9d32714d 15-Jan-2015 mtklein <mtklein@google.com> Revert of Sketch DM refactor. (patchset #45 id:850001 of https://codereview.chromium.org/788243008/)

Reason for revert:
plenty of data

Original issue's description:
> Sketch DM refactor.
>
> BUG=skia:3255
>
>
> I think this supports everything DM used to, but has completely refactored how
> it works to fit the design in the bug.
>
> Configs like "tiles-gpu" are automatically wired up.
>
> I wouldn't suggest looking at this as a diff. There's just a bunch of deleted
> files, a few new files, and one new file that shares a name with a deleted file
> (DM.cpp).
>
> NOTREECHECKS=true
>
> Committed: https://skia.googlesource.com/skia/+/709d2c3e5062c5b57f91273bfc11a751f5b2bb88

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

Review URL: https://codereview.chromium.org/853883004
/external/skia/bench/nanobench.cpp
709d2c3e5062c5b57f91273bfc11a751f5b2bb88 15-Jan-2015 mtklein <mtklein@chromium.org> Sketch DM refactor.

BUG=skia:3255

I think this supports everything DM used to, but has completely refactored how
it works to fit the design in the bug.

Configs like "tiles-gpu" are automatically wired up.

I wouldn't suggest looking at this as a diff. There's just a bunch of deleted
files, a few new files, and one new file that shares a name with a deleted file
(DM.cpp).

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/788243008
/external/skia/bench/nanobench.cpp
0aa5cea8694d3686b6742a36eab81ab9001de954 15-Dec-2014 bsalomon <bsalomon@google.com> fix last warnings on w64 and turn on w.a.e.

Review URL: https://codereview.chromium.org/801413002
/external/skia/bench/nanobench.cpp
e451c4df7369c5e253ef9c9e0a8713beda25f34b 09-Dec-2014 robertphillips <robertphillips@google.com> Update nanobench so the non-MPD path doesn't permit layer hoisting

Review URL: https://codereview.chromium.org/787923002
/external/skia/bench/nanobench.cpp
5a8fc333209b91cece77d1f0ee963ce8642ab6d7 05-Dec-2014 mtklein <mtklein@chromium.org> Don't upload metrics we don't want to track.

BUG=skia:

Review URL: https://codereview.chromium.org/758853004
/external/skia/bench/nanobench.cpp
e109145bf31d63963b3f78c6af6e404d5464a55b 04-Dec-2014 mtklein <mtklein@chromium.org> nanobench: upload peak memory usage as its own trace.

We'll end up with a result like this:
"memory_usage" : {
"meta" : {
"max_rss_mb" : 57
}
}

BUG=skia:

Review URL: https://codereview.chromium.org/780013002
/external/skia/bench/nanobench.cpp
051e56df8f14fae68f0e990f78b85494c2ce4a6b 04-Dec-2014 mtklein <mtklein@chromium.org> Upload picture byte size and op count metrics for SKP recording.

Look okay?

{
"results" : {
"desk_amazon.skp_1264_3999" : {
"nonrendering" : {
"bytes" : 75656,
"max_ms" : 1.150187,
"mean_ms" : 1.150187,
"median_ms" : 1.150187,
"min_ms" : 1.150187,
"ops" : 659,
"options" : {
"bench_type" : "recording",
"clip" : "0 0 1000 1000",
"name" : "desk_amazon.skp",
"scale" : "1",
"source_type" : "skp"
}
}
},
...

BUG=skia:

Review URL: https://codereview.chromium.org/773323002
/external/skia/bench/nanobench.cpp
4f10844149bbc05f0259a1b3199c2f995756ed60 03-Dec-2014 mtklein <mtklein@chromium.org> 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
/external/skia/bench/nanobench.cpp
535776eb28ce867cc173f982d8b652fb4361c0c4 25-Nov-2014 mtklein <mtklein@google.com> 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
/external/skia/bench/nanobench.cpp
7e225bdb1f00ae4aed524ff8d0a61df3d3abb109 25-Nov-2014 mtklein <mtklein@chromium.org> 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
/external/skia/bench/nanobench.cpp
5b69377507478623dcf5b11f3ecb010f87c4794f 21-Nov-2014 robertphillips <robertphillips@google.com> Add MultiPictureDraw to nanobench

I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium.

TBR=bsalomon@google.com

Committed: https://skia.googlesource.com/skia/+/0ddad31012dabfc1267effc8071d37f7d606efbe

Review URL: https://codereview.chromium.org/731973005
/external/skia/bench/nanobench.cpp
e77dadd91ae6f4319c2c047e7e36cc79bb4d1eff 21-Nov-2014 robertphillips <robertphillips@google.com> Revert of Add MultiPictureDraw to nanobench (patchset #7 id:120001 of https://codereview.chromium.org/731973005/)

Reason for revert:
Needs more work

Original issue's description:
> Add MultiPictureDraw to nanobench
>
> I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium.
>
> TBR=bsalomon@google.com
>
> Committed: https://skia.googlesource.com/skia/+/0ddad31012dabfc1267effc8071d37f7d606efbe

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

Review URL: https://codereview.chromium.org/750583002
/external/skia/bench/nanobench.cpp
0ddad31012dabfc1267effc8071d37f7d606efbe 21-Nov-2014 robertphillips <robertphillips@google.com> Add MultiPictureDraw to nanobench

I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium.

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/731973005
/external/skia/bench/nanobench.cpp
3b27adef0a52f6d321fdee7412ef69e7a7284bcc 13-Nov-2014 jcgregorio <jcgregorio@google.com> Revert of Make nanobench and dm be usable from Chromium build (patchset #5 id:80001 of https://codereview.chromium.org/657373002/)

Reason for revert:
Causing breakages on Mac build.

Original issue's description:
> Make nanobench and dm be usable from Chromium build
>
> Move the app logic for each app as follows:
>
> <app>.cpp -- the file which contains main(). Embedders that compile
> their own apps, such as ios shell, upcoming Chromium dm etc, do not use this.
>
> <app>_main.cpp -- the main logic of the Skia test application. This will be
> used by Skia -compiled apps as well as embedder -compiled apps.
>
> <app>_main.h -- the API for the main logic. This will be
> used by Skia -compiled apps as well as embedder -compiled apps.
>
> This way (the upcoming) Chromium dm can setup its Chromium-specific setup
> in custom main(), and then call dm_main(), without the need of any
> SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/c092d3bdab5f723576cc0346cea3ee282a9cb444

TBR=mtklein@chromium.org,mtklein@google.com,borenet@google.com,kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/724073002
/external/skia/bench/nanobench.cpp
c092d3bdab5f723576cc0346cea3ee282a9cb444 13-Nov-2014 kkinnunen <kkinnunen@nvidia.com> Make nanobench and dm be usable from Chromium build

Move the app logic for each app as follows:

<app>.cpp -- the file which contains main(). Embedders that compile
their own apps, such as ios shell, upcoming Chromium dm etc, do not use this.

<app>_main.cpp -- the main logic of the Skia test application. This will be
used by Skia -compiled apps as well as embedder -compiled apps.

<app>_main.h -- the API for the main logic. This will be
used by Skia -compiled apps as well as embedder -compiled apps.

This way (the upcoming) Chromium dm can setup its Chromium-specific setup
in custom main(), and then call dm_main(), without the need of any
SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not.

BUG=skia:2992

Review URL: https://codereview.chromium.org/657373002
/external/skia/bench/nanobench.cpp
4736e1434ae329e3a737dfd9504c22b3fc13dc72 07-Nov-2014 jvanverth <jvanverth@google.com> Get gpudft support working in dm, gm, nanobench and bench_pictures

Adds a new config to test distance field text.
Clean up some flags and #defines to read "distance field text",
not "distance field fonts" to be consistent with Chromium

NOTREECHECKS=true

Committed: https://skia.googlesource.com/skia/+/06ba179838ba4fe187cf290750aeeb4a02a2960b

Review URL: https://codereview.chromium.org/699453005
/external/skia/bench/nanobench.cpp
aa30ab3079ad3c1f408e3f170dac1cdd42ed2b62 06-Nov-2014 jvanverth <jvanverth@google.com> Revert of Get gpudft support working in dm, gm, nanobench and bench_pictures (patchset #2 id:20001 of https://codereview.chromium.org/699453005/)

Reason for revert:
Not compiling in ANGLE build

Original issue's description:
> Get gpudft support working in dm, gm, nanobench and bench_pictures
>
> Adds a new config to test distance field text.
> Clean up some flags and #defines to read "distance field text",
> not "distance field fonts" to be consistent with Chromium
>
> NOTREECHECKS=true
>
> Committed: https://skia.googlesource.com/skia/+/06ba179838ba4fe187cf290750aeeb4a02a2960b

TBR=bsalomon@google.com,mtklein@google.com,reed@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/707723005
/external/skia/bench/nanobench.cpp
06ba179838ba4fe187cf290750aeeb4a02a2960b 06-Nov-2014 jvanverth <jvanverth@google.com> Get gpudft support working in dm, gm, nanobench and bench_pictures

Adds a new config to test distance field text.
Clean up some flags and #defines to read "distance field text",
not "distance field fonts" to be consistent with Chromium

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/699453005
/external/skia/bench/nanobench.cpp
527930fdbbba2a20f98b43821c6b72367e7b2d64 06-Nov-2014 mtklein <mtklein@chromium.org> Detect loops overflow for gpu benches.

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/709473002
/external/skia/bench/nanobench.cpp
6838d854a87e79f1fbb7b89b9f395155ad44dc0a 29-Oct-2014 mtklein <mtklein@chromium.org> Try out SkTree in nanobench.

Looks like a fairly large recording speed win with no playback cost.

BUG=skia:

Review URL: https://codereview.chromium.org/653023003
/external/skia/bench/nanobench.cpp
06cddec8570cbf29f89e89736afb0487b5b95abd 24-Oct-2014 bsalomon <bsalomon@google.com> Print GPU cache stats in nanobench/dm with veryVerbose

Review URL: https://codereview.chromium.org/680553002
/external/skia/bench/nanobench.cpp
c7f7f467df07be73b22dbee38a59762997eb19bc 21-Oct-2014 mtklein <mtklein@chromium.org> Draw SKPs in 256x256 tiles in nanobench.

(This CL will certainly trigger performance regression alerts. Tiled drawing is slower than non-tiled drawing.)

BUG=skia:

Review URL: https://codereview.chromium.org/669983002
/external/skia/bench/nanobench.cpp
e070c2bf54c451f0126d4ffb3a48bffe1fbfa437 14-Oct-2014 mtklein <mtklein@chromium.org> nanobench: flush after recording every Nth data point.

Got to keep our precious data in event of a crash.

With --flushEvery 10 I'm not seeing this cost any wall time.

BUG=skia:

Review URL: https://codereview.chromium.org/653083003
/external/skia/bench/nanobench.cpp
5324978a88677ac6b758324321816427814e7793 10-Oct-2014 reed <reed@google.com> detect --loops is < 0 and interpret that as running forever (mostly)

BUG=skia:

Review URL: https://codereview.chromium.org/643143002
/external/skia/bench/nanobench.cpp
9e61bb7815b133bc40ea7b00fccc853f4b728e3c 09-Oct-2014 kkinnunen <kkinnunen@nvidia.com> Make the Sk GL context class an abstract base class

Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before,
it depended on ifdefs to implement the platform dependent polymorphism. Move
the logic to subclasses of the various platform implementations.

This a step to enable Skia embedders to compile dm and bench_pictures. The
concrete goal is to support running these test apps with Chromium command buffer.

With this change, Chromium can implement its own version of SkGLNativeContext
that uses command buffer, and host the implementation in its own repository.

Implements the above by renaming the SkGLContextHelper to SkGLContext and
removing the unneeded SkGLNativeContext. Also removes
SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused:
no use in Skia code, and no tests.

BUG=skia:2992

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

Review URL: https://codereview.chromium.org/630843002
/external/skia/bench/nanobench.cpp
10805961ce424868e8315e00f6dbeeaa62d466ac 08-Oct-2014 bsalomon <bsalomon@google.com> Revert of Make the Sk GL context class an abstract base class (patchset #4 id:60001 of https://codereview.chromium.org/630843002/)

Reason for revert:
nanobech failing on Android

Original issue's description:
> Make the Sk GL context class an abstract base class
>
> Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before,
> it depended on ifdefs to implement the platform dependent polymorphism. Move
> the logic to subclasses of the various platform implementations.
>
> This a step to enable Skia embedders to compile dm and bench_pictures. The
> concrete goal is to support running these test apps with Chromium command buffer.
>
> With this change, Chromium can implement its own version of SkGLNativeContext
> that uses command buffer, and host the implementation in its own repository.
>
> Implements the above by renaming the SkGLContextHelper to SkGLContext and
> removing the unneeded SkGLNativeContext. Also removes
> SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused:
> no use in Skia code, and no tests.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8

TBR=kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/639793002
/external/skia/bench/nanobench.cpp
a90ed4e83897b45d6331ee4c54e1edd4054de9a8 08-Oct-2014 kkinnunen <kkinnunen@nvidia.com> Make the Sk GL context class an abstract base class

Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before,
it depended on ifdefs to implement the platform dependent polymorphism. Move
the logic to subclasses of the various platform implementations.

This a step to enable Skia embedders to compile dm and bench_pictures. The
concrete goal is to support running these test apps with Chromium command buffer.

With this change, Chromium can implement its own version of SkGLNativeContext
that uses command buffer, and host the implementation in its own repository.

Implements the above by renaming the SkGLContextHelper to SkGLContext and
removing the unneeded SkGLNativeContext. Also removes
SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused:
no use in Skia code, and no tests.

BUG=skia:2992

Review URL: https://codereview.chromium.org/630843002
/external/skia/bench/nanobench.cpp
dc5bbab138bfffc85d6ba525d990aad09c322ff6 24-Sep-2014 mtklein <mtklein@chromium.org> Have nanobench --verbose mode always just print integer nanoseconds.

Don't know that anyone but me is using this. Speak up now!

BUG=skia:

NOTREECHECKS=true
R=mtklein@google.com, tfarina@chromium.org

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/599913002
/external/skia/bench/nanobench.cpp
53d2562006ee371222963750009a706cfd1a94f7 18-Sep-2014 mtklein <mtklein@chromium.org> nanobench: print max RSS in debug mode too.

BUG=skia:2949
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/581083002
/external/skia/bench/nanobench.cpp
963504bd0a8ced7e1177ae136da03a9cc343d886 17-Sep-2014 mtklein <mtklein@google.com> Revert of nanobench: lazily decode bitmaps from SKPs (patchset #1 id:1 of https://codereview.chromium.org/572933006/)

Reason for revert:
skia:2944

Original issue's description:
> nanobench: lazily decode bitmaps from SKPs
>
> This makes it considerably cheaper to run SKP recording benchmarks, without
> affecting their measurements and without really affecting SKP playback
> benchmarks at all.
>
> On my machine, running out/Release/nanobench --match skp --config nondrendering
> drops in run time from 6.7s to 2.5s, and the peak RAM usage drops from 129M to 50M.
>
> I'm strongly considering making this lazy decoding the default.
>
> BUG=skia:2944
>
> Committed: https://skia.googlesource.com/skia/+/d664c21a38de98d8db210c46f7a8c4187f1534da

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

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/554583004
/external/skia/bench/nanobench.cpp
d664c21a38de98d8db210c46f7a8c4187f1534da 16-Sep-2014 mtklein <mtklein@chromium.org> nanobench: lazily decode bitmaps from SKPs

This makes it considerably cheaper to run SKP recording benchmarks, without
affecting their measurements and without really affecting SKP playback
benchmarks at all.

On my machine, running out/Release/nanobench --match skp --config nondrendering
drops in run time from 6.7s to 2.5s, and the peak RAM usage drops from 129M to 50M.

I'm strongly considering making this lazy decoding the default.

BUG=skia:
R=robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/572933006
/external/skia/bench/nanobench.cpp
fd731ce804cd3223318f3feee2c98404890b65f2 10-Sep-2014 mtklein <mtklein@chromium.org> Measure picture recording speed in nanobench.

Today we measure SkPicture playback speed, but not the time it takes to record
the SkPicture. This fixes that by reading SKPs from disk and re-recording them.

On the console, recording shows up first as the nonrendering skp benches,
followed later by the usual playback benches:

maxrss loops min median mean max stddev samples config bench
51M 2 165µs 168µs 169µs 178µs 3% ▆▄▃█▂▄▁▂▁▁ nonrendering tabl_slashdot.skp
57M 1 9.72ms 9.77ms 9.79ms 9.97ms 1% █▂▂▅▃▂▁▄▂▁ nonrendering desk_pokemonwiki.skp
57M 32 2.92µs 2.96µs 3.03µs 3.46µs 6% ▅▁▁▁▁▁▁█▂▁ nonrendering desk_yahoosports.skp
...
147M 1 3.86ms 3.87ms 3.97ms 4.81ms 7% █▁▁▁▁▁▁▁▁▁ 8888 tabl_slashdot.skp_1
147M 1 4.54ms 4.56ms 4.55ms 4.56ms 0% █▅▇▅█▅▂▁▅▁ 565 tabl_slashdot.skp_1
147M 2 3.08ms 3.24ms 4.17ms 8.18ms 50% █▁▁█▁▁▁▁▁▁ gpu tabl_slashdot.skp_1
147M 1 1.61ms 1.62ms 1.69ms 2.33ms 13% █▁▁▁▁▁▁▁▁▁ 8888 desk_pokemonwiki.skp_1
147M 1 1.44ms 1.44ms 1.45ms 1.47ms 1% ▅▂█▂▂▅▁▁▂▁ 565 desk_pokemonwiki.skp_1
...

On skiaperf.com, they'll also be separated out from playback benches by bench_type.

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/559153002
/external/skia/bench/nanobench.cpp
962890568ddac03d8eb8467a2e81b6f2b7f046f0 10-Sep-2014 mtklein <mtklein@chromium.org> Distinguish common and unique names for skiaperf.com.

Turns out we tack on the size post-facto in ResultsWriter::bench(), so the only
place we need getUniqueName() to differ from getName() is SKPBench.

BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/552303004
/external/skia/bench/nanobench.cpp
8247ec313d87afcdd4da59b1f2f0d24e0983e359 10-Sep-2014 qiankun.miao <qiankun.miao@intel.com> Fix format of nanobench result

Column of samples is too wide. This makes config is not align with the
'config' title. Pad 'samples' tilte with some whitespaces to fix this
issue.

BUG=skia:
R=mtklein@google.com

Author: qiankun.miao@intel.com

Review URL: https://codereview.chromium.org/549153005
/external/skia/bench/nanobench.cpp
ea65bfa8ded918b908287e3e3474aaf5cbd12fea 09-Sep-2014 mtklein <mtklein@chromium.org> Update DM JSON format.

Ex. dm --match patch -w bad --key arch x86 gpu nvidia model z620 --properties git_hash abcd build_number 20 ->

{
"build_number" : "20",
"git_hash" : "abcd",
"key" : {
"arch" : "x86",
"gpu" : "nvidia",
"model" : "z620"
},
"results" : [
{
"key" : {
"config" : "565",
"name" : "ninepatch-stretch"
},
"md5" : "f78cfafcbabaf815f3dfcf61fb59acc7",
"options" : {
"source_type" : "GM"
}
},
{
"key" : {
"config" : "8888",
"name" : "ninepatch-stretch"
},
"md5" : "3e8a42f35a1e76f00caa191e6310d789",
"options" : {
"source_type" : "GM"
}
},
...

This breaks -r, but that's okay. Going to follow up this CL with one that removes that entirely.

BUG=skia:
R=stephana@google.com, jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/551873003
/external/skia/bench/nanobench.cpp
49f085dddff10473b6ebf832a974288300224e60 05-Sep-2014 bsalomon <bsalomon@google.com> "NULL !=" = NULL

R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
/external/skia/bench/nanobench.cpp
c5ba71d2e5cd426def66fa49dcf003e5b2c98dc7 04-Sep-2014 robertphillips <robertphillips@google.com> Change SkPicture::draw to playback

R=reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/540963002
/external/skia/bench/nanobench.cpp
e5ea500d4714a7d84de2bf913e81be3b65d2de68 03-Sep-2014 reed <reed@google.com> Hide fields in SkImageInfo

R=rmistry@google.com
TBR=bsalomon

Author: reed@google.com

Review URL: https://codereview.chromium.org/536003002
/external/skia/bench/nanobench.cpp
a8d7f0b13cd4c6d773fcf055fe17db75d260fa05 29-Aug-2014 robertphillips <robertphillips@google.com> Try out scalar picture sizes

This paves the way for removing the 'fTile' parameter from SkPictureShader (although that should be a different CL). If we like this we could also move to providing an entire cull SkRect.

R=reed@google.com, mtklein@google.com, fmalita@google.com, fmalita@chromium.org

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/513983002
/external/skia/bench/nanobench.cpp
233c295980d54347ca1eda9095cd54b63a0268ec 22-Aug-2014 reed <reed@google.com> fix numerical overflows in 565 blends

BUG=skia:2797
R=mtklein@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/474983007
/external/skia/bench/nanobench.cpp
2084050a33ae139d0fe9bb680f7905f91139a39f 22-Aug-2014 mtklein <mtklein@chromium.org> Add --bbh (default true) to nanobench.

Chrome's using a bounding box, so it's a good idea for our
bots to do so too.

When set, we'll create an SkTileGrid to match the
parameters of --clip, and so should always hit its fast
path.

This will impose a small overhead (querying the BBH) on all
SKPs, but make large SKPs render more quickly. E.g. on
GPU desk_pokemonwiki should show about a 30% improvement,
tabl_mozilla about 40%, and one very long page from my
personal suite, askmefast.com, gets 5x faster.

(The performance changes are not the point of the CL, but
something we should be aware of.)

BUG=
R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/497493003
/external/skia/bench/nanobench.cpp
1915b62637bea20e1471a8a358b22e9e47a4a385 20-Aug-2014 mtklein <mtklein@chromium.org> Add --properties for things like gitHash that describe the current nanobench run.

--key describes the type of run (describes the line on the chart), --properties
describes the run itself (describes the dot on the chart).

We'll pass --properties gitHash <git hash> build_number <build number> --key
... to nanobench from the bots.

And... delete a whole lot of dead code.

Example: nanobench --properties gitHash foo build_number 1234 --key bar baz

{
"build_number" : "1234",
"gitHash" : "foo",
"key" : {
"bar" : "baz"
},
"results" : {
....

Friends with https://codereview.chromium.org/491943002
BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/488213002
/external/skia/bench/nanobench.cpp
753b870c62bd22cee3d9a15efc634822724084ac 20-Aug-2014 mtklein <mtklein@chromium.org> Define NDEBUG instead of SK_DEBUG/SK_RELEASE.

This makes our builds more like Chrome's, and will make our builds fail
if we accidentally use if SK_DEBUG instead of ifdef SK_DEBUG.

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/481513004
/external/skia/bench/nanobench.cpp
afb4379dbca4d4d3824ace183a7348d24bc1589f 20-Aug-2014 mtklein <mtklein@chromium.org> Print max RSS in GM and nanobench too.

Everyone used MB, so update the API to just return that.

BUG=skia:
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/483323002
/external/skia/bench/nanobench.cpp
94e51567dd691c3e1e8dfa6005a301d72cecf48e 19-Aug-2014 mtklein <mtklein@chromium.org> Add --options to nanobench, similar to --key but for non-identifying options.

Friends with https://codereview.chromium.org/487233003/

Example of out/Release/nanobench --options build_number 12374 --match patch_grid_texs_small

{
"gitHash":"unknown-revision",
"options":{
"build_number":"12374",
"system":"UNIX"
},
"results":{
"patch_grid_texs_small_640_480":{
"565":{
"max_ms":0.268116,
"mean_ms":0.2318529,
"median_ms":0.235337,
"min_ms":0.219158,
"options":{
"source_type":"bench"
},
"stddev_ms":0.01491263917658814
},
"8888":{
"max_ms":0.231881,
"mean_ms":0.2214668,
"median_ms":0.219356,
"min_ms":0.218887,
"options":{
"source_type":"bench"
},
"stddev_ms":0.004595541070791701
},
"gpu":{
"max_ms":0.1398304782608696,
"mean_ms":0.128833402173913,
"median_ms":0.1316798695652174,
"min_ms":0.1111915434782609,
"options":{
"GL_RENDERER":"Quadro 600/PCIe/SSE2",
"GL_SHADING_LANGUAGE_VERSION":"4.40 NVIDIA via Cg compiler",
"GL_VENDOR":"NVIDIA Corporation",
"GL_VERSION":"4.4.0 NVIDIA 331.79",
"source_type":"bench"
},
"stddev_ms":0.008923738937837156
}
}
}
}

BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/490683002
/external/skia/bench/nanobench.cpp
12b3544028e74712c6c095ed3a2e8a78de6b2ed8 13-Aug-2014 krajcevski <krajcevski@google.com> Add runtime flag to turn compressed alpha masks on

R=bsalomon@google.com, robertphillips@google.com, mtklein@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/468293002
/external/skia/bench/nanobench.cpp
69a5560ea5a8d26b120f5158e506a163d32b4a27 13-Aug-2014 krajcevski <krajcevski@google.com> Add entry point for passing options to the GrContextFactory

R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/465073002
/external/skia/bench/nanobench.cpp
b511042bb07a6a289b0d1146cb57f6e8b80580d6 08-Aug-2014 mtklein <mtklein@chromium.org> Fix iOS build by centralizing --writePath.

CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/452633002
/external/skia/bench/nanobench.cpp
6eb03cc06d0bc60da5277a83aa0251a475794b04 07-Aug-2014 bsalomon <bsalomon@google.com> Add option to dump images from nanobench.

Add option to set the repeat count to any number, replacs the --runOnce flag.

R=mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/450743002
/external/skia/bench/nanobench.cpp
3b4d077fba1ad037536db198608a940c47d91888 06-Aug-2014 bsalomon <bsalomon@google.com> Add angle config to nanobench and make angle a default config for dm and nanobench.

NOTREECHECKS=true
R=mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/441333003
/external/skia/bench/nanobench.cpp
2069e220034f09aad2f68b262f395e7c25b3d178 04-Aug-2014 mtklein <mtklein@chromium.org> Fix calibration loop failure condition.

With the old logic, if the last attempt succeeded, we'd say we failed.

We also print two lines for loop calibration failures. Quiet that down.

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/431503004
/external/skia/bench/nanobench.cpp
6e33e232df34d74c62e51e7e30d3ce90f14b46da 01-Aug-2014 mtklein <mtklein@chromium.org> Skip all .skps in 565.

More SKPs are failing with a 565 target on other platforms:

http://108.170.220.120:10117/builders/Test-Win7-ShuttleA-HD2000-x86-Debug/builds/2938/steps/RunNanobench/logs/stdio

BUG=skia:2797
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/431983006
/external/skia/bench/nanobench.cpp
92007583e43115998412ac8b0a06cc2780eb025c 01-Aug-2014 mtklein <mtklein@chromium.org> SKPs-as-benches in nanobench

This is meant to replace bench_pictures.

CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Release-iOS-Trybot

BUG=skia:
R=bsalomon@google.com, jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/425393004
/external/skia/bench/nanobench.cpp
e714e75c725c987fe682a1f5473224fe3e80380d 31-Jul-2014 mtklein <mtklein@chromium.org> nanobench: support GMs-as-benches

BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/438683002
/external/skia/bench/nanobench.cpp
2354f8432a7205571f04f9638a0018fb0b1fb282 28-Jul-2014 bsalomon <bsalomon@google.com> Test abandoning GL context in dm/nanobench.

Rename GrContext::contextDestroyed to GrContext::abandonContext.

Remove GrContext::resetContext.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/422903002
/external/skia/bench/nanobench.cpp
c2553373ee982b6c7c753e7e5035523bc01a7291 22-Jul-2014 bsalomon <bsalomon@google.com> Make nanobench setup configs outside of loop over benchmarks

R=mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/410683005
/external/skia/bench/nanobench.cpp
17f0b6df7248b9bbdaddacc3a6c9c6efe4ae278e 22-Jul-2014 caryclark <caryclark@google.com> share dm and command flags

Share command flags between dm and unit tests.
Also, allow dm's core to be included by itself and iOSShell.

Command line flags that are the same (or nearly the same) in DM
and in skia_tests have been moved to common_flags. Authors,
please check to see that the shared common flag is correct for
the tool.

For iOS, the 'tool_main' entry point has a wrapper to allow multiple
tools to be statically linked in the iOSShell.
Since SkCommandLineFlags::Parse can only be called once, these calls
are disabled in the IOS build.

Since the iOS app directory is dynamically assigned a name, use '@' to
select it. (This is the same convention chosen by the Mobile Harness
iOS file system utilities.)

Move the heart of dm.gyp into dm.gypi so that it can be included by
itself and iOSShell.gyp.

Add tools/flags/SkCommonFlags.* to define and declare common
command line flags.

Add support for dm to iOSShell.

BUG=skia:
R=scroggo@google.com, mtklein@google.com, jvanverth@google.com, bsalomon@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/389653004
/external/skia/bench/nanobench.cpp
05c4560ab36447895d510655f927fcf123330497 17-Jul-2014 jcgregorio <jcgregorio@google.com> Fix GLubyte to GrGLubyte.

BUG=skia:
R=mtklein@google.com

Author: jcgregorio@google.com

Review URL: https://codereview.chromium.org/405433008
/external/skia/bench/nanobench.cpp
bf5e5237b8f5dc9288d72e90864d6ba8d4bfbb72 17-Jul-2014 jcgregorio <jcgregorio@google.com> Change JSON output of nanobench.

We're moving away from BigQuery for storing results so the output doens't have to conform to BQ requirements, which allows simplifying the format. Also stop parsing the filename for information and pass in buildbot parameters explicitly.

Adds the following flags to nanobench:

--key
--gitHash

BUG=skia:
R=mtklein@google.com, bsalomon@google.com

Author: jcgregorio@google.com

Review URL: https://codereview.chromium.org/392393002
/external/skia/bench/nanobench.cpp
04d53a5cd5ab609526ecf40159df01975ee2bbfd 17-Jul-2014 mtklein <mtklein@google.com> Revert of nanobench: --veryVerbose for more Win7 debugging (https://codereview.chromium.org/401663002/)

Reason for revert:
Shouldn't be needed anymore.

Original issue's description:
> nanobench: --veryVerbose for more Win7 debugging
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e57452d

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

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/404543004
/external/skia/bench/nanobench.cpp
e57452debd6a1f92641af4ca09bc2227476fff10 17-Jul-2014 Mike Klein <mtklein@google.com> nanobench: --veryVerbose for more Win7 debugging

BUG=skia:

Review URL: https://codereview.chromium.org/401663002
/external/skia/bench/nanobench.cpp
55b0ffc4861e940d8bcf767ff9abf44ff18545ea 17-Jul-2014 mtklein <mtklein@chromium.org> nanobench: Protect more against infinite loops.

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/404543002
/external/skia/bench/nanobench.cpp
912947737a973421f4c58682b6171cb5ee00ad3a 17-Jul-2014 Mike Klein <mtklein@google.com> Use __rdtsc on Windows.

This seems to be ~100x higher resolution than QueryPerformanceCounter. AFAIK, all our Windows perf bots have constant_tsc, so we can be a bit more direct about using rdtsc directly: it'll always tick at the max CPU frequency.

Now, the question remains, what is the max CPU frequency to divide through by? It looks like QueryPerformanceFrequency actually gives the CPU frequency in kHz, suspiciously exactly what we need to divide through to get elapsed milliseconds. That was a freebie.

I did some before/after comparison on slow benchmarks. Timings look the same. Going to land this without review tonight to see what happens on the bots; happy to review carefully tomorrow.

R=mtklein@google.com
TBR=bungeman

BUG=skia:

Review URL: https://codereview.chromium.org/394363003
/external/skia/bench/nanobench.cpp
e3631364e93ee9164f3ce322778d5a50c33f63a6 15-Jul-2014 Mike Klein <mtklein@google.com> Try to debug Windows infinite loops in nanobench.

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/396753004
/external/skia/bench/nanobench.cpp
3944a1d2374d2de8622b0192aa080dba6fb92c76 15-Jul-2014 Mike Klein <mtklein@google.com> destroyContexts after each bench instead of before

BUG=skia:

Review URL: https://codereview.chromium.org/394893002
/external/skia/bench/nanobench.cpp
6238688af0d758660d344ec047243d4efefd6f4d 15-Jul-2014 mtklein <mtklein@chromium.org> Give windows boring bars and use 'us' for microseconds.

NOTREECHECKS=true

BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/393673006
/external/skia/bench/nanobench.cpp
1e319f734275b166fefe121ac9f4783ab70bc03b 15-Jul-2014 mtklein <mtklein@chromium.org> Add --resetGpuContext to both DM and nanobench.

Defaulting to true to be conservative for now.

BUG=skia:

NOTREECHECKS=true
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/398483005
/external/skia/bench/nanobench.cpp
a189ccdb4d5efdbbfa34a26c08656634b615f930 14-Jul-2014 mtklein <mtklein@chromium.org> nanobench: add --runOnce.

BUG=skia:
R=egdaniel@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/392583005
/external/skia/bench/nanobench.cpp
60317d0ffb5053df7b08a627d6decd11b684e80d 14-Jul-2014 mtklein <mtklein@chromium.org> nanobench: support --outResultsFile

BUG=skia:
R=kelvinly@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/390933002
/external/skia/bench/nanobench.cpp
5d9d10e8217d2138b5514a4d4216f95373240942 11-Jul-2014 mtklein <mtklein@chromium.org> nanobench: add a cute bar chart

Give this a try? Helpful, or gets in the way?

BUG=skia:
R=krajcevski@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/390483002
/external/skia/bench/nanobench.cpp
40b32be3718f0f2e01c4a21bb0004b7f93670c42 09-Jul-2014 mtklein <mtklein@chromium.org> nanobench: add median and --cpu/--gpu

BUG=skia:
R=krajcevski@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/377283002
/external/skia/bench/nanobench.cpp
9bc86ed0523e154f6f4329f43c15012f930e06d7 01-Jul-2014 mtklein <mtklein@chromium.org> Hey, maybe we should _call_ glFinish.

BUG=skia:

CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-x86-Debug-Trybot
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/345063004
/external/skia/bench/nanobench.cpp
bb6a02823929584231c8e080ee69e7fb1178cbfb 01-Jul-2014 mtklein <mtklein@chromium.org> draft gpu support in nanobench

BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/359473004
/external/skia/bench/nanobench.cpp
f372321de3d4183de5b9ca436e677e471e358f31 25-Jun-2014 mtklein <mtklein@chromium.org> Add nanobench, a fresh look at our microbenchmark harness.

out/Release/nanobench runs 4-5x faster on my Z620 and ~2x faster on my N5 than out/Release/bench with the same configs.

(Debug isn't really comparable. I haven't added the Debug -> single loop check.)

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/347443002
/external/skia/bench/nanobench.cpp