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

Issue 73643005: Implement a benchmark for GrResourceCache (Closed)

Created:
7 years, 1 month ago by Kimmo Kinnunen
Modified:
7 years, 1 month ago
Reviewers:
mtklein, bsalomon
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Implement a benchmark for GrResourceCache Adds "grresourcecache_add" and "grresourcecache_find" bench tests to test GrResourceCache::add and GrResourceCache::find. The tests work only with GPU backends, since GrResourceCache needs an GrGpu. Modifies bench tests to override SkBenchmark::isSuitableFor(Backend) function that specifies what kind of backend the test is inteded for. This replaces the previous "fIsRendering" flag that would indicate test that did no rendering. Adds SkCanvas::getGrContext() call to get the GrContext that the canvas ends up drawing to. The member function solves a common use-case that is also used in the benchmark added here. Committed: http://code.google.com/p/skia/source/detail?r=12334

Patch Set 1 #

Total comments: 10

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : address review comments #

Total comments: 3

Patch Set 5 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+454 lines, -112 lines) Patch
M bench/ChecksumBench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/DecodeBench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/GrMemoryPoolBench.cpp View 1 2 3 chunks +9 lines, -6 lines 0 comments Download
A bench/GrResourceCacheBench.cpp View 1 2 3 4 1 chunk +242 lines, -0 lines 0 comments Download
M bench/ImageDecodeBench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/InterpBench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/MathBench.cpp View 7 chunks +27 lines, -7 lines 0 comments Download
M bench/Matrix44Bench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/MatrixBench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/MemoryBench.cpp View 2 chunks +8 lines, -2 lines 0 comments Download
M bench/MemsetBench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/MutexBench.cpp View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M bench/PathBench.cpp View 1 2 4 chunks +10 lines, -4 lines 0 comments Download
M bench/PathIterBench.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M bench/PictureRecordBench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/RTreeBench.cpp View 2 chunks +10 lines, -2 lines 0 comments Download
M bench/RefCntBench.cpp View 1 2 6 chunks +18 lines, -12 lines 0 comments Download
M bench/RegionBench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/RegionContainBench.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M bench/ScalarBench.cpp View 2 chunks +8 lines, -2 lines 0 comments Download
M bench/SkBenchmark.h View 1 2 3 3 chunks +13 lines, -9 lines 0 comments Download
M bench/SkBenchmark.cpp View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M bench/SkipZeroesBench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/SortBench.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M bench/WriterBench.cpp View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M bench/XfermodeBench.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M bench/benchmain.cpp View 1 2 3 10 chunks +22 lines, -29 lines 0 comments Download
M gm/bleed.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M gm/gm.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M gm/gm.cpp View 1 2 3 1 chunk +0 lines, -13 lines 0 comments Download
M gm/image.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M gm/texdata.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M gyp/bench.gypi View 4 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkCanvas.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 2 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Kimmo Kinnunen
7 years, 1 month ago (2013-11-19 12:26:24 UTC) #1
mtklein
https://codereview.chromium.org/73643005/diff/1/bench/GrResourceCacheBench.cpp File bench/GrResourceCacheBench.cpp (right): https://codereview.chromium.org/73643005/diff/1/bench/GrResourceCacheBench.cpp#newcode50 bench/GrResourceCacheBench.cpp:50: SK_DECLARE_INST_COUNT(StencilResource); I'm not too clear on what the instance ...
7 years, 1 month ago (2013-11-19 12:59:00 UTC) #2
Kimmo Kinnunen
Thanks for the fast feedback. Updated the patch according to the review suggestions. https://codereview.chromium.org/73643005/diff/1/bench/GrResourceCacheBench.cpp File ...
7 years, 1 month ago (2013-11-19 14:12:48 UTC) #3
bsalomon
Thanks for writing this! https://codereview.chromium.org/73643005/diff/200002/bench/ChecksumBench.cpp File bench/ChecksumBench.cpp (right): https://codereview.chromium.org/73643005/diff/200002/bench/ChecksumBench.cpp#newcode38 bench/ChecksumBench.cpp:38: virtual bool isSuitableFor(Backend backend) SK_OVERRIDE ...
7 years, 1 month ago (2013-11-19 14:40:46 UTC) #4
mtklein
On 2013/11/19 14:40:46, bsalomon wrote: > Thanks for writing this! > > https://codereview.chromium.org/73643005/diff/200002/bench/ChecksumBench.cpp > File ...
7 years, 1 month ago (2013-11-19 14:50:06 UTC) #5
Kimmo Kinnunen
https://codereview.chromium.org/73643005/diff/200002/src/gpu/utils/GrUtils.h File src/gpu/utils/GrUtils.h (right): https://codereview.chromium.org/73643005/diff/200002/src/gpu/utils/GrUtils.h#newcode19 src/gpu/utils/GrUtils.h:19: GrContext* GetGr(/*very nearly const*/ SkCanvas*); On 2013/11/19 14:40:47, bsalomon ...
7 years, 1 month ago (2013-11-20 07:15:36 UTC) #6
bsalomon
On 2013/11/20 07:15:36, kkinnunen wrote: > https://codereview.chromium.org/73643005/diff/200002/src/gpu/utils/GrUtils.h > File src/gpu/utils/GrUtils.h (right): > > https://codereview.chromium.org/73643005/diff/200002/src/gpu/utils/GrUtils.h#newcode19 > ...
7 years, 1 month ago (2013-11-20 15:40:10 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/73643005/270001
7 years, 1 month ago (2013-11-21 06:10:16 UTC) #8
commit-bot: I haz the power
7 years, 1 month ago (2013-11-21 06:22:21 UTC) #9
Message was sent while issue was closed.
Change committed as 12334

Powered by Google App Engine
This is Rietveld 408576698