Add important Timeline events to whitelist (#12058)
This commit is contained in:
parent
cbdefead38
commit
3bab533cd6
@ -28,3 +28,9 @@ bool debugAssertAllFoundationVarsUnset(String reason, { DebugPrintCallback debug
|
||||
});
|
||||
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'
|
||||
};
|
||||
|
@ -283,7 +283,7 @@ abstract class RendererBinding extends BindingBase with SchedulerBinding, Servic
|
||||
@override
|
||||
Future<Null> performReassemble() async {
|
||||
await super.performReassemble();
|
||||
Timeline.startSync('Dirty Render Tree');
|
||||
Timeline.startSync('Dirty Render Tree', arguments: timelineWhitelistArguments);
|
||||
try {
|
||||
renderView.reassemble();
|
||||
} finally {
|
||||
|
@ -126,7 +126,7 @@ class PaintingContext {
|
||||
void paintChild(RenderObject child, Offset offset) {
|
||||
assert(() {
|
||||
if (debugProfilePaintsEnabled)
|
||||
Timeline.startSync('${child.runtimeType}');
|
||||
Timeline.startSync('${child.runtimeType}', arguments: timelineWhitelistArguments);
|
||||
return true;
|
||||
});
|
||||
|
||||
@ -1075,7 +1075,7 @@ class PipelineOwner {
|
||||
///
|
||||
/// See [RendererBinding] for an example of how this function is used.
|
||||
void flushLayout() {
|
||||
Timeline.startSync('Layout');
|
||||
Timeline.startSync('Layout', arguments: timelineWhitelistArguments);
|
||||
_debugDoingLayout = true;
|
||||
try {
|
||||
// TODO(ianh): assert that we're not allowing previously dirty nodes to redirty themeselves
|
||||
@ -1146,7 +1146,7 @@ class PipelineOwner {
|
||||
///
|
||||
/// See [RendererBinding] for an example of how this function is used.
|
||||
void flushPaint() {
|
||||
Timeline.startSync('Paint');
|
||||
Timeline.startSync('Paint', arguments: timelineWhitelistArguments);
|
||||
_debugDoingPaint = true;
|
||||
try {
|
||||
final List<RenderObject> dirtyNodes = _nodesNeedingPaint;
|
||||
|
@ -184,7 +184,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
|
||||
///
|
||||
/// Actually causes the output of the rendering pipeline to appear on screen.
|
||||
void compositeFrame() {
|
||||
Timeline.startSync('Compositing');
|
||||
Timeline.startSync('Compositing', arguments: timelineWhitelistArguments);
|
||||
try {
|
||||
final ui.SceneBuilder builder = new ui.SceneBuilder();
|
||||
layer.addToScene(builder, Offset.zero);
|
||||
|
@ -585,7 +585,7 @@ abstract class SchedulerBinding extends BindingBase {
|
||||
/// statements printed during a frame from those printed between frames (e.g.
|
||||
/// in response to events or timers).
|
||||
void handleBeginFrame(Duration rawTimeStamp) {
|
||||
Timeline.startSync('Frame');
|
||||
Timeline.startSync('Frame', arguments: timelineWhitelistArguments);
|
||||
_firstRawTimeStampInEpoch ??= rawTimeStamp;
|
||||
_currentFrameTimeStamp = _adjustForEpoch(rawTimeStamp ?? _lastRawTimeStamp);
|
||||
if (rawTimeStamp != null)
|
||||
@ -616,7 +616,7 @@ abstract class SchedulerBinding extends BindingBase {
|
||||
_hasScheduledFrame = false;
|
||||
try {
|
||||
// TRANSIENT FRAME CALLBACKS
|
||||
Timeline.startSync('Animate');
|
||||
Timeline.startSync('Animate', arguments: timelineWhitelistArguments);
|
||||
_schedulerPhase = SchedulerPhase.transientCallbacks;
|
||||
final Map<int, _FrameCallbackEntry> callbacks = _transientCallbacks;
|
||||
_transientCallbacks = <int, _FrameCallbackEntry>{};
|
||||
|
@ -2224,7 +2224,7 @@ class BuildOwner {
|
||||
_debugBuilding = true;
|
||||
return true;
|
||||
});
|
||||
Timeline.startSync('Build');
|
||||
Timeline.startSync('Build', arguments: timelineWhitelistArguments);
|
||||
try {
|
||||
_scheduledFlushDirtyElements = true;
|
||||
if (callback != null) {
|
||||
@ -2341,7 +2341,7 @@ class BuildOwner {
|
||||
/// After the current call stack unwinds, a microtask that notifies listeners
|
||||
/// about changes to global keys will run.
|
||||
void finalizeTree() {
|
||||
Timeline.startSync('Finalize tree');
|
||||
Timeline.startSync('Finalize tree', arguments: timelineWhitelistArguments);
|
||||
try {
|
||||
lockState(() {
|
||||
_inactiveElements._unmountAll(); // this unregisters the GlobalKeys
|
||||
|
Loading…
x
Reference in New Issue
Block a user