本文整理汇总了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());
}
示例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();
}
示例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);
}
示例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;
}
示例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);
}
}