flushCompositingBits method

void flushCompositingBits()

Updates the RenderObject.needsCompositing bits.

Called as part of the rendering pipeline after flushLayout and before flushPaint.

Implementation

void flushCompositingBits() {
  if (!kReleaseMode) {
    FlutterTimeline.startSync('UPDATING COMPOSITING BITS$_debugRootSuffixForTimelineEventNames');
  }
  _nodesNeedingCompositingBitsUpdate.sort((RenderObject a, RenderObject b) => a.depth - b.depth);
  for (final RenderObject node in _nodesNeedingCompositingBitsUpdate) {
    if (node._needsCompositingBitsUpdate && node.owner == this) {
      node._updateCompositingBits();
    }
  }
  _nodesNeedingCompositingBitsUpdate.clear();
  for (final PipelineOwner child in _children) {
    child.flushCompositingBits();
  }
  assert(_nodesNeedingCompositingBitsUpdate.isEmpty, 'Child PipelineOwners must not dirty nodes in their parent.');
  if (!kReleaseMode) {
    FlutterTimeline.finishSync();
  }
}