本文整理汇总了C++中PaintLayer::isAllowedToQueryCompositingState方法的典型用法代码示例。如果您正苦于以下问题:C++ PaintLayer::isAllowedToQueryCompositingState方法的具体用法?C++ PaintLayer::isAllowedToQueryCompositingState怎么用?C++ PaintLayer::isAllowedToQueryCompositingState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PaintLayer
的用法示例。
在下文中一共展示了PaintLayer::isAllowedToQueryCompositingState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deprecatedCalculateTransformToLayer
AffineTransform SVGLayoutSupport::deprecatedCalculateTransformToLayer(
const LayoutObject* layoutObject) {
AffineTransform transform;
while (layoutObject) {
transform = layoutObject->localToSVGParentTransform() * transform;
if (layoutObject->isSVGRoot())
break;
layoutObject = layoutObject->parent();
}
// Continue walking up the layer tree, accumulating CSS transforms.
// FIXME: this queries layer compositing state - which is not
// supported during layout. Hence, the result may not include all CSS
// transforms.
PaintLayer* layer = layoutObject ? layoutObject->enclosingLayer() : 0;
while (layer && layer->isAllowedToQueryCompositingState()) {
// We can stop at compositing layers, to match the backing resolution.
// FIXME: should we be computing the transform to the nearest composited
// layer, or the nearest composited layer that does not paint into its
// ancestor? I think this is the nearest composited ancestor since we will
// inherit its transforms in the composited layer tree.
if (layer->compositingState() != NotComposited)
break;
if (TransformationMatrix* layerTransform = layer->transform())
transform = layerTransform->toAffineTransform() * transform;
layer = layer->parent();
}
return transform;
}
示例2: paintLayers
static void paintLayers(PaintLayer& layer, SimDisplayItemList& displayList)
{
if (layer.isAllowedToQueryCompositingState() && layer.compositingState() == PaintsIntoOwnBacking) {
CompositedLayerMapping* mapping = layer.compositedLayerMapping();
GraphicsLayer* graphicsLayer = mapping->mainGraphicsLayer();
if (graphicsLayer->hasTrackedPaintInvalidations()) {
ContentLayerDelegate* delegate = graphicsLayer->contentLayerDelegateForTesting();
delegate->paintContents(&displayList, WebRect(0, 0, layer.size().width(), layer.size().height()));
graphicsLayer->resetTrackedPaintInvalidations();
}
}
for (PaintLayer* child = layer.firstChild(); child; child = child->nextSibling())
paintLayers(*child, displayList);
}
示例3: canAttachCompositedLayers
bool CompositorAnimations::canAttachCompositedLayers(const Element& element, const Animation& animation)
{
if (!RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled())
return false;
if (!animation.compositorPlayer())
return false;
if (!element.layoutObject() || !element.layoutObject()->isBoxModelObject())
return false;
PaintLayer* layer = toLayoutBoxModelObject(element.layoutObject())->layer();
if (!layer || !layer->isAllowedToQueryCompositingState()
|| !layer->compositedLayerMapping()
|| !layer->compositedLayerMapping()->mainGraphicsLayer())
return false;
if (!layer->compositedLayerMapping()->mainGraphicsLayer()->platformLayer())
return false;
return true;
}