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
3bab533c
Commit
3bab533c
authored
Sep 14, 2017
by
Carlo Bernaschina
Committed by
GitHub
Sep 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add important Timeline events to whitelist (#12058)
parent
cbdefead
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
9 deletions
+15
-9
debug.dart
packages/flutter/lib/src/foundation/debug.dart
+6
-0
binding.dart
packages/flutter/lib/src/rendering/binding.dart
+1
-1
object.dart
packages/flutter/lib/src/rendering/object.dart
+3
-3
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
+2
-2
No files found.
packages/flutter/lib/src/foundation/debug.dart
View file @
3bab533c
...
@@ -28,3 +28,9 @@ bool debugAssertAllFoundationVarsUnset(String reason, { DebugPrintCallback debug
...
@@ -28,3 +28,9 @@ bool debugAssertAllFoundationVarsUnset(String reason, { DebugPrintCallback debug
});
});
return
true
;
return
true
;
}
}
/// Arguments to whitelist [Timeline] events in order to be shown in the
/// developer centric version of the Observatory Timeline.
const
Map
<
String
,
String
>
timelineWhitelistArguments
=
const
<
String
,
String
>{
'mode'
:
'basic'
};
packages/flutter/lib/src/rendering/binding.dart
View file @
3bab533c
...
@@ -283,7 +283,7 @@ abstract class RendererBinding extends BindingBase with SchedulerBinding, Servic
...
@@ -283,7 +283,7 @@ abstract class RendererBinding extends BindingBase with SchedulerBinding, Servic
@override
@override
Future
<
Null
>
performReassemble
()
async
{
Future
<
Null
>
performReassemble
()
async
{
await
super
.
performReassemble
();
await
super
.
performReassemble
();
Timeline
.
startSync
(
'Dirty Render Tree'
);
Timeline
.
startSync
(
'Dirty Render Tree'
,
arguments:
timelineWhitelistArguments
);
try
{
try
{
renderView
.
reassemble
();
renderView
.
reassemble
();
}
finally
{
}
finally
{
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
3bab533c
...
@@ -126,7 +126,7 @@ class PaintingContext {
...
@@ -126,7 +126,7 @@ class PaintingContext {
void
paintChild
(
RenderObject
child
,
Offset
offset
)
{
void
paintChild
(
RenderObject
child
,
Offset
offset
)
{
assert
(()
{
assert
(()
{
if
(
debugProfilePaintsEnabled
)
if
(
debugProfilePaintsEnabled
)
Timeline
.
startSync
(
'
${child.runtimeType}
'
);
Timeline
.
startSync
(
'
${child.runtimeType}
'
,
arguments:
timelineWhitelistArguments
);
return
true
;
return
true
;
});
});
...
@@ -1075,7 +1075,7 @@ class PipelineOwner {
...
@@ -1075,7 +1075,7 @@ class PipelineOwner {
///
///
/// See [RendererBinding] for an example of how this function is used.
/// See [RendererBinding] for an example of how this function is used.
void
flushLayout
()
{
void
flushLayout
()
{
Timeline
.
startSync
(
'Layout'
);
Timeline
.
startSync
(
'Layout'
,
arguments:
timelineWhitelistArguments
);
_debugDoingLayout
=
true
;
_debugDoingLayout
=
true
;
try
{
try
{
// TODO(ianh): assert that we're not allowing previously dirty nodes to redirty themeselves
// TODO(ianh): assert that we're not allowing previously dirty nodes to redirty themeselves
...
@@ -1146,7 +1146,7 @@ class PipelineOwner {
...
@@ -1146,7 +1146,7 @@ class PipelineOwner {
///
///
/// See [RendererBinding] for an example of how this function is used.
/// See [RendererBinding] for an example of how this function is used.
void
flushPaint
()
{
void
flushPaint
()
{
Timeline
.
startSync
(
'Paint'
);
Timeline
.
startSync
(
'Paint'
,
arguments:
timelineWhitelistArguments
);
_debugDoingPaint
=
true
;
_debugDoingPaint
=
true
;
try
{
try
{
final
List
<
RenderObject
>
dirtyNodes
=
_nodesNeedingPaint
;
final
List
<
RenderObject
>
dirtyNodes
=
_nodesNeedingPaint
;
...
...
packages/flutter/lib/src/rendering/view.dart
View file @
3bab533c
...
@@ -184,7 +184,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
...
@@ -184,7 +184,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
///
///
/// Actually causes the output of the rendering pipeline to appear on screen.
/// Actually causes the output of the rendering pipeline to appear on screen.
void
compositeFrame
()
{
void
compositeFrame
()
{
Timeline
.
startSync
(
'Compositing'
);
Timeline
.
startSync
(
'Compositing'
,
arguments:
timelineWhitelistArguments
);
try
{
try
{
final
ui
.
SceneBuilder
builder
=
new
ui
.
SceneBuilder
();
final
ui
.
SceneBuilder
builder
=
new
ui
.
SceneBuilder
();
layer
.
addToScene
(
builder
,
Offset
.
zero
);
layer
.
addToScene
(
builder
,
Offset
.
zero
);
...
...
packages/flutter/lib/src/scheduler/binding.dart
View file @
3bab533c
...
@@ -585,7 +585,7 @@ abstract class SchedulerBinding extends BindingBase {
...
@@ -585,7 +585,7 @@ abstract class SchedulerBinding extends BindingBase {
/// statements printed during a frame from those printed between frames (e.g.
/// statements printed during a frame from those printed between frames (e.g.
/// in response to events or timers).
/// in response to events or timers).
void
handleBeginFrame
(
Duration
rawTimeStamp
)
{
void
handleBeginFrame
(
Duration
rawTimeStamp
)
{
Timeline
.
startSync
(
'Frame'
);
Timeline
.
startSync
(
'Frame'
,
arguments:
timelineWhitelistArguments
);
_firstRawTimeStampInEpoch
??=
rawTimeStamp
;
_firstRawTimeStampInEpoch
??=
rawTimeStamp
;
_currentFrameTimeStamp
=
_adjustForEpoch
(
rawTimeStamp
??
_lastRawTimeStamp
);
_currentFrameTimeStamp
=
_adjustForEpoch
(
rawTimeStamp
??
_lastRawTimeStamp
);
if
(
rawTimeStamp
!=
null
)
if
(
rawTimeStamp
!=
null
)
...
@@ -616,7 +616,7 @@ abstract class SchedulerBinding extends BindingBase {
...
@@ -616,7 +616,7 @@ abstract class SchedulerBinding extends BindingBase {
_hasScheduledFrame
=
false
;
_hasScheduledFrame
=
false
;
try
{
try
{
// TRANSIENT FRAME CALLBACKS
// TRANSIENT FRAME CALLBACKS
Timeline
.
startSync
(
'Animate'
);
Timeline
.
startSync
(
'Animate'
,
arguments:
timelineWhitelistArguments
);
_schedulerPhase
=
SchedulerPhase
.
transientCallbacks
;
_schedulerPhase
=
SchedulerPhase
.
transientCallbacks
;
final
Map
<
int
,
_FrameCallbackEntry
>
callbacks
=
_transientCallbacks
;
final
Map
<
int
,
_FrameCallbackEntry
>
callbacks
=
_transientCallbacks
;
_transientCallbacks
=
<
int
,
_FrameCallbackEntry
>{};
_transientCallbacks
=
<
int
,
_FrameCallbackEntry
>{};
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
3bab533c
...
@@ -2224,7 +2224,7 @@ class BuildOwner {
...
@@ -2224,7 +2224,7 @@ class BuildOwner {
_debugBuilding
=
true
;
_debugBuilding
=
true
;
return
true
;
return
true
;
});
});
Timeline
.
startSync
(
'Build'
);
Timeline
.
startSync
(
'Build'
,
arguments:
timelineWhitelistArguments
);
try
{
try
{
_scheduledFlushDirtyElements
=
true
;
_scheduledFlushDirtyElements
=
true
;
if
(
callback
!=
null
)
{
if
(
callback
!=
null
)
{
...
@@ -2341,7 +2341,7 @@ class BuildOwner {
...
@@ -2341,7 +2341,7 @@ class BuildOwner {
/// After the current call stack unwinds, a microtask that notifies listeners
/// After the current call stack unwinds, a microtask that notifies listeners
/// about changes to global keys will run.
/// about changes to global keys will run.
void
finalizeTree
()
{
void
finalizeTree
()
{
Timeline
.
startSync
(
'Finalize tree'
);
Timeline
.
startSync
(
'Finalize tree'
,
arguments:
timelineWhitelistArguments
);
try
{
try
{
lockState
(()
{
lockState
(()
{
_inactiveElements
.
_unmountAll
();
// this unregisters the GlobalKeys
_inactiveElements
.
_unmountAll
();
// this unregisters the GlobalKeys
...
...
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