Replace the layer. This is only valid for the root of a render object subtree (whatever object scheduleInitialPaint was called on).
This might be called if, e.g., the device pixel ratio changed.
Source
void replaceRootLayer(OffsetLayer rootLayer) { assert(attached); assert(parent is! RenderObject); assert(!owner._debugDoingPaint); assert(isRepaintBoundary); assert(_layer != null); // use scheduleInitialPaint the first time _layer = rootLayer; markNeedsPaint(); }