OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |