skia2/bench
commit-bot@chromium.org 19382421b9 Convert SkWriter32 to use an SkTDArray for its internal storage.
This reduces the allocation overhead of a null picture (create, beginRecording(), endRecording) from about 18K to about 1.9K.  (There's still lots more to prune.)

SkPictureFlat can exploit the fact that Writer32 is contiguous simplify its memory management.  The Writer32 itself becomes the scratch buffer.

Remove lots and lots of arbitrary magic numbers that were size guesses and minimum allocation sizes.  Keep your eyes open for the big obvious DUH why we save 16K per picture!  (Spoiler alert.  It's because that first save we issue in beginRecording() forces the old SkWriter32 to allocate 16K.)

Tests passing, DM passing.

bench --match writer: ~20% faster
null bench_record: ~30% faster
bench_record on buildbot .skps: ~3-6% slower, ranging 25% faster to 20% slower
bench_pictures on buildbot .skps: ~1-2% faster, ranging 13% faster to 28% slower

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

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13073 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-14 20:51:26 +00:00
..
BenchTool/BenchTool.xcodeproj move main.cpp outside of the xcode project 2009-01-07 11:49:19 +00:00
AAClipBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
bench_analyze.py Remove references to Skia's SVN repository 2014-01-09 21:41:39 +00:00
bench_compare.py Make bench_compare executable. 2013-11-12 15:25:31 +00:00
bench_expectations_Perf-Android-Nexus7-Tegra3-Arm7-Release.txt Rebaseline for Nexus7 tile multithreads config. Widens the range for benched calculated from average. 2013-12-19 16:20:04 +00:00
bench_expectations_Perf-Ubuntu12-ShuttleA-ATI5770-x86-Release.txt Adjusts Ubuntu bench multi_4_threads values. Widens range to cope with the new average instead of 25th. 2013-12-18 14:55:02 +00:00
bench_expectations_Perf-Win7-ShuttleA-HD2000-x86-Release.txt Adjusts Win7 bench tile_256x256_multi_4_threads. Using 8f4d230. 2013-12-17 20:23:22 +00:00
bench_util.py Fixes bench_util's CONFIG_RE to cope with space flexibility. 2013-12-05 01:31:56 +00:00
BenchGpuTimer_gl.cpp Split GrGLContextInfo into GrGLContext & GrGLContextInfo 2013-02-28 20:16:25 +00:00
BenchGpuTimer_gl.h Split GrGLContextInfo into GrGLContext & GrGLContextInfo 2013-02-28 20:16:25 +00:00
benchmain.cpp Add default resource path for skia test cases in gm and bench tools. 2013-12-31 14:29:52 +00:00
BenchSysTimer_c.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
BenchSysTimer_c.h Convert #warning to comment to get iOS compiling 2013-03-28 13:43:16 +00:00
BenchSysTimer_mach.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
BenchSysTimer_mach.h Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
BenchSysTimer_posix.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
BenchSysTimer_posix.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
BenchSysTimer_windows.cpp Use lowercase windows.h in includes to fix Windows cross compilation using mingw. 2013-12-03 15:23:37 +00:00
BenchSysTimer_windows.h Use lowercase windows.h in includes to fix Windows cross compilation using mingw. 2013-12-03 15:23:37 +00:00
BenchTimer.cpp extend SkBenchmark to allow a bench to return a durationScale, which allows it to perform fewer actual interations, but report a scale factor to account for that. Thus a very slow bench can be compared head-to-head with a faster one, w/o actually forcing the tool to run for the full duration of the slower test. 2013-05-29 15:39:54 +00:00
BenchTimer.h extend SkBenchmark to allow a bench to return a durationScale, which allows it to perform fewer actual interations, but report a scale factor to account for that. Thus a very slow bench can be compared head-to-head with a faster one, w/o actually forcing the tool to run for the full duration of the slower test. 2013-05-29 15:39:54 +00:00
BicubicBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
BitmapBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
BitmapRectBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
BitmapScaleBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
BlurBench.cpp deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients 2013-12-17 19:22:07 +00:00
BlurImageFilterBench.cpp NEON fast path for box blur 2014-01-13 08:16:45 +00:00
BlurRectBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
BlurRoundRectBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
ChartBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
check_bench_regressions.py Changes bench to output with git hash filename; cleans up bench_graph_svg to only handle bench alerts; renames it to check_bench_regressions. 2013-10-15 00:08:14 +00:00
ChecksumBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
ChromeBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
CmapBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
ColorFilterBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
ColorPrivBench.cpp Make sure four_byte_interp benches the entire FourByteInterp call. 2013-12-05 16:43:08 +00:00
CoverageBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
DashBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
DecodeBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
DeferredCanvasBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
DeferredSurfaceCopyBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
DisplacementBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
FontCacheBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
FontScalerBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
FSRectBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
GameBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
gen_bench_ranges.py Deletes bench_expectations.txt and change comments to refer to the new per-bot expectation files. 2013-09-25 20:51:16 +00:00
GradientBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
GrMemoryPoolBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
GrResourceCacheBench.cpp Fix compilation with SK_ENABLE_INST_COUNT=1 2013-12-05 12:08:12 +00:00
gUniqueGlyphIDs.h switch array to uint16_t to fix overflows 2013-06-11 19:53:19 +00:00
HairlinePathBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
ImageCacheBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
ImageDecodeBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
InterpBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
LightingBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
LineBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
MagnifierBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
MathBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
Matrix44Bench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
MatrixBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
MatrixConvolutionBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
MemoryBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
MemsetBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
MergeBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
MorphologyBench.cpp deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients 2013-12-17 19:22:07 +00:00
MutexBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
PathBench.cpp Cap memory usage in path_create bench. 2014-01-06 20:19:14 +00:00
PathIterBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
PathUtilsBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
PerlinNoiseBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
PicturePlaybackBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
PictureRecordBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
PremulAndUnpremulAlphaOpsBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
ReadPixBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
RectBench.cpp Move non-trivial work in RectBench() to onPreDraw. 2013-12-05 12:07:44 +00:00
RectoriBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
RefCntBench.cpp Fix compilation with SK_ENABLE_INST_COUNT=1 2013-12-05 12:08:12 +00:00
RegionBench.cpp Sanitizing source files in Housekeeper-Nightly 2014-01-02 07:01:35 +00:00
RegionContainBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
RepeatTileBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
ResultsWriter.h Add JSON output option to bench. 2013-12-03 18:16:48 +00:00
RTreeBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
ScalarBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
ShaderMaskBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
SkBenchLogger.cpp Report data from bench_pictures in the same fashion as bench. 2012-09-07 15:21:18 +00:00
SkBenchLogger.h Clean up SkTypes.h. 2013-10-11 18:50:45 +00:00
SkBenchmark.cpp Fix compilation with SK_ENABLE_INST_COUNT=1 2013-12-05 12:08:12 +00:00
SkBenchmark.h Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
SkipZeroesBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
SortBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
StackBench.cpp Revert of https://codereview.chromium.org/127223004/ 2014-01-08 21:31:11 +00:00
StrokeBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
TableBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
TextBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
tile_analyze.py Script to plot tile vs. viewport comparison for given platform and revision. 2013-02-13 23:22:29 +00:00
TileBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
TimerData.cpp Fix handling of aggregate times in TimerData::getResult 2013-12-17 16:32:51 +00:00
TimerData.h Committed: http://code.google.com/p/skia/source/detail?r=10372 2013-07-31 20:00:56 +00:00
VertBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
WritePixelsBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00
WriterBench.cpp Convert SkWriter32 to use an SkTDArray for its internal storage. 2014-01-14 20:51:26 +00:00
XfermodeBench.cpp Simplify benchmark internal API. 2013-12-03 18:17:16 +00:00