本文整理汇总了C++中RenderLayerBacking::parentForSublayers方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderLayerBacking::parentForSublayers方法的具体用法?C++ RenderLayerBacking::parentForSublayers怎么用?C++ RenderLayerBacking::parentForSublayers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderLayerBacking
的用法示例。
在下文中一共展示了RenderLayerBacking::parentForSublayers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rebuildCompositingLayerTree
void RenderLayerCompositor::rebuildCompositingLayerTree(RenderLayer* layer, const CompositingState& compositingState, Vector<GraphicsLayer*>& childLayersOfEnclosingLayer)
{
// Make the layer compositing if necessary, and set up clipping and content layers.
// Note that we can only do work here that is independent of whether the descendant layers
// have been processed. computeCompositingRequirements() will already have done the repaint if necessary.
RenderLayerBacking* layerBacking = layer->backing();
if (layerBacking) {
// The compositing state of all our children has been updated already, so now
// we can compute and cache the composited bounds for this layer.
layerBacking->updateCompositedBounds();
if (RenderLayer* reflection = layer->reflectionLayer()) {
if (reflection->backing())
reflection->backing()->updateCompositedBounds();
}
layerBacking->updateGraphicsLayerConfiguration();
layerBacking->updateGraphicsLayerGeometry();
if (!layer->parent())
updateRootLayerPosition();
}
// If this layer has backing, then we are collecting its children, otherwise appending
// to the compositing child list of an enclosing layer.
Vector<GraphicsLayer*> layerChildren;
Vector<GraphicsLayer*>& childList = layerBacking ? layerChildren : childLayersOfEnclosingLayer;
CompositingState childState = compositingState;
if (layer->isComposited())
childState.m_compositingAncestor = layer;
#ifndef NDEBUG
++childState.m_depth;
#endif
// The children of this stacking context don't need to composite, unless there is
// a compositing layer among them, so start by assuming false.
childState.m_subtreeIsCompositing = false;
if (layer->isStackingContext()) {
ASSERT(!layer->m_zOrderListsDirty);
if (Vector<RenderLayer*>* negZOrderList = layer->negZOrderList()) {
size_t listSize = negZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = negZOrderList->at(i);
rebuildCompositingLayerTree(curLayer, childState, childList);
}
}
// If a negative z-order child is compositing, we get a foreground layer which needs to get parented.
if (layerBacking && layerBacking->foregroundLayer())
childList.append(layerBacking->foregroundLayer());
}
ASSERT(!layer->m_normalFlowListDirty);
if (Vector<RenderLayer*>* normalFlowList = layer->normalFlowList()) {
size_t listSize = normalFlowList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = normalFlowList->at(i);
rebuildCompositingLayerTree(curLayer, childState, childList);
}
}
if (layer->isStackingContext()) {
if (Vector<RenderLayer*>* posZOrderList = layer->posZOrderList()) {
size_t listSize = posZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = posZOrderList->at(i);
rebuildCompositingLayerTree(curLayer, childState, childList);
}
}
}
if (layerBacking) {
layerBacking->parentForSublayers()->setChildren(layerChildren);
childLayersOfEnclosingLayer.append(layerBacking->childForSuperlayers());
}
}