本文整理汇总了C++中OwnPtrWillBeRawPtr::isEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ OwnPtrWillBeRawPtr::isEmpty方法的具体用法?C++ OwnPtrWillBeRawPtr::isEmpty怎么用?C++ OwnPtrWillBeRawPtr::isEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OwnPtrWillBeRawPtr
的用法示例。
在下文中一共展示了OwnPtrWillBeRawPtr::isEmpty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyEffects
void KeyframeEffect::applyEffects()
{
ASSERT(isInEffect());
ASSERT(animation());
if (!m_target || !m_model)
return;
// Cancel composited animation of transform if a motion path has been introduced on the element.
if (m_target->computedStyle()
&& m_target->computedStyle()->hasMotionPath()
&& animation()->hasActiveAnimationsOnCompositor()
&& animation()->affects(*m_target, CSSPropertyTransform)) {
animation()->cancelAnimationOnCompositor();
}
double iteration = currentIteration();
ASSERT(iteration >= 0);
OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> interpolations = m_sampledEffect ? m_sampledEffect->mutableInterpolations() : nullptr;
// FIXME: Handle iteration values which overflow int.
m_model->sample(static_cast<int>(iteration), timeFraction(), iterationDuration(), interpolations);
if (m_sampledEffect) {
m_sampledEffect->setInterpolations(interpolations.release());
} else if (interpolations && !interpolations->isEmpty()) {
OwnPtrWillBeRawPtr<SampledEffect> sampledEffect = SampledEffect::create(this, interpolations.release());
m_sampledEffect = sampledEffect.get();
ensureAnimationStack(m_target).add(sampledEffect.release());
} else {
return;
}
m_target->setNeedsAnimationStyleRecalc();
if (m_target->isSVGElement())
m_sampledEffect->applySVGUpdate(toSVGElement(*m_target));
}
示例2: adoptPtrWillBeNoop
PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> CSSAnimations::calculateUpdate(const Element* animatingElement, Element& element, const RenderStyle& style, RenderStyle* parentStyle, StyleResolver* resolver)
{
OwnPtrWillBeRawPtr<CSSAnimationUpdate> update = adoptPtrWillBeNoop(new CSSAnimationUpdate());
calculateAnimationUpdate(update.get(), animatingElement, element, style, parentStyle, resolver);
calculateAnimationActiveInterpolations(update.get(), animatingElement, element.document().timeline().currentTimeInternal());
calculateTransitionUpdate(update.get(), animatingElement, style);
calculateTransitionActiveInterpolations(update.get(), animatingElement, element.document().timeline().currentTimeInternal());
return update->isEmpty() ? nullptr : update.release();
}
示例3: compactPendingRules
void RuleSet::compactPendingRules(PendingRuleMap& pendingMap, CompactRuleMap& compactMap)
{
for (auto& item : pendingMap) {
OwnPtrWillBeRawPtr<WillBeHeapLinkedStack<RuleData>> pendingRules = item.value.release();
CompactRuleMap::ValueType* compactRules = compactMap.add(item.key, nullptr).storedValue;
WillBeHeapTerminatedArrayBuilder<RuleData> builder(compactRules->value.release());
builder.grow(pendingRules->size());
while (!pendingRules->isEmpty()) {
builder.append(pendingRules->peek());
pendingRules->pop();
}
compactRules->value = builder.release();
}
}
示例4: applyEffects
void Animation::applyEffects()
{
ASSERT(isInEffect());
ASSERT(player());
if (!m_target || !m_effect)
return;
double iteration = currentIteration();
ASSERT(iteration >= 0);
// FIXME: Handle iteration values which overflow int.
OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > interpolations = m_effect->sample(static_cast<int>(iteration), timeFraction(), iterationDuration());
if (m_sampledEffect) {
m_sampledEffect->setInterpolations(interpolations.release());
} else if (!interpolations->isEmpty()) {
OwnPtrWillBeRawPtr<SampledEffect> sampledEffect = SampledEffect::create(this, interpolations.release());
m_sampledEffect = sampledEffect.get();
ensureAnimationStack(m_target).add(sampledEffect.release());
} else {
return;
}
m_target->setNeedsAnimationStyleRecalc();
}