| 166 | } |
| 167 | |
| 168 | func (f FramebufferAttachmentInfo) equal(o FramebufferAttachmentInfo) bool { |
| 169 | fe := (f.Format == nil && o.Format == nil) || (f.Format != nil && o.Format != nil && f.Format.Name == o.Format.Name) |
| 170 | if (f.Err == nil) != (o.Err == nil) { |
| 171 | return false |
| 172 | } |
| 173 | if f.Err == nil { |
| 174 | return fe && f.Width == o.Width && f.Height == o.Height && f.Index == o.Index && f.CanResize == o.CanResize |
| 175 | } |
| 176 | return f.Err.Error() == o.Err.Error() |
| 177 | } |
| 178 | |
| 179 | func (c framebufferAttachmentChanges) after(ctx context.Context, i api.SubCmdIdx) (FramebufferAttachmentInfo, error) { |
| 180 | idx := sort.Search(len(c.changes), func(x int) bool { return i.LessThan(c.changes[x].After) }) - 1 |