useInfo

inline fun <T> DrawingSurface.useInfo(block: (DrawingSurfaceInfo) -> T): T(source)

Gets a DrawingSurfaceInfo and executes block, then release the surface info.

Throw IllegalStateException if getInfo fails.