mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +00:00
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:
+5
-1
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user