OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "Benchmark.h" | 7 #include "Benchmark.h" |
8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkColor.h" | 9 #include "SkColor.h" |
10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 break; | 203 break; |
204 } | 204 } |
205 SkAutoCanvasRestore ar(canvas, true/*save now*/); | 205 SkAutoCanvasRestore ar(canvas, true/*save now*/); |
206 canvas->clipRect(SkRect::MakeXYWH(x,y,256,256)); | 206 canvas->clipRect(SkRect::MakeXYWH(x,y,256,256)); |
207 fPic->playback(canvas); | 207 fPic->playback(canvas); |
208 } | 208 } |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 private: | 212 private: |
213 BBH fBBH; | 213 BBH fBBH; |
214 Mode fMode; | 214 Mode fMode; |
215 SkString fName; | 215 SkString fName; |
216 SkAutoTDelete<SkPicture> fPic; | 216 SkAutoTUnref<SkPicture> fPic; |
217 }; | 217 }; |
218 | 218 |
219 DEF_BENCH( return new TiledPlaybackBench(kNone, kRandom); ) | 219 DEF_BENCH( return new TiledPlaybackBench(kNone, kRandom); ) |
220 DEF_BENCH( return new TiledPlaybackBench(kNone, kTiled ); ) | 220 DEF_BENCH( return new TiledPlaybackBench(kNone, kTiled ); ) |
221 DEF_BENCH( return new TiledPlaybackBench(kRTree, kRandom); ) | 221 DEF_BENCH( return new TiledPlaybackBench(kRTree, kRandom); ) |
222 DEF_BENCH( return new TiledPlaybackBench(kRTree, kTiled ); ) | 222 DEF_BENCH( return new TiledPlaybackBench(kRTree, kTiled ); ) |
223 DEF_BENCH( return new TiledPlaybackBench(kTileGrid, kRandom); ) | 223 DEF_BENCH( return new TiledPlaybackBench(kTileGrid, kRandom); ) |
224 DEF_BENCH( return new TiledPlaybackBench(kTileGrid, kTiled ); ) | 224 DEF_BENCH( return new TiledPlaybackBench(kTileGrid, kTiled ); ) |
OLD | NEW |