OLD | NEW |
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 "../private/SkAtomics.h" | 9 #include "SkAtomics.h" |
10 #include "SkRefCnt.h" | 10 #include "SkRefCnt.h" |
11 #include "SkWeakRefCnt.h" | 11 #include "SkWeakRefCnt.h" |
12 | 12 |
13 enum { | 13 enum { |
14 M = 2 | 14 M = 2 |
15 }; | 15 }; |
16 | 16 |
17 class AtomicInc32 : public Benchmark { | 17 class AtomicInc32 : public Benchmark { |
18 public: | 18 public: |
19 AtomicInc32() : fX(0) {} | 19 AtomicInc32() : fX(0) {} |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 DEF_BENCH( return new AtomicInc32(); ) | 240 DEF_BENCH( return new AtomicInc32(); ) |
241 DEF_BENCH( return new AtomicInc64(); ) | 241 DEF_BENCH( return new AtomicInc64(); ) |
242 | 242 |
243 DEF_BENCH( return new RefCntBench_Stack(); ) | 243 DEF_BENCH( return new RefCntBench_Stack(); ) |
244 DEF_BENCH( return new RefCntBench_Heap(); ) | 244 DEF_BENCH( return new RefCntBench_Heap(); ) |
245 DEF_BENCH( return new RefCntBench_New(); ) | 245 DEF_BENCH( return new RefCntBench_New(); ) |
246 | 246 |
247 DEF_BENCH( return new WeakRefCntBench_Stack(); ) | 247 DEF_BENCH( return new WeakRefCntBench_Stack(); ) |
248 DEF_BENCH( return new WeakRefCntBench_Heap(); ) | 248 DEF_BENCH( return new WeakRefCntBench_Heap(); ) |
249 DEF_BENCH( return new WeakRefCntBench_New(); ) | 249 DEF_BENCH( return new WeakRefCntBench_New(); ) |
OLD | NEW |