shouldConvertToRepaintBoundary property
Whether should create repaintBoundary for this element when style changed
Implementation
bool get shouldConvertToRepaintBoundary {
// Following cases should always convert to repaint boundary for performance consideration
// Intrinsic element such as Canvas
bool isSetRepaintSelf = repaintSelf;
// Scrolling box
bool isScrollingBox = scrollingContentLayoutBox != null;
// Transform element
bool hasTransform = renderBoxModel?.renderStyle.transform != null;
// Fixed element
bool isPositionedFixed = renderBoxModel?.renderStyle.position == CSSPositionType.fixed;
return isScrollingBox || isSetRepaintSelf || hasTransform || isPositionedFixed;
}