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


C++ PassRefPtrWillBeRawPtr::endTime方法代码示例

本文整理汇总了C++中PassRefPtrWillBeRawPtr::endTime方法的典型用法代码示例。如果您正苦于以下问题:C++ PassRefPtrWillBeRawPtr::endTime方法的具体用法?C++ PassRefPtrWillBeRawPtr::endTime怎么用?C++ PassRefPtrWillBeRawPtr::endTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PassRefPtrWillBeRawPtr的用法示例。


在下文中一共展示了PassRefPtrWillBeRawPtr::endTime方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: add

bool TextTrackCueList::add(PassRefPtrWillBeRawPtr<TextTrackCue> cue)
{
    ASSERT(cue->startTime() >= 0);
    ASSERT(cue->endTime() >= 0);

    return add(cue, 0, m_list.size());
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:7,代码来源:TextTrackCueList.cpp

示例2: cueIsBefore

static bool cueIsBefore(const TextTrackCue* cue, PassRefPtrWillBeRawPtr<TextTrackCue> otherCue)
{
    if (cue->startTime() < otherCue->startTime())
        return true;

    return cue->startTime() == otherCue->startTime() && cue->endTime() > otherCue->endTime();
}
开发者ID:alexanderbill,项目名称:blink-crosswalk,代码行数:7,代码来源:TextTrackCueList.cpp

示例3: addCueInternal

void CueTimeline::addCueInternal(PassRefPtrWillBeRawPtr<TextTrackCue> cue)
{
    // Negative duration cues need be treated in the interval tree as
    // zero-length cues.
    double endTime = std::max(cue->startTime(), cue->endTime());

    CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
    if (!m_cueTree.contains(interval))
        m_cueTree.add(interval);
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:10,代码来源:CueTimeline.cpp

示例4: add

bool TextTrackCueList::add(PassRefPtrWillBeRawPtr<TextTrackCue> cue)
{
    ASSERT(cue->startTime() >= 0);
    ASSERT(cue->endTime() >= 0);

    // Maintain text track cue order:
    // https://html.spec.whatwg.org/#text-track-cue-order
    size_t index = findInsertionIndex(cue.get());

    // FIXME: The cue should not exist in the list in the first place.
    if (!m_list.isEmpty() && (index > 0) && (m_list[index - 1].get() == cue.get()))
        return false;

    m_list.insert(index, cue);
    invalidateCueIndex(index);
    return true;
}
开发者ID:alexanderbill,项目名称:blink-crosswalk,代码行数:17,代码来源:TextTrackCueList.cpp

示例5: removeCueInternal

void CueTimeline::removeCueInternal(PassRefPtrWillBeRawPtr<TextTrackCue> cue)
{
    // Negative duration cues need to be treated in the interval tree as
    // zero-length cues.
    double endTime = std::max(cue->startTime(), cue->endTime());

    CueInterval interval = m_cueTree.createInterval(cue->startTime(), endTime, cue.get());
    m_cueTree.remove(interval);

    size_t index = m_currentlyActiveCues.find(interval);
    if (index != kNotFound) {
        ASSERT(cue->isActive());
        m_currentlyActiveCues.remove(index);
        cue->setIsActive(false);
        // Since the cue will be removed from the media element and likely the
        // TextTrack might also be destructed, notifying the region of the cue
        // removal shouldn't be done.
        cue->removeDisplayTree(TextTrackCue::DontNotifyRegion);
    }
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:20,代码来源:CueTimeline.cpp


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