当前位置: 首页>>代码示例>>C++>>正文


C++ OwnPtrWillBeRawPtr::isEmpty方法代码示例

本文整理汇总了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));
}
开发者ID:joone,项目名称:blink-crosswalk,代码行数:34,代码来源:KeyframeEffect.cpp

示例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();
}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:9,代码来源:CSSAnimations.cpp

示例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();
    }
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:16,代码来源:RuleSet.cpp

示例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();
}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:23,代码来源:Animation.cpp


注:本文中的OwnPtrWillBeRawPtr::isEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。