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

Side by Side Diff: bench/RecordingBench.cpp

Issue 1379923005: Remove const from `const int loops`. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: n too Created 5 years, 2 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/RecordingBench.h ('k') | bench/RectBench.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 2014 Google Inc. 2 * Copyright 2014 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 "RecordingBench.h" 8 #include "RecordingBench.h"
9 9
10 #include "SkBBHFactory.h" 10 #include "SkBBHFactory.h"
(...skipping 10 matching lines...) Expand all
21 21
22 bool RecordingBench::isSuitableFor(Backend backend) { 22 bool RecordingBench::isSuitableFor(Backend backend) {
23 return backend == kNonRendering_Backend; 23 return backend == kNonRendering_Backend;
24 } 24 }
25 25
26 SkIPoint RecordingBench::onGetSize() { 26 SkIPoint RecordingBench::onGetSize() {
27 return SkIPoint::Make(SkScalarCeilToInt(fSrc->cullRect().width()), 27 return SkIPoint::Make(SkScalarCeilToInt(fSrc->cullRect().width()),
28 SkScalarCeilToInt(fSrc->cullRect().height())); 28 SkScalarCeilToInt(fSrc->cullRect().height()));
29 } 29 }
30 30
31 void RecordingBench::onDraw(const int loops, SkCanvas*) { 31 void RecordingBench::onDraw(int loops, SkCanvas*) {
32 SkRTreeFactory factory; 32 SkRTreeFactory factory;
33 const SkScalar w = fSrc->cullRect().width(), 33 const SkScalar w = fSrc->cullRect().width(),
34 h = fSrc->cullRect().height(); 34 h = fSrc->cullRect().height();
35 35
36 uint32_t flags = SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag 36 uint32_t flags = SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag
37 | SkPictureRecorder::kPlaybackDrawPicture_RecordFlag; 37 | SkPictureRecorder::kPlaybackDrawPicture_RecordFlag;
38 for (int i = 0; i < loops; i++) { 38 for (int i = 0; i < loops; i++) {
39 SkPictureRecorder recorder; 39 SkPictureRecorder recorder;
40 fSrc->playback(recorder.beginRecording(w, h, fUseBBH ? &factory : nullpt r, flags)); 40 fSrc->playback(recorder.beginRecording(w, h, fUseBBH ? &factory : nullpt r, flags));
41 SkSafeUnref(recorder.endRecording()); 41 SkSafeUnref(recorder.endRecording());
42 } 42 }
43 } 43 }
OLDNEW
« no previous file with comments | « bench/RecordingBench.h ('k') | bench/RectBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698