16 lines
465 B
Kotlin
16 lines
465 B
Kotlin
package android.view
|
|
class Surface(val texture: android.graphics.SurfaceTexture) {
|
|
val isValid get()=!released
|
|
var released=false
|
|
fun release() {check(!released);released=true}
|
|
}
|
|
|
|
class SurfaceHolder {
|
|
var isCreating=false
|
|
var surfaceFrame=android.graphics.Rect(0,0,640,480)
|
|
val surface=Surface(android.graphics.SurfaceTexture(run {
|
|
val ids=IntArray(1);android.opengl.GLES20.glGenTextures(1,ids,0);ids[0]
|
|
}))
|
|
fun setFixedSize(width: Int,height: Int) {}
|
|
}
|