gpu: don't panic for nil op.Ops argument to GPU.Frame

Updates gio#306

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-11-10 13:19:42 +01:00
parent 3f25a49c75
commit 5ddd572a41
4 changed files with 19 additions and 3 deletions
+5 -1
View File
@@ -1723,7 +1723,11 @@ func (c *collector) addClip(state *encoderState, viewport, bounds f32.Rectangle,
func (c *collector) collect(root *op.Ops, viewport image.Point, texOps *[]textureOp) {
fview := f32.Rectangle{Max: layout.FPt(viewport)}
c.reader.Reset(&root.Internal)
var intOps *ops.Ops
if root != nil {
intOps = &root.Internal
}
c.reader.Reset(intOps)
var state encoderState
reset := func() {
state = encoderState{