Skip to content

Commit

Permalink
introduce hosts/views for signals compatibility
Browse files Browse the repository at this point in the history
Summary: Introducing hosting views that can track signals access for mount

Reviewed By: adityasharat

Differential Revision: D62677555

fbshipit-source-id: 65cd8b923c80dd2a24faf8de5817bb3ea64c684b
  • Loading branch information
Daniel Famakin authored and facebook-github-bot committed Oct 1, 2024
1 parent 0613729 commit 8dfc522
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ open class RenderTreeHostView
constructor(context: Context, attrs: AttributeSet? = null) :
HostView(context, attrs), RenderTreeHost {

private val mountState = MountState(this)
protected open val mountState = MountState(this)
private var currentRenderTree: RenderTree? = null

override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package com.facebook.rendercore
import com.facebook.infer.annotation.ThreadConfined
import com.facebook.rendercore.extensions.RenderCoreExtension

class RootHostDelegate(private val host: Host) : RenderState.HostListener, RootHost {
open class RootHostDelegate(private val host: Host) : RenderState.HostListener, RootHost {

private val mountState: MountState = MountState(host)
protected open val mountState: MountState = MountState(host)

private var currentRenderTree: RenderTree? = null
private var doMeasureInLayout = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import androidx.annotation.VisibleForTesting
open class RootHostView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
HostView(context, attrs), RootHost {

val rootHostDelegate: RootHostDelegate = RootHostDelegate(this)
open val rootHostDelegate: RootHostDelegate = RootHostDelegate(this)

override fun setRenderState(renderState: RenderState<*, *, *>?) {
rootHostDelegate.setRenderState(renderState)
Expand Down

0 comments on commit 8dfc522

Please sign in to comment.