Add SceneBuilder.setCheckerboardRasterCacheImages with documentation. (flutter/engine#3202)

This commit is contained in:
Chinmay Garde
2016-11-03 17:28:11 -07:00
committed by GitHub
parent 6dbbb9c0a5
commit e1cdf9ef48

View File

@@ -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