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

Side by Side Diff: src/animator/SkAnimateBase.cpp

Issue 111353003: deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPREC… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « samplecode/SampleText.cpp ('k') | src/animator/SkDisplayMath.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 /* 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 "SkAnimateBase.h" 10 #include "SkAnimateBase.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 fFieldInfo = fTarget->getMember(arrayStr.c_str()); 156 fFieldInfo = fTarget->getMember(arrayStr.c_str());
157 SkString scriptStr(arrayEnd + 1, lval.size() - arrayNameLen - 2); 157 SkString scriptStr(arrayEnd + 1, lval.size() - arrayNameLen - 2);
158 SkAnimatorScript::EvaluateInt(maker, this, scriptStr.c_str(), &fFieldOff set); 158 SkAnimatorScript::EvaluateInt(maker, this, scriptStr.c_str(), &fFieldOff set);
159 } 159 }
160 } 160 }
161 161
162 void SkAnimateBase::packARGB(SkScalar array[], int count, SkTDOperandArray* conv erted) 162 void SkAnimateBase::packARGB(SkScalar array[], int count, SkTDOperandArray* conv erted)
163 { 163 {
164 SkASSERT(count == 4); 164 SkASSERT(count == 4);
165 converted->setCount(1); 165 converted->setCount(1);
166 SkColor color = SkColorSetARGB(SkScalarRound(array[0]), SkScalarRound(array[ 1]), 166 SkColor color = SkColorSetARGB(SkScalarRoundToInt(array[0]),
167 SkScalarRound(array[2]), SkScalarRound(array[3])); 167 SkScalarRoundToInt(array[1]),
168 SkScalarRoundToInt(array[2]),
169 SkScalarRoundToInt(array[3]));
168 (*converted)[0].fS32 = color; 170 (*converted)[0].fS32 = color;
169 } 171 }
170 172
171 173
172 174
173 void SkAnimateBase::refresh(SkAnimateMaker& ) { 175 void SkAnimateBase::refresh(SkAnimateMaker& ) {
174 } 176 }
175 177
176 bool SkAnimateBase::setParent(SkDisplayable* apply) { 178 bool SkAnimateBase::setParent(SkDisplayable* apply) {
177 SkASSERT(apply->isApply()); 179 SkASSERT(apply->isApply());
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 return; 226 return;
225 } 227 }
226 if (fApply && fApply->getMode() != SkApply::kMode_create) 228 if (fApply && fApply->getMode() != SkApply::kMode_create)
227 target.reset(); 229 target.reset();
228 } 230 }
229 } 231 }
230 232
231 bool SkAnimateBase::targetNeedsInitialization() const { 233 bool SkAnimateBase::targetNeedsInitialization() const {
232 return false; 234 return false;
233 } 235 }
OLDNEW
« no previous file with comments | « samplecode/SampleText.cpp ('k') | src/animator/SkDisplayMath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698