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

Side by Side Diff: bench/PicturePlaybackBench.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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/PerlinNoiseBench.cpp ('k') | bench/RTreeBench.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 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 22 matching lines...) Expand all
33 TEXT_SIZE = 10 33 TEXT_SIZE = 10
34 }; 34 };
35 protected: 35 protected:
36 virtual const char* onGetName() { 36 virtual const char* onGetName() {
37 return fName.c_str(); 37 return fName.c_str();
38 } 38 }
39 39
40 virtual void onDraw(const int loops, SkCanvas* canvas) { 40 virtual void onDraw(const int loops, SkCanvas* canvas) {
41 41
42 SkPictureRecorder recorder; 42 SkPictureRecorder recorder;
43 SkCanvas* pCanvas = recorder.beginRecording(PICTURE_WIDTH, PICTURE_HEIGH T, NULL, 0); 43 SkCanvas* pCanvas = recorder.beginRecording(PICTURE_WIDTH, PICTURE_HEIGH T, nullptr, 0);
44 this->recordCanvas(pCanvas); 44 this->recordCanvas(pCanvas);
45 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); 45 SkAutoTUnref<SkPicture> picture(recorder.endRecording());
46 46
47 const SkPoint translateDelta = getTranslateDelta(loops); 47 const SkPoint translateDelta = getTranslateDelta(loops);
48 48
49 for (int i = 0; i < loops; i++) { 49 for (int i = 0; i < loops; i++) {
50 picture->playback(canvas); 50 picture->playback(canvas);
51 canvas->translate(translateDelta.fX, translateDelta.fY); 51 canvas->translate(translateDelta.fX, translateDelta.fY);
52 } 52 }
53 } 53 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 BBH fBBH; 210 BBH fBBH;
211 Mode fMode; 211 Mode fMode;
212 SkString fName; 212 SkString fName;
213 SkAutoTUnref<SkPicture> fPic; 213 SkAutoTUnref<SkPicture> fPic;
214 }; 214 };
215 215
216 DEF_BENCH( return new TiledPlaybackBench(kNone, kRandom); ) 216 DEF_BENCH( return new TiledPlaybackBench(kNone, kRandom); )
217 DEF_BENCH( return new TiledPlaybackBench(kNone, kTiled ); ) 217 DEF_BENCH( return new TiledPlaybackBench(kNone, kTiled ); )
218 DEF_BENCH( return new TiledPlaybackBench(kRTree, kRandom); ) 218 DEF_BENCH( return new TiledPlaybackBench(kRTree, kRandom); )
219 DEF_BENCH( return new TiledPlaybackBench(kRTree, kTiled ); ) 219 DEF_BENCH( return new TiledPlaybackBench(kRTree, kTiled ); )
OLDNEW
« no previous file with comments | « bench/PerlinNoiseBench.cpp ('k') | bench/RTreeBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698