Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
0b392665
Commit
0b392665
authored
Jul 19, 2017
by
Ian Hickson
Committed by
GitHub
Jul 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More debug help. (#11308)
parent
05ccad7d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
5 deletions
+51
-5
debug.dart
packages/flutter/lib/src/rendering/debug.dart
+35
-4
layer.dart
packages/flutter/lib/src/rendering/layer.dart
+2
-0
object.dart
packages/flutter/lib/src/rendering/object.dart
+4
-0
debug.dart
packages/flutter/lib/src/scheduler/debug.dart
+10
-1
No files found.
packages/flutter/lib/src/rendering/debug.dart
View file @
0b392665
...
@@ -95,9 +95,6 @@ HSVColor debugCurrentRepaintColor = _kDebugCurrentRepaintColor;
...
@@ -95,9 +95,6 @@ HSVColor debugCurrentRepaintColor = _kDebugCurrentRepaintColor;
/// The amount to increment the hue of the current repaint color.
/// The amount to increment the hue of the current repaint color.
double
debugRepaintRainbowHueIncrement
=
_kDebugRepaintRainbowHueIncrement
;
double
debugRepaintRainbowHueIncrement
=
_kDebugRepaintRainbowHueIncrement
;
/// Log the call stacks that mark render objects as needing paint.
bool
debugPrintMarkNeedsPaintStacks
=
false
;
/// Log the call stacks that mark render objects as needing layout.
/// Log the call stacks that mark render objects as needing layout.
///
///
/// For sanity, this only logs the stack traces of cases where an object is
/// For sanity, this only logs the stack traces of cases where an object is
...
@@ -106,6 +103,29 @@ bool debugPrintMarkNeedsPaintStacks = false;
...
@@ -106,6 +103,29 @@ bool debugPrintMarkNeedsPaintStacks = false;
/// up the tree.
/// up the tree.
bool
debugPrintMarkNeedsLayoutStacks
=
false
;
bool
debugPrintMarkNeedsLayoutStacks
=
false
;
/// Log the call stacks that mark render objects as needing paint.
bool
debugPrintMarkNeedsPaintStacks
=
false
;
/// Log the dirty render objects that are laid out each frame.
///
/// Combined with [debugPrintBeginFrameBanner], this allows you to distinguish
/// layouts triggered by the initial mounting of a render tree (e.g. in a call
/// to [runApp]) from the regular layouts triggered by the pipeline.
///
/// Combined with [debugPrintMarkNeedsLayoutStacks], this lets you watch a
/// render object's dirty/clean lifecycle.
///
/// See also:
///
/// * [debugProfilePaintsEnabled], which does something similar for
/// painting but using the timeline view.
///
/// * [debugPrintRebuildDirtyWidgets], which does something similar for widgets
/// being rebuilt.
///
/// * The discussion at [RendererBinding.drawFrame].
bool
debugPrintLayouts
=
false
;
/// Check the intrinsic sizes of each [RenderBox] during layout.
/// Check the intrinsic sizes of each [RenderBox] during layout.
///
///
/// By default this is turned off since these checks are expensive, but it is
/// By default this is turned off since these checks are expensive, but it is
...
@@ -121,6 +141,16 @@ bool debugCheckIntrinsicSizes = false;
...
@@ -121,6 +141,16 @@ bool debugCheckIntrinsicSizes = false;
/// For details on how to use [dart:developer.Timeline] events in the Dart
/// For details on how to use [dart:developer.Timeline] events in the Dart
/// Observatory to optimize your app, see:
/// Observatory to optimize your app, see:
/// <https://fuchsia.googlesource.com/sysui/+/master/docs/performance.md>
/// <https://fuchsia.googlesource.com/sysui/+/master/docs/performance.md>
///
/// See also:
///
/// * [debugPrintLayouts], which does something similar for layout but using
/// console output.
///
/// * [debugPrintRebuildDirtyWidgets], which does something similar for widgets
/// being rebuilt.
///
/// * The discussion at [RendererBinding.drawFrame].
bool
debugProfilePaintsEnabled
=
false
;
bool
debugProfilePaintsEnabled
=
false
;
...
@@ -184,8 +214,9 @@ bool debugAssertAllRenderVarsUnset(String reason, { bool debugCheckIntrinsicSize
...
@@ -184,8 +214,9 @@ bool debugAssertAllRenderVarsUnset(String reason, { bool debugCheckIntrinsicSize
debugPaintPointersEnabled
||
debugPaintPointersEnabled
||
debugRepaintRainbowEnabled
||
debugRepaintRainbowEnabled
||
debugRepaintTextRainbowEnabled
||
debugRepaintTextRainbowEnabled
||
debugPrintMarkNeedsPaintStacks
||
debugPrintMarkNeedsLayoutStacks
||
debugPrintMarkNeedsLayoutStacks
||
debugPrintMarkNeedsPaintStacks
||
debugPrintLayouts
||
debugCheckIntrinsicSizes
!=
debugCheckIntrinsicSizesOverride
||
debugCheckIntrinsicSizes
!=
debugCheckIntrinsicSizesOverride
||
debugProfilePaintsEnabled
||
debugProfilePaintsEnabled
||
debugPaintSizeColor
!=
_kDebugPaintSizeColor
||
debugPaintSizeColor
!=
_kDebugPaintSizeColor
||
...
...
packages/flutter/lib/src/rendering/layer.dart
View file @
0b392665
...
@@ -754,6 +754,8 @@ class PhysicalModelLayer extends ContainerLayer {
...
@@ -754,6 +754,8 @@ class PhysicalModelLayer extends ContainerLayer {
void
debugFillDescription
(
List
<
String
>
description
)
{
void
debugFillDescription
(
List
<
String
>
description
)
{
super
.
debugFillDescription
(
description
);
super
.
debugFillDescription
(
description
);
description
.
add
(
'clipRRect:
$clipRRect
'
);
description
.
add
(
'clipRRect:
$clipRRect
'
);
description
.
add
(
'elevation:
$elevation
'
);
description
.
add
(
'color:
$color
'
);
}
}
}
}
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
0b392665
...
@@ -1743,6 +1743,8 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
...
@@ -1743,6 +1743,8 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
_debugDoingThisLayout
=
true
;
_debugDoingThisLayout
=
true
;
debugPreviousActiveLayout
=
_debugActiveLayout
;
debugPreviousActiveLayout
=
_debugActiveLayout
;
_debugActiveLayout
=
this
;
_debugActiveLayout
=
this
;
if
(
debugPrintLayouts
)
debugPrint
(
'Laying out (without resize)
$this
'
);
return
true
;
return
true
;
});
});
try
{
try
{
...
@@ -1849,6 +1851,8 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
...
@@ -1849,6 +1851,8 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
assert
(!
_doingThisLayoutWithCallback
);
assert
(!
_doingThisLayoutWithCallback
);
assert
(()
{
assert
(()
{
_debugMutationsLocked
=
true
;
_debugMutationsLocked
=
true
;
if
(
debugPrintLayouts
)
debugPrint
(
'Laying out (
${sizedByParent ? "with separate resize" : "with resize allowed"}
)
$this
'
);
return
true
;
return
true
;
});
});
if
(
sizedByParent
)
{
if
(
sizedByParent
)
{
...
...
packages/flutter/lib/src/scheduler/debug.dart
View file @
0b392665
...
@@ -21,7 +21,16 @@ import 'package:flutter/foundation.dart';
...
@@ -21,7 +21,16 @@ import 'package:flutter/foundation.dart';
/// intra-frame output from inter-frame output, set [debugPrintEndFrameBanner]
/// intra-frame output from inter-frame output, set [debugPrintEndFrameBanner]
/// to true as well.
/// to true as well.
///
///
/// See [SchedulerBinding.handleBeginFrame].
/// See also:
///
/// * [debugProfilePaintsEnabled], which does something similar for
/// painting but using the timeline view.
///
/// * [debugPrintLayouts], which does something similar for layout but using
/// console output.
///
/// * The discussions at [WidgetsBinding.drawFrame] and at
/// [SchedulerBinding.handleBeginFrame].
bool
debugPrintBeginFrameBanner
=
false
;
bool
debugPrintBeginFrameBanner
=
false
;
/// Print a banner at the end of each frame.
/// Print a banner at the end of each frame.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment