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

Side by Side Diff: bench/RefCntBench.cpp

Issue 1217573002: remove SkInstCnt (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bench/GrResourceCacheBench.cpp ('k') | dm/DM.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include <memory> 7 #include <memory>
8 #include "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkRefCnt.h" 9 #include "SkRefCnt.h"
10 #include "SkThread.h" 10 #include "SkThread.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 } 83 }
84 } 84 }
85 85
86 private: 86 private:
87 typedef Benchmark INHERITED; 87 typedef Benchmark INHERITED;
88 }; 88 };
89 89
90 class PlacedRefCnt : public SkRefCnt { 90 class PlacedRefCnt : public SkRefCnt {
91 public: 91 public:
92 SK_DECLARE_INST_COUNT(PlacedRefCnt)
93
94 PlacedRefCnt() : SkRefCnt() { } 92 PlacedRefCnt() : SkRefCnt() { }
95 void operator delete(void*) { } 93 void operator delete(void*) { }
96 94
97 private: 95 private:
98 typedef SkRefCnt INHERITED; 96 typedef SkRefCnt INHERITED;
99 }; 97 };
100 98
101 class RefCntBench_Heap : public Benchmark { 99 class RefCntBench_Heap : public Benchmark {
102 public: 100 public:
103 bool isSuitableFor(Backend backend) override { 101 bool isSuitableFor(Backend backend) override {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 DEF_BENCH( return new AtomicInc32(); ) 240 DEF_BENCH( return new AtomicInc32(); )
243 DEF_BENCH( return new AtomicInc64(); ) 241 DEF_BENCH( return new AtomicInc64(); )
244 242
245 DEF_BENCH( return new RefCntBench_Stack(); ) 243 DEF_BENCH( return new RefCntBench_Stack(); )
246 DEF_BENCH( return new RefCntBench_Heap(); ) 244 DEF_BENCH( return new RefCntBench_Heap(); )
247 DEF_BENCH( return new RefCntBench_New(); ) 245 DEF_BENCH( return new RefCntBench_New(); )
248 246
249 DEF_BENCH( return new WeakRefCntBench_Stack(); ) 247 DEF_BENCH( return new WeakRefCntBench_Stack(); )
250 DEF_BENCH( return new WeakRefCntBench_Heap(); ) 248 DEF_BENCH( return new WeakRefCntBench_Heap(); )
251 DEF_BENCH( return new WeakRefCntBench_New(); ) 249 DEF_BENCH( return new WeakRefCntBench_New(); )
OLDNEW
« no previous file with comments | « bench/GrResourceCacheBench.cpp ('k') | dm/DM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698