| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkAnimate.h" | 10 #include "SkAnimate.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 #ifdef SK_DUMP_ENABLED | 35 #ifdef SK_DUMP_ENABLED |
| 36 void SkAnimate::dump(SkAnimateMaker* maker) { | 36 void SkAnimate::dump(SkAnimateMaker* maker) { |
| 37 INHERITED::dump(maker); //from animateBase | 37 INHERITED::dump(maker); //from animateBase |
| 38 //SkSet inherits from this class | 38 //SkSet inherits from this class |
| 39 if (getType() != SkType_Set) { | 39 if (getType() != SkType_Set) { |
| 40 if (fMirror) | 40 if (fMirror) |
| 41 SkDebugf("mirror=\"true\" "); | 41 SkDebugf("mirror=\"true\" "); |
| 42 if (fReset) | 42 if (fReset) |
| 43 SkDebugf("reset=\"true\" "); | 43 SkDebugf("reset=\"true\" "); |
| 44 SkDebugf("dur=\"%g\" ", SkScalarToFloat(SkScalarDiv(dur,1000))); | 44 SkDebugf("dur=\"%g\" ", dur * 0.001); |
| 45 if (repeat != SK_Scalar1) | 45 if (repeat != SK_Scalar1) |
| 46 SkDebugf("repeat=\"%g\" ", SkScalarToFloat(repeat)); | 46 SkDebugf("repeat=\"%g\" ", SkScalarToFloat(repeat)); |
| 47 //if (fHasValues) | 47 //if (fHasValues) |
| 48 // SkDebugf("values=\"%s\" ", values); | 48 // SkDebugf("values=\"%s\" ", values); |
| 49 if (blend.count() != 1 || blend[0] != SK_Scalar1) { | 49 if (blend.count() != 1 || blend[0] != SK_Scalar1) { |
| 50 SkDebugf("blend=\"["); | 50 SkDebugf("blend=\"["); |
| 51 bool firstElem = true; | 51 bool firstElem = true; |
| 52 for (int i = 0; i < blend.count(); i++) { | 52 for (int i = 0; i < blend.count(); i++) { |
| 53 if (!firstElem) | 53 if (!firstElem) |
| 54 SkDebugf(","); | 54 SkDebugf(","); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 from.set("0"); | 102 from.set("0"); |
| 103 to.set("dur"); | 103 to.set("dur"); |
| 104 outType = SkType_MSec; | 104 outType = SkType_MSec; |
| 105 } | 105 } |
| 106 int max = fComponents * 2; | 106 int max = fComponents * 2; |
| 107 fValues.setCount(max); | 107 fValues.setCount(max); |
| 108 memset(fValues.begin(), 0, max * sizeof(fValues.begin()[0])); | 108 memset(fValues.begin(), 0, max * sizeof(fValues.begin()[0])); |
| 109 fFieldInfo->setValue(maker, &fValues, fFieldOffset, max, this, outType, from
); | 109 fFieldInfo->setValue(maker, &fValues, fFieldOffset, max, this, outType, from
); |
| 110 fFieldInfo->setValue(maker, &fValues, fComponents + fFieldOffset, max, this,
outType, to); | 110 fFieldInfo->setValue(maker, &fValues, fComponents + fFieldOffset, max, this,
outType, to); |
| 111 } | 111 } |
| OLD | NEW |