mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
internal/graphicsdriver/metal: Disable presentsWithTransaction on iOS
Closes #1799
This commit is contained in:
parent
777e8f2759
commit
65943d4bad
@ -70,9 +70,7 @@ func (v *view) setFullscreen(fullscreen bool) {
|
||||
}
|
||||
|
||||
func (v *view) updatePresentsWithTransaction() {
|
||||
// Disable presentsWithTransaction on the fullscreen mode (#1745).
|
||||
|
||||
pwt := !v.vsyncDisabled && !v.fullscreen
|
||||
pwt := v.usePresentsWithTransaction()
|
||||
v.ml.SetPresentsWithTransaction(pwt)
|
||||
|
||||
// When presentsWithTransaction is YES and triple buffering is enabled, nextDrawing returns immediately once every two times.
|
||||
|
@ -57,6 +57,11 @@ func (v *view) update() {
|
||||
C.setFrame(v.ml.Layer(), unsafe.Pointer(v.uiview))
|
||||
}
|
||||
|
||||
func (v *view) usePresentsWithTransaction() bool {
|
||||
// Do not use presentsWithTransaction on iOS (#1799).
|
||||
return false
|
||||
}
|
||||
|
||||
const (
|
||||
storageMode = mtl.StorageModeShared
|
||||
resourceStorageMode = mtl.ResourceStorageModeShared
|
||||
|
@ -43,6 +43,11 @@ func (v *view) update() {
|
||||
v.windowChanged = false
|
||||
}
|
||||
|
||||
func (v *view) usePresentsWithTransaction() bool {
|
||||
// Disable presentsWithTransaction on the fullscreen mode (#1745).
|
||||
return !v.vsyncDisabled && !v.fullscreen
|
||||
}
|
||||
|
||||
const (
|
||||
storageMode = mtl.StorageModeManaged
|
||||
resourceStorageMode = mtl.ResourceStorageModeManaged
|
||||
|
Loading…
Reference in New Issue
Block a user