paintChild method

void paintChild (RenderObject child, Offset offset)

Paint a child RenderObject.

If the child has its own composited layer, the child will be composited into the layer subtree associated with this painting context. Otherwise, the child will be painted into the current PictureLayer for this context.

Implementation

void paintChild(RenderObject child, Offset offset) {
  assert(() {
    if (debugProfilePaintsEnabled)
      Timeline.startSync('${child.runtimeType}', arguments: timelineWhitelistArguments);
    if (debugOnProfilePaint != null)
      debugOnProfilePaint(child);
    return true;
  }());

  if (child.isRepaintBoundary) {
    stopRecordingIfNeeded();
    _compositeChild(child, offset);
  } else {
    child._paintWithContext(this, offset);
  }

  assert(() {
    if (debugProfilePaintsEnabled)
      Timeline.finishSync();
    return true;
  }());
}