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

+8
View File
@@ -33,6 +33,7 @@ RenderContext:
pixelSize: [Int32]
reshapePixelSize: [Int32]
willDeinit: Bool
willRecreateSurface: Bool
RenderComponent:
type: component
@@ -42,6 +43,7 @@ RenderComponent:
- didPrepareGL: renderStartTimer(RenderVM.shared!)
- pixelSize: RenderVM.shared!.pixelSize = c.pixelSize
- willDeinit: renderDeinit(RenderVM.shared!)
- willRecreateSurface: renderRecreateSurface(RenderVM.shared!)
shoulds:
didLaunch:
1. Only once during the first setup:
@@ -78,3 +80,9 @@ RenderComponent:
c.recentField == F.backingPixelSize
then:
c.pixelSize = c.backingPixelSize
willRecreateSurface:
1. Upon resize:
if:
c.recentField == F.reshapePixelSize
then:
c.willRecreateSurface = true