From c650a0ba9ba016e994791c7def1f47a1bc1c778d Mon Sep 17 00:00:00 2001 From: Hixie Date: Thu, 17 Mar 2016 11:05:22 -0700 Subject: [PATCH] Flesh out docs for addPerformanceOverlay --- sky/engine/core/dart/compositing.dart | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sky/engine/core/dart/compositing.dart b/sky/engine/core/dart/compositing.dart index 81b52890829..3b0391be121 100644 --- a/sky/engine/core/dart/compositing.dart +++ b/sky/engine/core/dart/compositing.dart @@ -102,6 +102,25 @@ class SceneBuilder extends NativeFieldWrapperClass2 { /// Useful during development to assess the performance of the application. /// The enabledOptions controls which statistics are displayed. The bounds /// controls where the statistics are displayed. + /// + /// enabledOptions is a bit field with the following bits defined: + /// * 0x01: displayRasterizerStatistics - show GPU thread frame time + /// * 0x02: visualizeRasterizerStatistics - graph GPU thread frame times + /// * 0x04: displayEngineStatistics - show UI thread frame time + /// * 0x08: visualizeEngineStatistics - graph UI thread frame times + /// Set enabledOptions to 0x0F to enable all the currently defined features. + /// + /// The "UI thread" is the thread that includes all the execution of + /// the main Dart isolate (the isolate that can call + /// [Window.render]). The UI thread frame time is the total time + /// spent executing the [Window.onBeginFrame] callback. The "GPU + /// thread" is the thread (running on the CPU) that subsequently + /// processes the [Scene] provided by the Dart code to turn it into + /// GPU commands and send it to the GPU. + /// + /// See also the [PerformanceOverlayOption] enum in the rendering library. + /// for more details. + // Values above must match constants in //engine/src/sky/compositor/performance_overlay_layer.h void addPerformanceOverlay(int enabledOptions, Rect bounds) native "SceneBuilder_addPerformanceOverlay"; /// Adds a [Picture] to the scene.