From e1cdf9ef4856737a10c4c9cf47188c4a0e267017 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Thu, 3 Nov 2016 17:28:11 -0700 Subject: [PATCH] Add SceneBuilder.setCheckerboardRasterCacheImages with documentation. (flutter/engine#3202) --- engine/src/flutter/lib/ui/compositing.dart | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/engine/src/flutter/lib/ui/compositing.dart b/engine/src/flutter/lib/ui/compositing.dart index 8ed7e3c9d3..207e4e6bc1 100644 --- a/engine/src/flutter/lib/ui/compositing.dart +++ b/engine/src/flutter/lib/ui/compositing.dart @@ -218,6 +218,23 @@ class SceneBuilder extends NativeFieldWrapperClass2 { /// to you. void setRasterizerTracingThreshold(int frameInterval) native "SceneBuilder_setRasterizerTracingThreshold"; + /// Sets whether the raster cache should checkerboard cached entries. This is + /// only useful for debugging purposes. + /// + /// The compositor can sometimes decide to cache certain portions of the + /// widget hierarchy. Such portions typically don't change often from frame to + /// frame and are expensive to render. This can speed up overall rendering. However, + /// there is certain upfront cost to constructing these cache entries. And, if + /// the cache entries are not used very often, this cost may not be worth the + /// speedup in rendering of subsequent frames. If the developer wants to be certain + /// that populating the raster cache is not causing stutters, this option can be + /// set. Depending on the observations made, hints can be provided to the compositor + /// that aid it in making better decisions about caching. + /// + /// Currently this interface is difficult to use by end-developers. If you're + /// interested in using this feature, please contact [flutter-dev](https://groups.google.com/forum/#!forum/flutter-dev). + void setCheckerboardRasterCacheImages(bool checkerboard) native "SceneBuilder_setCheckerboardRasterCacheImages"; + /// Finishes building the scene. /// /// Returns a [Scene] containing the objects that have been added to