mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Revert "graphicsdriver/metal: Bug fix: Release drawable correctly"
This reverts commit c44accbfb5
.
Reason: This change doesn't make sense
This commit is contained in:
parent
c44accbfb5
commit
bfe1d2208e
@ -152,7 +152,3 @@ func (md MetalDrawable) Drawable() unsafe.Pointer { return md.metalDrawable }
|
||||
func (md MetalDrawable) Texture() mtl.Texture {
|
||||
return mtl.NewTexture(C.MetalDrawable_Texture(md.metalDrawable))
|
||||
}
|
||||
|
||||
func (md MetalDrawable) Release() {
|
||||
C.MetalDrawable_Release(md.metalDrawable)
|
||||
}
|
||||
|
@ -31,4 +31,3 @@ void MetalLayer_SetDrawableSize(void *metalLayer, double width, double height);
|
||||
void *MetalLayer_NextDrawable(void *metalLayer);
|
||||
|
||||
void *MetalDrawable_Texture(void *drawable);
|
||||
void MetalDrawable_Release(void *drawable);
|
||||
|
@ -89,7 +89,3 @@ void *MetalLayer_NextDrawable(void *metalLayer) {
|
||||
void *MetalDrawable_Texture(void *metalDrawable) {
|
||||
return ((id<CAMetalDrawable>)metalDrawable).texture;
|
||||
}
|
||||
|
||||
void MetalDrawable_Release(void *metalDrawable) {
|
||||
[(id<CAMetalDrawable>)metalDrawable release];
|
||||
}
|
||||
|
@ -598,7 +598,6 @@ func (d *Driver) Draw(indexLen int, indexOffset int, mode graphics.CompositeMode
|
||||
}
|
||||
t = d.screenDrawable.Texture()
|
||||
} else {
|
||||
d.screenDrawable.Release()
|
||||
d.screenDrawable = ca.MetalDrawable{}
|
||||
t = d.dst.texture
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user