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 | 7 |
8 #include "Benchmark.h" | 8 #include "Benchmark.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkChunkAlloc.h" | 10 #include "SkChunkAlloc.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 , fWrite(write) | 80 , fWrite(write) |
81 , fUseCalloc(useCalloc) { | 81 , fUseCalloc(useCalloc) { |
82 fName.printf("memory_%s", useCalloc ? "calloc" : "malloc_bzero"); | 82 fName.printf("memory_%s", useCalloc ? "calloc" : "malloc_bzero"); |
83 if (read && write) { | 83 if (read && write) { |
84 fName.appendf("_rw"); | 84 fName.appendf("_rw"); |
85 } else if (read) { | 85 } else if (read) { |
86 fName.appendf("_r"); | 86 fName.appendf("_r"); |
87 } else if (write) { | 87 } else if (write) { |
88 fName.appendf("_w"); | 88 fName.appendf("_w"); |
89 } | 89 } |
90 fName.appendf("_"SK_SIZE_T_SPECIFIER, num); | 90 fName.appendf("_" SK_SIZE_T_SPECIFIER, num); |
91 } | 91 } |
92 | 92 |
93 virtual bool isSuitableFor(Backend backend) SK_OVERRIDE { | 93 virtual bool isSuitableFor(Backend backend) SK_OVERRIDE { |
94 return backend == kNonRendering_Backend; | 94 return backend == kNonRendering_Backend; |
95 } | 95 } |
96 | 96 |
97 protected: | 97 protected: |
98 virtual const char* onGetName() SK_OVERRIDE { | 98 virtual const char* onGetName() SK_OVERRIDE { |
99 return fName.c_str(); | 99 return fName.c_str(); |
100 } | 100 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 DEF_BENCH(return new ZerosBench(300, 1, 1, 1)) | 156 DEF_BENCH(return new ZerosBench(300, 1, 1, 1)) |
157 | 157 |
158 DEF_BENCH(return new ZerosBench(4, 0, 0, 0)) | 158 DEF_BENCH(return new ZerosBench(4, 0, 0, 0)) |
159 DEF_BENCH(return new ZerosBench(4, 0, 0, 1)) | 159 DEF_BENCH(return new ZerosBench(4, 0, 0, 1)) |
160 DEF_BENCH(return new ZerosBench(4, 0, 1, 0)) | 160 DEF_BENCH(return new ZerosBench(4, 0, 1, 0)) |
161 DEF_BENCH(return new ZerosBench(4, 0, 1, 1)) | 161 DEF_BENCH(return new ZerosBench(4, 0, 1, 1)) |
162 DEF_BENCH(return new ZerosBench(4, 1, 0, 0)) | 162 DEF_BENCH(return new ZerosBench(4, 1, 0, 0)) |
163 DEF_BENCH(return new ZerosBench(4, 1, 0, 1)) | 163 DEF_BENCH(return new ZerosBench(4, 1, 0, 1)) |
164 DEF_BENCH(return new ZerosBench(4, 1, 1, 0)) | 164 DEF_BENCH(return new ZerosBench(4, 1, 1, 0)) |
165 DEF_BENCH(return new ZerosBench(4, 1, 1, 1)) | 165 DEF_BENCH(return new ZerosBench(4, 1, 1, 1)) |
OLD | NEW |