shareable: Revert extending images

Fixes #562
This commit is contained in:
Hajime Hoshi 2018-03-20 02:13:46 +09:00
parent be4e3ab801
commit 3e929de08a

View File

@ -40,18 +40,14 @@ func (b *backend) TryAlloc(width, height int) (*packing.Node, bool) {
return n, true return n, true
} }
// Break without extending the backend since the current Extend
// implementation includes a bug #562.
// TODO: Fix #562 and implement Extend correctly
break
if !b.page.Extend() { if !b.page.Extend() {
break break
} }
s := b.page.Size() s := b.page.Size()
newImg := restorable.NewImage(s, s, false) newImg := restorable.NewImage(s, s, false)
newImg.DrawImage(b.restorable, 0, 0, s, s, nil, nil, opengl.CompositeModeCopy, graphics.FilterNearest) w, h := b.restorable.Size()
newImg.DrawImage(b.restorable, 0, 0, w, h, nil, nil, opengl.CompositeModeCopy, graphics.FilterNearest)
b.restorable.Dispose() b.restorable.Dispose()
b.restorable = newImg b.restorable = newImg