willRecreateSurface

This commit is contained in:
Михаил Капелько committed 2026-10-29 23:38:53 +03:00
1 parent de36ad782c
commit ea68f48608
5 files changed
+44 -3

No files matched your search

+5
View File
@@ -12,3 +12,8 @@ func renderPixelSize(_ view: UIView) -> [Int32] {
let h = Int32(max(1, (view.bounds.height * scale).rounded()))
return [w, h]
}
func renderRecreateSurface(_ vm: RenderVM) {
eglResetSurface(&vm.glView.st)
eglMakeCurrentContext(&vm.glView.st)
}
@@ -25,9 +25,6 @@ final class RenderGLView: UIView {
override func layoutSubviews() {
super.layoutSubviews()
if st.surface != nil {
guard eglResetSurface(&st), eglMakeCurrentContext(&st) else { fatalError("ERROR Could not reset EGL surface") }
}
let ps = renderPixelSize(self)
renderSet(F.reshapePixelSize, ps)
}
+4
View File
@@ -13,3 +13,7 @@ func renderPixelSize(_ view: NSView) -> [Int32] {
let h = Int32(max(1, backing.height))
return [w, h]
}
func renderRecreateSurface(_ vm: RenderVM) {
// No-op on macOS
}