flushCompositingBits method Null safety

void flushCompositingBits()

Updates the RenderObject.needsCompositing bits.

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

Implementation

void flushCompositingBits() {
  if (!kReleaseMode) {
    Timeline.startSync('UPDATING COMPOSITING BITS');
  }
  _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();
  if (!kReleaseMode) {
    Timeline.finishSync();
  }
}