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
91242870
Unverified
Commit
91242870
authored
Apr 13, 2022
by
gaaclarke
Committed by
GitHub
Apr 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed obsolete timelineArgumentsIndicatingLandmarkEvent (#101382)
parent
e6f30228
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
50 deletions
+27
-50
debug.dart
packages/flutter/lib/src/foundation/debug.dart
+0
-17
diagnostics.dart
packages/flutter/lib/src/foundation/diagnostics.dart
+5
-8
binding.dart
packages/flutter/lib/src/rendering/binding.dart
+1
-1
box.dart
packages/flutter/lib/src/rendering/box.dart
+7
-7
object.dart
packages/flutter/lib/src/rendering/object.dart
+6
-8
view.dart
packages/flutter/lib/src/rendering/view.dart
+1
-1
binding.dart
packages/flutter/lib/src/scheduler/binding.dart
+2
-2
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+5
-6
No files found.
packages/flutter/lib/src/foundation/debug.dart
View file @
91242870
...
...
@@ -82,23 +82,6 @@ Future<T> debugInstrumentAction<T>(String description, Future<T> Function() acti
}
}
/// Argument passed to [dart:developer.Timeline] events in order to cause those
/// events to be shown in the developer-centric version of the Observatory
/// Timeline.
///
/// Generally these indicate landmark events such as the build phase or layout.
///
/// [DiagnosticsNode.toTimelineArguments] includes these properties in its
/// result.
///
/// See also:
///
/// * [dart:developer.Timeline.startSync], which typically takes this value as
/// its `arguments` argument.
const
Map
<
String
,
String
>
timelineArgumentsIndicatingLandmarkEvent
=
<
String
,
String
>{
'mode'
:
'basic'
,
};
/// Configure [debugFormatDouble] using [num.toStringAsPrecision].
///
/// Defaults to null, which uses the default logic of [debugFormatDouble].
...
...
packages/flutter/lib/src/foundation/diagnostics.dart
View file @
91242870
...
...
@@ -1547,21 +1547,16 @@ abstract class DiagnosticsNode {
/// Converts the properties ([getProperties]) of this node to a form useful
/// for [Timeline] event arguments (as in [Timeline.startSync]).
///
/// The properties specified by [timelineArgumentsIndicatingLandmarkEvent] are
/// included in the result.
///
/// Children ([getChildren]) are omitted.
///
/// This method is only valid in debug builds. In profile builds, this method
/// throws an exception. In release builds, it returns a copy of
/// [timelineArgumentsIndicatingLandmarkEvent] with no arguments added.
/// throws an exception. In release builds it returns null.
///
/// See also:
///
/// * [toJsonMap], which converts this node to a structured form intended for
/// data exchange (e.g. with an IDE).
Map
<
String
,
String
>
toTimelineArguments
()
{
final
Map
<
String
,
String
>
result
=
Map
<
String
,
String
>.
of
(
timelineArgumentsIndicatingLandmarkEvent
);
Map
<
String
,
String
>?
toTimelineArguments
()
{
if
(!
kReleaseMode
)
{
// We don't throw in release builds, to avoid hurting users. We also don't do anything useful.
if
(
kProfileMode
)
{
...
...
@@ -1573,13 +1568,15 @@ abstract class DiagnosticsNode {
'this application is compiled in profile mode and yet still invoked the method.'
);
}
final
Map
<
String
,
String
>
result
=
<
String
,
String
>{};
for
(
final
DiagnosticsNode
property
in
getProperties
())
{
if
(
property
.
name
!=
null
)
{
result
[
property
.
name
!]
=
property
.
toDescription
(
parentConfiguration:
singleLineTextConfiguration
);
}
}
return
result
;
}
return
result
;
return
null
;
}
/// Serialize the node to a JSON map according to the configuration provided
...
...
packages/flutter/lib/src/rendering/binding.dart
View file @
91242870
...
...
@@ -513,7 +513,7 @@ mixin RendererBinding on BindingBase, ServicesBinding, SchedulerBinding, Gesture
await
super
.
performReassemble
();
if
(
BindingBase
.
debugReassembleConfig
?.
widgetName
==
null
)
{
if
(!
kReleaseMode
)
{
Timeline
.
startSync
(
'Preparing Hot Reload (layout)'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
Timeline
.
startSync
(
'Preparing Hot Reload (layout)'
);
}
try
{
renderView
.
reassemble
();
...
...
packages/flutter/lib/src/rendering/box.dart
View file @
91242870
...
...
@@ -1369,15 +1369,15 @@ abstract class RenderBox extends RenderObject {
return
true
;
}());
if
(
shouldCache
)
{
Map
<
String
,
String
>
debugTimelineArguments
=
timelineArgumentsIndicatingLandmarkEvent
;
Map
<
String
,
String
>
?
debugTimelineArguments
;
assert
(()
{
if
(
debugEnhanceLayoutTimelineArguments
)
{
debugTimelineArguments
=
toDiagnosticsNode
().
toTimelineArguments
();
}
else
{
debugTimelineArguments
=
Map
<
String
,
String
>.
of
(
debugTimelineArguments
)
;
debugTimelineArguments
=
<
String
,
String
>{}
;
}
debugTimelineArguments
[
'intrinsics dimension'
]
=
describeEnum
(
dimension
);
debugTimelineArguments
[
'intrinsics argument'
]
=
'
$argument
'
;
debugTimelineArguments
!
[
'intrinsics dimension'
]
=
describeEnum
(
dimension
);
debugTimelineArguments
!
[
'intrinsics argument'
]
=
'
$argument
'
;
return
true
;
}());
if
(!
kReleaseMode
)
{
...
...
@@ -1833,14 +1833,14 @@ abstract class RenderBox extends RenderObject {
return
true
;
}());
if
(
shouldCache
)
{
Map
<
String
,
String
>
debugTimelineArguments
=
timelineArgumentsIndicatingLandmarkEvent
;
Map
<
String
,
String
>
?
debugTimelineArguments
;
assert
(()
{
if
(
debugEnhanceLayoutTimelineArguments
)
{
debugTimelineArguments
=
toDiagnosticsNode
().
toTimelineArguments
();
}
else
{
debugTimelineArguments
=
Map
<
String
,
String
>.
of
(
debugTimelineArguments
)
;
debugTimelineArguments
=
<
String
,
String
>{}
;
}
debugTimelineArguments
[
'getDryLayout constraints'
]
=
'
$constraints
'
;
debugTimelineArguments
!
[
'getDryLayout constraints'
]
=
'
$constraints
'
;
return
true
;
}());
if
(!
kReleaseMode
)
{
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
91242870
...
...
@@ -858,11 +858,10 @@ class PipelineOwner {
/// See [RendererBinding] for an example of how this function is used.
void
flushLayout
()
{
if
(!
kReleaseMode
)
{
Map
<
String
,
String
>
debugTimelineArguments
=
timelineArgumentsIndicatingLandmarkEvent
;
Map
<
String
,
String
>
?
debugTimelineArguments
;
assert
(()
{
if
(
debugEnhanceLayoutTimelineArguments
)
{
debugTimelineArguments
=
<
String
,
String
>{
...
debugTimelineArguments
,
'dirty count'
:
'
${_nodesNeedingLayout.length}
'
,
'dirty list'
:
'
$_nodesNeedingLayout
'
,
};
...
...
@@ -931,7 +930,7 @@ class PipelineOwner {
/// [flushPaint].
void
flushCompositingBits
()
{
if
(!
kReleaseMode
)
{
Timeline
.
startSync
(
'UPDATING COMPOSITING BITS'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
Timeline
.
startSync
(
'UPDATING COMPOSITING BITS'
);
}
_nodesNeedingCompositingBitsUpdate
.
sort
((
RenderObject
a
,
RenderObject
b
)
=>
a
.
depth
-
b
.
depth
);
for
(
final
RenderObject
node
in
_nodesNeedingCompositingBitsUpdate
)
{
...
...
@@ -964,11 +963,10 @@ class PipelineOwner {
/// See [RendererBinding] for an example of how this function is used.
void
flushPaint
()
{
if
(!
kReleaseMode
)
{
Map
<
String
,
String
>
debugTimelineArguments
=
timelineArgumentsIndicatingLandmarkEvent
;
Map
<
String
,
String
>
?
debugTimelineArguments
;
assert
(()
{
if
(
debugEnhancePaintTimelineArguments
)
{
debugTimelineArguments
=
<
String
,
String
>{
...
debugTimelineArguments
,
'dirty count'
:
'
${_nodesNeedingPaint.length}
'
,
'dirty list'
:
'
$_nodesNeedingPaint
'
,
};
...
...
@@ -1080,7 +1078,7 @@ class PipelineOwner {
if
(
_semanticsOwner
==
null
)
return
;
if
(!
kReleaseMode
)
{
Timeline
.
startSync
(
'SEMANTICS'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
Timeline
.
startSync
(
'SEMANTICS'
);
}
assert
(
_semanticsOwner
!=
null
);
assert
(()
{
...
...
@@ -1796,7 +1794,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
void
layout
(
Constraints
constraints
,
{
bool
parentUsesSize
=
false
})
{
assert
(!
_debugDisposed
);
if
(!
kReleaseMode
&&
debugProfileLayoutsEnabled
)
{
Map
<
String
,
String
>
debugTimelineArguments
=
timelineArgumentsIndicatingLandmarkEvent
;
Map
<
String
,
String
>
?
debugTimelineArguments
;
assert
(()
{
if
(
debugEnhanceLayoutTimelineArguments
)
{
debugTimelineArguments
=
toDiagnosticsNode
().
toTimelineArguments
();
...
...
@@ -2402,7 +2400,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
if
(
_needsLayout
)
return
;
if
(!
kReleaseMode
&&
debugProfilePaintsEnabled
)
{
Map
<
String
,
String
>
debugTimelineArguments
=
timelineArgumentsIndicatingLandmarkEvent
;
Map
<
String
,
String
>
?
debugTimelineArguments
;
assert
(()
{
if
(
debugEnhancePaintTimelineArguments
)
{
debugTimelineArguments
=
toDiagnosticsNode
().
toTimelineArguments
();
...
...
packages/flutter/lib/src/rendering/view.dart
View file @
91242870
...
...
@@ -221,7 +221,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
/// Actually causes the output of the rendering pipeline to appear on screen.
void
compositeFrame
()
{
if
(!
kReleaseMode
)
{
Timeline
.
startSync
(
'COMPOSITING'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
Timeline
.
startSync
(
'COMPOSITING'
);
}
try
{
final
ui
.
SceneBuilder
builder
=
ui
.
SceneBuilder
();
...
...
packages/flutter/lib/src/scheduler/binding.dart
View file @
91242870
...
...
@@ -1023,7 +1023,7 @@ mixin SchedulerBinding on BindingBase {
/// statements printed during a frame from those printed between frames (e.g.
/// in response to events or timers).
void
handleBeginFrame
(
Duration
?
rawTimeStamp
)
{
_frameTimelineTask
?.
start
(
'Frame'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
_frameTimelineTask
?.
start
(
'Frame'
);
_firstRawTimeStampInEpoch
??=
rawTimeStamp
;
_currentFrameTimeStamp
=
_adjustForEpoch
(
rawTimeStamp
??
_lastRawTimeStamp
);
if
(
rawTimeStamp
!=
null
)
...
...
@@ -1050,7 +1050,7 @@ mixin SchedulerBinding on BindingBase {
_hasScheduledFrame
=
false
;
try
{
// TRANSIENT FRAME CALLBACKS
_frameTimelineTask
?.
start
(
'Animate'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
_frameTimelineTask
?.
start
(
'Animate'
);
_schedulerPhase
=
SchedulerPhase
.
transientCallbacks
;
final
Map
<
int
,
_FrameCallbackEntry
>
callbacks
=
_transientCallbacks
;
_transientCallbacks
=
<
int
,
_FrameCallbackEntry
>{};
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
91242870
...
...
@@ -2563,11 +2563,10 @@ class BuildOwner {
return
true
;
}());
if
(!
kReleaseMode
)
{
Map
<
String
,
String
>
debugTimelineArguments
=
timelineArgumentsIndicatingLandmarkEvent
;
Map
<
String
,
String
>
?
debugTimelineArguments
;
assert
(()
{
if
(
debugEnhanceBuildTimelineArguments
)
{
debugTimelineArguments
=
<
String
,
String
>{
...
debugTimelineArguments
,
'dirty count'
:
'
${_dirtyElements.length}
'
,
'dirty list'
:
'
$_dirtyElements
'
,
'lock level'
:
'
$_debugStateLockLevel
'
,
...
...
@@ -2643,7 +2642,7 @@ class BuildOwner {
}());
final
bool
isTimelineTracked
=
!
kReleaseMode
&&
_isProfileBuildsEnabledFor
(
element
.
widget
);
if
(
isTimelineTracked
)
{
Map
<
String
,
String
>
debugTimelineArguments
=
timelineArgumentsIndicatingLandmarkEvent
;
Map
<
String
,
String
>
?
debugTimelineArguments
;
assert
(()
{
if
(
kDebugMode
&&
debugEnhanceBuildTimelineArguments
)
{
debugTimelineArguments
=
element
.
widget
.
toDiagnosticsNode
().
toTimelineArguments
();
...
...
@@ -2926,7 +2925,7 @@ class BuildOwner {
@pragma
(
'vm:notify-debugger-on-exception'
)
void
finalizeTree
()
{
if
(!
kReleaseMode
)
{
Timeline
.
startSync
(
'FINALIZE TREE'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
Timeline
.
startSync
(
'FINALIZE TREE'
);
}
try
{
lockState
(
_inactiveElements
.
_unmountAll
);
// this unregisters the GlobalKeys
...
...
@@ -3515,7 +3514,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
updateSlotForChild
(
child
,
newSlot
);
final
bool
isTimelineTracked
=
!
kReleaseMode
&&
_isProfileBuildsEnabledFor
(
newWidget
);
if
(
isTimelineTracked
)
{
Map
<
String
,
String
>
debugTimelineArguments
=
timelineArgumentsIndicatingLandmarkEvent
;
Map
<
String
,
String
>
?
debugTimelineArguments
;
assert
(()
{
if
(
kDebugMode
&&
debugEnhanceBuildTimelineArguments
)
{
debugTimelineArguments
=
newWidget
.
toDiagnosticsNode
().
toTimelineArguments
();
...
...
@@ -3780,7 +3779,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
final
bool
isTimelineTracked
=
!
kReleaseMode
&&
_isProfileBuildsEnabledFor
(
newWidget
);
if
(
isTimelineTracked
)
{
Map
<
String
,
String
>
debugTimelineArguments
=
timelineArgumentsIndicatingLandmarkEvent
;
Map
<
String
,
String
>
?
debugTimelineArguments
;
assert
(()
{
if
(
kDebugMode
&&
debugEnhanceBuildTimelineArguments
)
{
debugTimelineArguments
=
newWidget
.
toDiagnosticsNode
().
toTimelineArguments
();
...
...
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