本文整理汇总了C++中HTMLMediaElement::IsPotentiallyPlaying方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLMediaElement::IsPotentiallyPlaying方法的具体用法?C++ HTMLMediaElement::IsPotentiallyPlaying怎么用?C++ HTMLMediaElement::IsPotentiallyPlaying使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLMediaElement
的用法示例。
在下文中一共展示了HTMLMediaElement::IsPotentiallyPlaying方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetLayerState
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const FrameLayerBuilder::ContainerParameters& aParameters)
{
if (aManager->IsCompositingCheap()) {
// Since ImageLayers don't require additional memory of the
// video frames we have to have anyway, we can't save much by
// making layers inactive. Also, for many accelerated layer
// managers calling imageContainer->GetCurrentAsSurface can be
// very expensive. So just always be active when compositing is
// cheap (i.e. hardware accelerated).
return LAYER_ACTIVE;
}
HTMLMediaElement* elem =
static_cast<HTMLMediaElement*>(mFrame->GetContent());
return elem->IsPotentiallyPlaying() ? LAYER_ACTIVE_FORCE : LAYER_INACTIVE;
}