本文整理汇总了C++中SkAnimateBase::hasExecute方法的典型用法代码示例。如果您正苦于以下问题:C++ SkAnimateBase::hasExecute方法的具体用法?C++ SkAnimateBase::hasExecute怎么用?C++ SkAnimateBase::hasExecute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkAnimateBase
的用法示例。
在下文中一共展示了SkAnimateBase::hasExecute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyValues
void SkApply::applyValues(int animatorIndex, SkOperand* values, int count,
SkDisplayTypes valuesType, SkMSec time)
{
SkAnimateBase* animator = fActive->fAnimators[animatorIndex];
const SkMemberInfo * info = animator->fFieldInfo;
SkASSERT(animator);
SkASSERT(info != NULL);
SkDisplayTypes type = (SkDisplayTypes) info->fType;
SkDisplayable* target = getTarget(animator);
if (animator->hasExecute() || type == SkType_MemberFunction || type == SkType_MemberProperty) {
SkDisplayable* executor = animator->hasExecute() ? animator : target;
if (type != SkType_MemberProperty) {
SkTDArray<SkScriptValue> typedValues;
for (int index = 0; index < count; index++) {
SkScriptValue temp;
temp.fType = valuesType;
temp.fOperand = values[index];
*typedValues.append() = temp;
}
executor->executeFunction(target, info->functionIndex(), typedValues, info->getType(), NULL);
} else {
SkScriptValue scriptValue;
scriptValue.fOperand = values[0];
scriptValue.fType = info->getType();
target->setProperty(info->propertyIndex(), scriptValue);
}
} else {
SkTypedArray converted;
if (type == SkType_ARGB) {
if (count == 4) {
// !!! assert that it is SkType_Float ?
animator->packARGB(&values->fScalar, count, &converted);
values = converted.begin();
count = converted.count();
} else {
SkASSERT(count == 1);
}
}
// SkASSERT(type == SkType_ARGB || type == SkType_String ||info->isSettable());
if (type == SkType_String || type == SkType_DynamicString)
info->setString(target, values->fString);
else if (type == SkType_Drawable || type == SkType_Displayable)
target->setReference(info, values->fDisplayable);
else
info->setValue(target, values, count);
}
}