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

Side by Side Diff: bench/SKPAnimationBench.cpp

Issue 1203193002: Add loopSKP flag to nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 6 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/SKPAnimationBench.h ('k') | bench/SKPBench.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "SKPAnimationBench.h" 8 #include "SKPAnimationBench.h"
9 #include "SkCommandLineFlags.h" 9 #include "SkCommandLineFlags.h"
10 #include "SkMultiPictureDraw.h" 10 #include "SkMultiPictureDraw.h"
11 #include "SkSurface.h" 11 #include "SkSurface.h"
12 12
13 SKPAnimationBench::SKPAnimationBench(const char* name, const SkPicture* pic, 13 SKPAnimationBench::SKPAnimationBench(const char* name, const SkPicture* pic, con st SkIRect& clip,
14 const SkIRect& clip, SkMatrix animationMatr ix, int steps) 14 SkMatrix animationMatrix, int steps, bool d oLooping)
15 : INHERITED(name, pic, clip, 1.0, false) 15 : INHERITED(name, pic, clip, 1.0, false, doLooping)
16 , fSteps(steps) 16 , fSteps(steps)
17 , fAnimationMatrix(animationMatrix) 17 , fAnimationMatrix(animationMatrix)
18 , fName(name) { 18 , fName(name) {
19 fUniqueName.printf("%s_animation", name); 19 fUniqueName.printf("%s_animation", name);
20 } 20 }
21 21
22 const char* SKPAnimationBench::onGetName() { 22 const char* SKPAnimationBench::onGetName() {
23 return fName.c_str(); 23 return fName.c_str();
24 } 24 }
25 25
(...skipping 25 matching lines...) Expand all
51 tileMatrix.postConcat(trans); 51 tileMatrix.postConcat(trans);
52 this->surfaces()[j]->getCanvas()->drawPicture(this->picture(), &tile Matrix, NULL); 52 this->surfaces()[j]->getCanvas()->drawPicture(this->picture(), &tile Matrix, NULL);
53 } 53 }
54 54
55 for (int j = 0; j < this->tileRects().count(); ++j) { 55 for (int j = 0; j < this->tileRects().count(); ++j) {
56 this->surfaces()[j]->getCanvas()->flush(); 56 this->surfaces()[j]->getCanvas()->flush();
57 } 57 }
58 currentMatrix.postConcat(frameMatrix); 58 currentMatrix.postConcat(frameMatrix);
59 } 59 }
60 } 60 }
OLDNEW
« no previous file with comments | « bench/SKPAnimationBench.h ('k') | bench/SKPBench.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698