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

Side by Side Diff: bench/SKPBench.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/SKPBench.h ('k') | bench/ScalarBench.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 "SKPBench.h" 8 #include "SKPBench.h"
9 #include "SkCommandLineFlags.h" 9 #include "SkCommandLineFlags.h"
10 #include "SkMultiPictureDraw.h" 10 #include "SkMultiPictureDraw.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 bool SKPBench::isSuitableFor(Backend backend) { 99 bool SKPBench::isSuitableFor(Backend backend) {
100 return backend != kNonRendering_Backend; 100 return backend != kNonRendering_Backend;
101 } 101 }
102 102
103 SkIPoint SKPBench::onGetSize() { 103 SkIPoint SKPBench::onGetSize() {
104 return SkIPoint::Make(fClip.width(), fClip.height()); 104 return SkIPoint::Make(fClip.width(), fClip.height());
105 } 105 }
106 106
107 void SKPBench::onDraw(const int loops, SkCanvas* canvas) { 107 void SKPBench::onDraw(int loops, SkCanvas* canvas) {
108 SkASSERT(fDoLooping || 1 == loops); 108 SkASSERT(fDoLooping || 1 == loops);
109 if (fUseMultiPictureDraw) { 109 if (fUseMultiPictureDraw) {
110 for (int i = 0; i < loops; i++) { 110 for (int i = 0; i < loops; i++) {
111 this->drawMPDPicture(); 111 this->drawMPDPicture();
112 } 112 }
113 } else { 113 } else {
114 for (int i = 0; i < loops; i++) { 114 for (int i = 0; i < loops; i++) {
115 this->drawPicture(); 115 this->drawPicture();
116 } 116 }
117 } 117 }
(...skipping 20 matching lines...) Expand all
138 for (int j = 0; j < fTileRects.count(); ++j) { 138 for (int j = 0; j < fTileRects.count(); ++j) {
139 const SkMatrix trans = SkMatrix::MakeTrans(-fTileRects[j].fLeft / fScale , 139 const SkMatrix trans = SkMatrix::MakeTrans(-fTileRects[j].fLeft / fScale ,
140 -fTileRects[j].fTop / fScale) ; 140 -fTileRects[j].fTop / fScale) ;
141 fSurfaces[j]->getCanvas()->drawPicture(fPic, &trans, nullptr); 141 fSurfaces[j]->getCanvas()->drawPicture(fPic, &trans, nullptr);
142 } 142 }
143 143
144 for (int j = 0; j < fTileRects.count(); ++j) { 144 for (int j = 0; j < fTileRects.count(); ++j) {
145 fSurfaces[j]->getCanvas()->flush(); 145 fSurfaces[j]->getCanvas()->flush();
146 } 146 }
147 } 147 }
OLDNEW
« no previous file with comments | « bench/SKPBench.h ('k') | bench/ScalarBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698