Skip to content

Commit

Permalink
expose host recycling to componentsConfig + setup for video surfaces
Browse files Browse the repository at this point in the history
Summary:
This diff exposes
- isHostViewAttributesCleanUpEnabled to componentConfig
- enables host recycling + host clean up behind mc param for video surfaces

Differential Revision: D63756949

fbshipit-source-id: 2bfc855d39d127d7b3753aa312626b4300ede143
  • Loading branch information
Hannah Yang authored and facebook-github-bot committed Oct 2, 2024
1 parent a7bbae1 commit 04fb3b2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ internal constructor(
private var enableHostWillNotDraw = baseConfig.enableHostWillNotDraw
private var enableLoggingForRenderInFlight = baseConfig.enableLoggingForRenderInFlight
private var enableFixForCachedNestedTree = baseConfig.enableFixForCachedNestedTree
private var isHostViewAttributesCleanUpEnabled = baseConfig.isHostViewAttributesCleanUpEnabled

fun shouldAddHostViewForRootComponent(enabled: Boolean): Builder = also {
shouldAddHostViewForRootComponent = enabled
Expand Down Expand Up @@ -455,6 +456,10 @@ internal constructor(
enableFixForCachedNestedTree = enabled
}

fun enableHostViewAttributesCleanUp(enabled: Boolean): Builder = also {
isHostViewAttributesCleanUpEnabled = enabled
}

fun build(): ComponentsConfiguration {
return baseConfig.copy(
shouldAddHostViewForRootComponent = shouldAddHostViewForRootComponent,
Expand Down Expand Up @@ -491,6 +496,7 @@ internal constructor(
enableHostWillNotDraw = enableHostWillNotDraw,
enableLoggingForRenderInFlight = enableLoggingForRenderInFlight,
enableFixForCachedNestedTree = enableFixForCachedNestedTree,
isHostViewAttributesCleanUpEnabled = isHostViewAttributesCleanUpEnabled,
)
}
}
Expand Down

0 comments on commit 04fb3b2

Please sign in to comment.