Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Issue 99893003: Simplify benchmark internal API. (Closed)

Created:
7 years ago by mtklein
Modified:
7 years ago
Reviewers:
djsollen
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Simplify benchmark internal API. I'm not quite sure why I wrote such a convoluted API with setLoops()/getLoops(). This replaces it with a loops argument passed to onDraw(). This CL is largely mechanical translation from the old API to the new one. MathBench used this->getLoops() outside onDraw(), which seems incorrect. I fixed it. BUG= Committed: http://code.google.com/p/skia/source/detail?r=12466

Patch Set 1 #

Total comments: 2

Patch Set 2 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+331 lines, -319 lines) Patch
M bench/AAClipBench.cpp View 4 chunks +8 lines, -8 lines 0 comments Download
M bench/BicubicBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/BitmapBench.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M bench/BitmapRectBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/BitmapScaleBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/BlurBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/BlurImageFilterBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/BlurRectBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/BlurRoundRectBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/ChartBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/ChecksumBench.cpp View 3 chunks +5 lines, -5 lines 0 comments Download
M bench/ChromeBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/CmapBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/ColorFilterBench.cpp View 10 chunks +20 lines, -20 lines 0 comments Download
M bench/ColorPrivBench.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M bench/CoverageBench.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M bench/DashBench.cpp View 7 chunks +10 lines, -10 lines 0 comments Download
M bench/DecodeBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/DeferredCanvasBench.cpp View 3 chunks +5 lines, -5 lines 0 comments Download
M bench/DeferredSurfaceCopyBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/DisplacementBench.cpp View 4 chunks +6 lines, -6 lines 0 comments Download
M bench/FSRectBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/FontCacheBench.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M bench/FontScalerBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/GameBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/GrMemoryPoolBench.cpp View 4 chunks +7 lines, -7 lines 0 comments Download
M bench/GrResourceCacheBench.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M bench/GradientBench.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M bench/HairlinePathBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/ImageCacheBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/ImageDecodeBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/InterpBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/LightingBench.cpp View 7 chunks +41 lines, -22 lines 0 comments Download
M bench/LineBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/MagnifierBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/MathBench.cpp View 8 chunks +19 lines, -19 lines 0 comments Download
M bench/Matrix44Bench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/MatrixBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/MatrixConvolutionBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/MemoryBench.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M bench/MemsetBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/MergeBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/MorphologyBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/MutexBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/PathBench.cpp View 16 chunks +33 lines, -33 lines 0 comments Download
M bench/PathIterBench.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M bench/PathUtilsBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/PerlinNoiseBench.cpp View 3 chunks +5 lines, -5 lines 0 comments Download
M bench/PicturePlaybackBench.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M bench/PictureRecordBench.cpp View 3 chunks +7 lines, -7 lines 0 comments Download
M bench/PremulAndUnpremulAlphaOpsBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/RTreeBench.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M bench/ReadPixBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/RectBench.cpp View 7 chunks +8 lines, -8 lines 0 comments Download
M bench/RectoriBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/RefCntBench.cpp View 6 chunks +12 lines, -12 lines 0 comments Download
M bench/RegionBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/RegionContainBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/RepeatTileBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/ScalarBench.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M bench/ShaderMaskBench.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M bench/SkBenchmark.h View 4 chunks +5 lines, -12 lines 0 comments Download
M bench/SkBenchmark.cpp View 2 chunks +2 lines, -3 lines 0 comments Download
M bench/SkipZeroesBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/SortBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/StrokeBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/TableBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/TextBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/TileBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/VertBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/WritePixelsBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M bench/WriterBench.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M bench/XfermodeBench.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M bench/benchmain.cpp View 2 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
mtklein
Was just looking at a new benchmark I wrote and realized how silly the API ...
7 years ago (2013-12-03 00:42:11 UTC) #1
djsollen
https://codereview.chromium.org/99893003/diff/1/bench/SkBenchmark.h File bench/SkBenchmark.h (right): https://codereview.chromium.org/99893003/diff/1/bench/SkBenchmark.h#newcode119 bench/SkBenchmark.h:119: virtual void onDraw(const int loops, SkCanvas*) = 0; should ...
7 years ago (2013-12-03 15:12:51 UTC) #2
djsollen
lgtm I have been convinced that making loops non-optional is the way to go.
7 years ago (2013-12-03 15:16:23 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@google.com/99893003/1
7 years ago (2013-12-03 15:18:05 UTC) #4
commit-bot: I haz the power
Failed to apply patch for bench/ColorPrivBench.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years ago (2013-12-03 15:18:27 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@google.com/99893003/20001
7 years ago (2013-12-03 16:44:20 UTC) #6
commit-bot: I haz the power
7 years ago (2013-12-03 18:17:32 UTC) #7
Message was sent while issue was closed.
Change committed as 12466

Powered by Google App Engine
This is Rietveld 408576698