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

Side by Side Diff: bench/RefCntBench.cpp

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « bench/GrResourceCacheBench.cpp ('k') | bench/SkBenchmark.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 "SkBenchmark.h" 7 #include "SkBenchmark.h"
8 #include "SkRefCnt.h" 8 #include "SkRefCnt.h"
9 #include "SkThread.h" 9 #include "SkThread.h"
10 #include "SkWeakRefCnt.h" 10 #include "SkWeakRefCnt.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 public: 43 public:
44 SK_DECLARE_INST_COUNT(PlacedRefCnt) 44 SK_DECLARE_INST_COUNT(PlacedRefCnt)
45 45
46 PlacedRefCnt() : SkRefCnt() { } 46 PlacedRefCnt() : SkRefCnt() { }
47 void operator delete(void*) { } 47 void operator delete(void*) { }
48 48
49 private: 49 private:
50 typedef SkRefCnt INHERITED; 50 typedef SkRefCnt INHERITED;
51 }; 51 };
52 52
53 SK_DEFINE_INST_COUNT(PlacedRefCnt)
54
55 class RefCntBench_Heap : public SkBenchmark { 53 class RefCntBench_Heap : public SkBenchmark {
56 public: 54 public:
57 virtual bool isSuitableFor(Backend backend) SK_OVERRIDE { 55 virtual bool isSuitableFor(Backend backend) SK_OVERRIDE {
58 return backend == kNonRendering_Backend; 56 return backend == kNonRendering_Backend;
59 } 57 }
60 58
61 protected: 59 protected:
62 virtual const char* onGetName() { 60 virtual const char* onGetName() {
63 return "ref_cnt_heap"; 61 return "ref_cnt_heap";
64 } 62 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 191
194 /////////////////////////////////////////////////////////////////////////////// 192 ///////////////////////////////////////////////////////////////////////////////
195 193
196 DEF_BENCH( return new RefCntBench_Stack(); ) 194 DEF_BENCH( return new RefCntBench_Stack(); )
197 DEF_BENCH( return new RefCntBench_Heap(); ) 195 DEF_BENCH( return new RefCntBench_Heap(); )
198 DEF_BENCH( return new RefCntBench_New(); ) 196 DEF_BENCH( return new RefCntBench_New(); )
199 197
200 DEF_BENCH( return new WeakRefCntBench_Stack(); ) 198 DEF_BENCH( return new WeakRefCntBench_Stack(); )
201 DEF_BENCH( return new WeakRefCntBench_Heap(); ) 199 DEF_BENCH( return new WeakRefCntBench_Heap(); )
202 DEF_BENCH( return new WeakRefCntBench_New(); ) 200 DEF_BENCH( return new WeakRefCntBench_New(); )
OLDNEW
« no previous file with comments | « bench/GrResourceCacheBench.cpp ('k') | bench/SkBenchmark.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698