@ThreadSafe public class ComponentTreeHolder extends Object
RecyclerBinder
. For each item the
ComponentTreeHolder keeps the RenderInfo
which contains the original Component
and either the ComponentTree
or the StateHandler
depending upon whether the item
is within the current working range or not.Constructor and Description |
---|
ComponentTreeHolder() |
Modifier and Type | Method and Description |
---|---|
static ComponentTreeHolder |
acquire(RenderInfo renderInfo,
LayoutHandler layoutHandler,
boolean canPrefetchDisplayLists,
boolean canCacheDrawingDisplayLists) |
static ComponentTreeHolder |
acquire(RenderInfo renderInfo,
LayoutHandler layoutHandler,
boolean canPrefetchDisplayLists,
boolean canCacheDrawingDisplayLists,
com.facebook.litho.widget.ComponentTreeHolder.ComponentTreeMeasureListenerFactory componentTreeMeasureListenerFactory) |
static ComponentTreeHolder |
acquire(RenderInfo renderInfo,
LayoutHandler layoutHandler,
boolean canPrefetchDisplayLists,
boolean canCacheDrawingDisplayLists,
LayoutHandler preallocateMountContentHandler,
boolean canPreallocateOnDefaultHandler,
boolean shouldPreallocatePerMountSpec) |
static ComponentTreeHolder |
acquire(RenderInfo renderInfo,
LayoutHandler layoutHandler,
boolean canPrefetchDisplayLists,
boolean canCacheDrawingDisplayLists,
LayoutHandler preallocateMountContentHandler,
boolean canPreallocateOnDefaultHandler,
boolean shouldPreallocatePerMountSpec,
com.facebook.litho.widget.ComponentTreeHolder.ComponentTreeMeasureListenerFactory componentTreeMeasureListenerFactory) |
void |
acquireStateHandlerAndReleaseTree() |
void |
computeLayoutAsync(ComponentContext context,
int widthSpec,
int heightSpec) |
void |
computeLayoutSync(ComponentContext context,
int widthSpec,
int heightSpec,
Size size) |
ComponentTree |
getComponentTree() |
RenderInfo |
getRenderInfo() |
boolean |
hasCompletedLatestLayout() |
boolean |
isTreeValid() |
void |
release() |
void |
setRenderInfo(RenderInfo renderInfo) |
public static ComponentTreeHolder acquire(RenderInfo renderInfo, LayoutHandler layoutHandler, boolean canPrefetchDisplayLists, boolean canCacheDrawingDisplayLists)
public static ComponentTreeHolder acquire(RenderInfo renderInfo, LayoutHandler layoutHandler, boolean canPrefetchDisplayLists, boolean canCacheDrawingDisplayLists, com.facebook.litho.widget.ComponentTreeHolder.ComponentTreeMeasureListenerFactory componentTreeMeasureListenerFactory)
public static ComponentTreeHolder acquire(RenderInfo renderInfo, LayoutHandler layoutHandler, boolean canPrefetchDisplayLists, boolean canCacheDrawingDisplayLists, @Nullable LayoutHandler preallocateMountContentHandler, boolean canPreallocateOnDefaultHandler, boolean shouldPreallocatePerMountSpec)
public static ComponentTreeHolder acquire(RenderInfo renderInfo, LayoutHandler layoutHandler, boolean canPrefetchDisplayLists, boolean canCacheDrawingDisplayLists, @Nullable LayoutHandler preallocateMountContentHandler, boolean canPreallocateOnDefaultHandler, boolean shouldPreallocatePerMountSpec, com.facebook.litho.widget.ComponentTreeHolder.ComponentTreeMeasureListenerFactory componentTreeMeasureListenerFactory)
public void acquireStateHandlerAndReleaseTree()
public void computeLayoutSync(ComponentContext context, int widthSpec, int heightSpec, Size size)
public void computeLayoutAsync(ComponentContext context, int widthSpec, int heightSpec)
public RenderInfo getRenderInfo()
public boolean isTreeValid()
@Nullable public ComponentTree getComponentTree()
public void setRenderInfo(RenderInfo renderInfo)
public boolean hasCompletedLatestLayout()
public void release()