From f1549132d8e78a985f3c5acfeb75647f806bf517 Mon Sep 17 00:00:00 2001 From: amirh Date: Thu, 9 Aug 2018 14:09:33 -0700 Subject: [PATCH] Add Dartdoc for the TextureLayer's freeze parameter. (#20383) --- packages/flutter/lib/src/rendering/layer.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/rendering/layer.dart b/packages/flutter/lib/src/rendering/layer.dart index 0dd2af40f4..c62ae7aac7 100644 --- a/packages/flutter/lib/src/rendering/layer.dart +++ b/packages/flutter/lib/src/rendering/layer.dart @@ -212,7 +212,8 @@ class PictureLayer extends Layer { /// for how to create and manage backend textures on iOS. class TextureLayer extends Layer { /// Creates a texture layer bounded by [rect] and with backend texture - /// identified by [textureId]. + /// identified by [textureId], if [freeze] is true new texture frames will not be + /// populated to the texture. TextureLayer({ @required this.rect, @required this.textureId, @@ -225,6 +226,13 @@ class TextureLayer extends Layer { /// The identity of the backend texture. final int textureId; + /// When true the texture that will not be updated with new frames. + /// + /// This is used when resizing an embedded Android views: When resizing + /// there is a short period during which the framework cannot tell + /// if the newest texture frame has the previous or new size, to workaround this + /// the framework "freezes" the texture just before resizing the Android view and unfreezes + /// it when it is certain that a frame with the new size is ready. final bool freeze; @override