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

Side by Side Diff: tools/PictureBenchmark.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 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 | « tests/skia_test.cpp ('k') | tools/PictureRenderer.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 7
8 #include "Timer.h" 8 #include "Timer.h"
9 #include "PictureBenchmark.h" 9 #include "PictureBenchmark.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 26 matching lines...) Expand all
37 fTimerTypes |= wall ? TimerData::kWall_Flag : 0; 37 fTimerTypes |= wall ? TimerData::kWall_Flag : 0;
38 fTimerTypes |= truncatedWall ? TimerData::kTruncatedWall_Flag : 0; 38 fTimerTypes |= truncatedWall ? TimerData::kTruncatedWall_Flag : 0;
39 fTimerTypes |= cpu ? TimerData::kCpu_Flag : 0; 39 fTimerTypes |= cpu ? TimerData::kCpu_Flag : 0;
40 fTimerTypes |= truncatedCpu ? TimerData::kTruncatedCpu_Flag : 0; 40 fTimerTypes |= truncatedCpu ? TimerData::kTruncatedCpu_Flag : 0;
41 fTimerTypes |= gpu ? TimerData::kGpu_Flag : 0; 41 fTimerTypes |= gpu ? TimerData::kGpu_Flag : 0;
42 } 42 }
43 43
44 Timer* PictureBenchmark::setupTimer(bool useGLTimer) { 44 Timer* PictureBenchmark::setupTimer(bool useGLTimer) {
45 #if SK_SUPPORT_GPU 45 #if SK_SUPPORT_GPU
46 if (useGLTimer && fRenderer != NULL && fRenderer->isUsingGpuDevice()) { 46 if (useGLTimer && fRenderer != NULL && fRenderer->isUsingGpuDevice()) {
47 return SkNEW_ARGS(Timer, (fRenderer->getGLContext())); 47 return new Timer(fRenderer->getGLContext());
48 } 48 }
49 #endif 49 #endif
50 return SkNEW_ARGS(Timer, (NULL)); 50 return new Timer(NULL);
51 } 51 }
52 52
53 PictureRenderer* PictureBenchmark::setRenderer(sk_tools::PictureRenderer* render er) { 53 PictureRenderer* PictureBenchmark::setRenderer(sk_tools::PictureRenderer* render er) {
54 SkRefCnt_SafeAssign(fRenderer, renderer); 54 SkRefCnt_SafeAssign(fRenderer, renderer);
55 return renderer; 55 return renderer;
56 } 56 }
57 57
58 void PictureBenchmark::run(SkPicture* pict, bool useMultiPictureDraw) { 58 void PictureBenchmark::run(SkPicture* pict, bool useMultiPictureDraw) {
59 SkASSERT(pict); 59 SkASSERT(pict);
60 if (NULL == pict) { 60 if (NULL == pict) {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 fTimerResult, 237 fTimerResult,
238 timerTypes, 238 timerTypes,
239 numInnerLoops); 239 numInnerLoops);
240 #endif 240 #endif
241 } 241 }
242 242
243 fRenderer->end(); 243 fRenderer->end();
244 } 244 }
245 245
246 } 246 }
OLDNEW
« no previous file with comments | « tests/skia_test.cpp ('k') | tools/PictureRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698