Unverified Commit 96ebfec1 authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Add diagnostics around needsCompositing (#32656)

Added diagnostic output for needsCompositing to RenderObject diagnostics output.
parent 894dca77
......@@ -2577,6 +2577,8 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
header += ' NEEDS-LAYOUT';
if (_needsPaint)
header += ' NEEDS-PAINT';
if (_needsCompositingBitsUpdate)
header += ' NEEDS-COMPOSITING-BITS-UPDATE';
if (!attached)
header += ' DETACHED';
return header;
......@@ -2640,6 +2642,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
@override
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
super.debugFillProperties(properties);
properties.add(FlagProperty('needsCompositing', value: _needsCompositing, ifTrue: 'needs compositing'));
properties.add(DiagnosticsProperty<dynamic>('creator', debugCreator, defaultValue: null, level: DiagnosticLevel.debug));
properties.add(DiagnosticsProperty<ParentData>('parentData', parentData, tooltip: _debugCanParentUseSize == true ? 'can use size' : null, missingIfNull: true));
properties.add(DiagnosticsProperty<Constraints>('constraints', constraints, missingIfNull: true));
......
......@@ -32,7 +32,7 @@ void main() {
expect(
parent.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes(
'RenderConstrainedOverflowBox#00000 NEEDS-PAINT\n'
'RenderConstrainedOverflowBox#00000 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
......@@ -42,7 +42,7 @@ void main() {
' │ minHeight: 0.0\n'
' │ maxHeight: Infinity\n'
' │\n'
' └─child: RenderLimitedBox#00000 relayoutBoundary=up1 NEEDS-PAINT\n'
' └─child: RenderLimitedBox#00000 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ parentData: offset=Offset(350.0, 200.0) (can use size)\n'
' │ constraints: BoxConstraints(unconstrained)\n'
' │ size: Size(100.0, 200.0)\n'
......@@ -118,7 +118,7 @@ void main() {
expect(
parent.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes(
'RenderConstrainedOverflowBox#00000 NEEDS-PAINT\n'
'RenderConstrainedOverflowBox#00000 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
......@@ -154,7 +154,7 @@ void main() {
expect(
parent.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes(
'RenderConstrainedOverflowBox#00000 NEEDS-PAINT\n'
'RenderConstrainedOverflowBox#00000 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
......
......@@ -21,6 +21,7 @@ void main() {
root.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes(
'RenderViewport#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n'
' needs compositing\n'
' parentData: MISSING\n'
' constraints: MISSING\n'
' size: MISSING\n'
......@@ -37,6 +38,7 @@ void main() {
root.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes(
'RenderViewport#00000 NEEDS-LAYOUT NEEDS-PAINT\n'
' needs compositing\n'
' parentData: <none>\n'
' constraints: BoxConstraints(w=800.0, h=600.0)\n'
' size: Size(800.0, 600.0)\n'
......@@ -73,7 +75,8 @@ void main() {
expect(
root.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes(
'RenderViewport#00000 NEEDS-PAINT\n'
'RenderViewport#00000 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ needs compositing\n'
' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
......@@ -82,7 +85,7 @@ void main() {
' │ offset: _FixedViewportOffset#00000(offset: 0.0)\n'
' │ anchor: 0.0\n'
' │\n'
' ├─center child: RenderSliverToBoxAdapter#00000 relayoutBoundary=up1 NEEDS-PAINT\n'
' ├─center child: RenderSliverToBoxAdapter#00000 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n'
' │ │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
......@@ -98,7 +101,7 @@ void main() {
' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ size: Size(800.0, 400.0)\n'
' │\n'
' ├─child 1: RenderSliverToBoxAdapter#00000 relayoutBoundary=up1 NEEDS-PAINT\n'
' ├─child 1: RenderSliverToBoxAdapter#00000 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ │ parentData: paintOffset=Offset(0.0, 400.0) (can use size)\n'
' │ │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
......@@ -115,7 +118,7 @@ void main() {
' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ size: Size(800.0, 400.0)\n'
' │\n'
' ├─child 2: RenderSliverToBoxAdapter#00000 relayoutBoundary=up1 NEEDS-PAINT\n'
' ├─child 2: RenderSliverToBoxAdapter#00000 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ │ parentData: paintOffset=Offset(0.0, 800.0) (can use size)\n'
' │ │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
......@@ -132,7 +135,7 @@ void main() {
' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ size: Size(800.0, 400.0)\n'
' │\n'
' ├─child 3: RenderSliverToBoxAdapter#00000 relayoutBoundary=up1 NEEDS-PAINT\n'
' ├─child 3: RenderSliverToBoxAdapter#00000 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ │ parentData: paintOffset=Offset(0.0, 1200.0) (can use size)\n'
' │ │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
......@@ -148,7 +151,7 @@ void main() {
' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ size: Size(800.0, 400.0)\n'
' │\n'
' └─child 4: RenderSliverToBoxAdapter#00000 relayoutBoundary=up1 NEEDS-PAINT\n'
' └─child 4: RenderSliverToBoxAdapter#00000 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ parentData: paintOffset=Offset(0.0, 1600.0) (can use size)\n'
' │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
......
......@@ -91,7 +91,7 @@ void main() {
expect(
table.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes(
'RenderTable#00000 relayoutBoundary=up1 NEEDS-PAINT\n'
'RenderTable#00000 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE\n'
' │ parentData: offset=Offset(335.0, 185.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=800.0, 0.0<=h<=600.0)\n'
' │ size: Size(130.0, 230.0)\n'
......
......@@ -323,6 +323,7 @@ void main() {
box.toStringDeep(minLevel: DiagnosticLevel.hidden),
equalsIgnoringHashCodes(
'RenderPadding#00000 relayoutBoundary=up1\n'
' │ needsCompositing: false\n'
' │ creator: Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=800.0, 0.0<=h<=600.0)\n'
......@@ -335,6 +336,7 @@ void main() {
' │ textDirection: null\n'
' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up2\n'
' │ needsCompositing: false\n'
' │ creator: ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(5.0, 5.0) (can use size)\n'
' │ constraints: BoxConstraints(0.0<=w<=790.0, 0.0<=h<=590.0)\n'
......@@ -346,6 +348,7 @@ void main() {
' │ additionalConstraints: BoxConstraints(w=53.0, h=78.0)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' │ needsCompositing: false\n'
' │ creator: DecoratedBox ← ConstrainedBox ← Padding ← Container ←\n'
' │ Align ← [root]\n'
' │ parentData: <none> (can use size)\n'
......@@ -368,6 +371,7 @@ void main() {
' │ android)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' │ needsCompositing: false\n'
' │ creator: DecoratedBox ← DecoratedBox ← ConstrainedBox ← Padding ←\n'
' │ Container ← Align ← [root]\n'
' │ parentData: <none> (can use size)\n'
......@@ -390,6 +394,7 @@ void main() {
' │ android)\n'
' │\n'
' └─child: RenderPadding#00000\n'
' │ needsCompositing: false\n'
' │ creator: Padding ← DecoratedBox ← DecoratedBox ← ConstrainedBox ←\n'
' │ Padding ← Container ← Align ← [root]\n'
' │ parentData: <none> (can use size)\n'
......@@ -403,6 +408,7 @@ void main() {
' │ textDirection: null\n'
' │\n'
' └─child: RenderPositionedBox#00000\n'
' │ needsCompositing: false\n'
' │ creator: Align ← Padding ← DecoratedBox ← DecoratedBox ←\n'
' │ ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(7.0, 7.0) (can use size)\n'
......@@ -418,6 +424,7 @@ void main() {
' │ heightFactor: expand\n'
' │\n'
' └─child: RenderConstrainedBox#00000 relayoutBoundary=up1\n'
' │ needsCompositing: false\n'
' │ creator: SizedBox ← Align ← Padding ← DecoratedBox ← DecoratedBox\n'
' │ ← ConstrainedBox ← Padding ← Container ← Align ← [root]\n'
' │ parentData: offset=Offset(14.0, 31.0) (can use size)\n'
......@@ -430,6 +437,7 @@ void main() {
' │ additionalConstraints: BoxConstraints(w=25.0, h=33.0)\n'
' │\n'
' └─child: RenderDecoratedBox#00000\n'
' needsCompositing: false\n'
' creator: DecoratedBox ← SizedBox ← Align ← Padding ← DecoratedBox\n'
' ← DecoratedBox ← ConstrainedBox ← Padding ← Container ← Align ←\n'
' [root]\n'
......
......@@ -208,6 +208,7 @@ void main() {
' │ configuration: Size(800.0, 600.0) at 3.0x (in logical pixels)\n'
' │\n'
' └─child: RenderRepaintBoundary#00000\n'
' │ needs compositing\n'
' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n'
......@@ -217,11 +218,13 @@ void main() {
' │ repaints)\n'
' │\n'
' └─child: RenderCustomPaint#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
' │\n'
' └─child: RenderRepaintBoundary#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n'
......@@ -250,6 +253,7 @@ void main() {
' │ gestures: vertical scroll\n'
' │\n'
' └─child: RenderPointerListener#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
......@@ -257,11 +261,13 @@ void main() {
' │ listeners: down\n'
' │\n'
' └─child: RenderSemanticsAnnotations#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
' │\n'
' └─child: RenderIgnorePointer#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
......@@ -269,6 +275,7 @@ void main() {
' │ ignoringSemantics: false\n'
' │\n'
' └─child: RenderViewport#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n'
......@@ -344,6 +351,7 @@ void main() {
' │ configuration: Size(800.0, 600.0) at 3.0x (in logical pixels)\n'
' │\n'
' └─child: RenderRepaintBoundary#00000\n'
' │ needs compositing\n'
' │ parentData: <none>\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n'
......@@ -353,11 +361,13 @@ void main() {
' │ repaints)\n'
' │\n'
' └─child: RenderCustomPaint#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
' │\n'
' └─child: RenderRepaintBoundary#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n'
......@@ -386,6 +396,7 @@ void main() {
' │ gestures: vertical scroll\n'
' │\n'
' └─child: RenderPointerListener#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
......@@ -393,11 +404,13 @@ void main() {
' │ listeners: down\n'
' │\n'
' └─child: RenderSemanticsAnnotations#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
' │\n'
' └─child: RenderIgnorePointer#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ size: Size(800.0, 600.0)\n'
......@@ -405,6 +418,7 @@ void main() {
' │ ignoringSemantics: false\n'
' │\n'
' └─child: RenderViewport#00000\n'
' │ needs compositing\n'
' │ parentData: <none> (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000\n'
......
......@@ -330,6 +330,7 @@ void main() {
list.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes(
'RenderSliverList#00000 relayoutBoundary=up1\n'
' │ needs compositing\n'
' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
......@@ -342,6 +343,7 @@ void main() {
' │ currently live children: 0 to 2\n'
' │\n'
' ├─child with index 0: RenderRepaintBoundary#00000 relayoutBoundary=up2\n'
' │ │ needs compositing\n'
' │ │ parentData: index=0; layoutOffset=0.0 (can use size)\n'
' │ │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ │ layer: OffsetLayer#00000\n'
......@@ -370,6 +372,7 @@ void main() {
' │ additionalConstraints: BoxConstraints(biggest)\n'
' │\n'
' ├─child with index 1: RenderRepaintBoundary#00000 relayoutBoundary=up2\n'
' │ │ needs compositing\n'
' │ │ parentData: index=1; layoutOffset=100.0 (can use size)\n'
' │ │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ │ layer: OffsetLayer#00000\n'
......@@ -398,6 +401,7 @@ void main() {
' │ additionalConstraints: BoxConstraints(biggest)\n'
' │\n'
' └─child with index 2: RenderRepaintBoundary#00000 relayoutBoundary=up2\n'
' │ needs compositing\n'
' │ parentData: index=2; layoutOffset=200.0 (can use size)\n'
' │ constraints: BoxConstraints(w=800.0, 0.0<=h<=Infinity)\n'
' │ layer: OffsetLayer#00000\n'
......
......@@ -65,6 +65,7 @@ void main() {
viewport.toStringDeep(minLevel: DiagnosticLevel.info),
equalsIgnoringHashCodes(
'RenderSliverFillViewport#00000 relayoutBoundary=up1\n'
' │ needs compositing\n'
' │ parentData: paintOffset=Offset(0.0, 0.0) (can use size)\n'
' │ constraints: SliverConstraints(AxisDirection.down,\n'
' │ GrowthDirection.forward, ScrollDirection.idle, scrollOffset:\n'
......@@ -78,6 +79,7 @@ void main() {
' │ currently live children: 0 to 1\n'
' │\n'
' ├─child with index 0: RenderRepaintBoundary#00000\n'
' │ │ needs compositing\n'
' │ │ parentData: index=0; layoutOffset=0.0\n'
' │ │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ │ layer: OffsetLayer#00000\n'
......@@ -101,6 +103,7 @@ void main() {
' │ ║ "0"\n'
' │ ╚═══════════\n'
' └─child with index 1: RenderRepaintBoundary#00000\n'
' │ needs compositing\n'
' │ parentData: index=1; layoutOffset=600.0\n'
' │ constraints: BoxConstraints(w=800.0, h=600.0)\n'
' │ layer: OffsetLayer#00000 DETACHED\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment