Backend returns CanvasCloser
This commit is contained in:
parent
006921d690
commit
0d93d73c32
@ -126,7 +126,7 @@ func (this *Backend) NewTexture (source image.Image) canvas.TextureCloser {
|
|||||||
return xcanvas.NewTextureFrom(source)
|
return xcanvas.NewTextureFrom(source)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Backend) NewCanvas (bounds image.Rectangle) canvas.Canvas {
|
func (this *Backend) NewCanvas (bounds image.Rectangle) canvas.CanvasCloser {
|
||||||
return xcanvas.NewCanvas(this.x, bounds)
|
return xcanvas.NewCanvas(this.x, bounds)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,9 +49,10 @@ func (this *Canvas) Push (window xproto.Window) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Close frees this canvas from the X server.
|
// Close frees this canvas from the X server.
|
||||||
func (this *Canvas) Close () {
|
func (this *Canvas) Close () error {
|
||||||
this.assert()
|
this.assert()
|
||||||
this.Image.Destroy()
|
this.Image.Destroy()
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Canvas) assert () {
|
func (this *Canvas) assert () {
|
||||||
|
Loading…
Reference in New Issue
Block a user