Skip to content

Commit a3578d1

Browse files
Fabio Carballofacebook-github-bot
authored andcommitted
Allow mount content used in Stories to be preallocated
Summary: I have identified some mount components that were not being allowed to be preallocated. for the Stories Viewer I'm enabling them in this diff. Reviewed By: pentiumao Differential Revision: D53040049 fbshipit-source-id: 2c990da4dd0544e46e4e70bedcaffdb36ecd5cfc
1 parent f1bf340 commit a3578d1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

litho-core/src/main/java/com/facebook/litho/DrawableComponent.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ public boolean isEquivalentProps(@Nullable Component o, boolean shouldCompareCom
109109
return DrawableUtils.isEquivalentTo(mDrawable, drawableComponent.mDrawable);
110110
}
111111

112+
@Override
113+
public boolean canPreallocate() {
114+
return true;
115+
}
116+
112117
private int getDrawableWidth() {
113118
return mDrawableWidth;
114119
}

0 commit comments

Comments
 (0)