scoop:scoop.surface:0.1.0
src/shared/host/content.scoop
Selected production source · src/shared/host/content.scoop
1
package scoop.surface3
/** A root owned by one SurfaceWindow, closed before its renderer and native lease. */4
public interface SurfaceContent: Closeable {5
public fun paint(frame: FrameContext)6
public fun onFrameComplete(frame: FrameCompletion) {}7
}9
internal class PainterContent(private val painter: (FrameContext) -> Unit): SurfaceContent {10
public override fun paint(frame: FrameContext) {11
painter(frame)12
}13
public override fun close() {}14
}