mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +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() {
|
func (v *view) updatePresentsWithTransaction() {
|
||||||
// Disable presentsWithTransaction on the fullscreen mode (#1745).
|
pwt := v.usePresentsWithTransaction()
|
||||||
|
|
||||||
pwt := !v.vsyncDisabled && !v.fullscreen
|
|
||||||
v.ml.SetPresentsWithTransaction(pwt)
|
v.ml.SetPresentsWithTransaction(pwt)
|
||||||
|
|
||||||
// When presentsWithTransaction is YES and triple buffering is enabled, nextDrawing returns immediately once every two times.
|
// 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))
|
C.setFrame(v.ml.Layer(), unsafe.Pointer(v.uiview))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v *view) usePresentsWithTransaction() bool {
|
||||||
|
// Do not use presentsWithTransaction on iOS (#1799).
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
storageMode = mtl.StorageModeShared
|
storageMode = mtl.StorageModeShared
|
||||||
resourceStorageMode = mtl.ResourceStorageModeShared
|
resourceStorageMode = mtl.ResourceStorageModeShared
|
||||||
|
@ -43,6 +43,11 @@ func (v *view) update() {
|
|||||||
v.windowChanged = false
|
v.windowChanged = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v *view) usePresentsWithTransaction() bool {
|
||||||
|
// Disable presentsWithTransaction on the fullscreen mode (#1745).
|
||||||
|
return !v.vsyncDisabled && !v.fullscreen
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
storageMode = mtl.StorageModeManaged
|
storageMode = mtl.StorageModeManaged
|
||||||
resourceStorageMode = mtl.ResourceStorageModeManaged
|
resourceStorageMode = mtl.ResourceStorageModeManaged
|
||||||
|
Loading…
Reference in New Issue
Block a user