fix GLFrame.SetBounds to not reallocate when not necessary
This commit is contained in:
parent
b41e117ac6
commit
8db95af845
|
@ -24,6 +24,10 @@ func NewGLFrame(bounds pixel.Rect) *GLFrame {
|
|||
|
||||
// SetBounds resizes the GLFrame to the new bounds.
|
||||
func (gf *GLFrame) SetBounds(bounds pixel.Rect) {
|
||||
if bounds == gf.Bounds() {
|
||||
return
|
||||
}
|
||||
|
||||
mainthread.Call(func() {
|
||||
oldF := gf.frame
|
||||
|
||||
|
|
Loading…
Reference in New Issue