Get returns the framebuffer dimensions and format after a given command in the given capture, command and attachment.
(ctx context.Context, after *path.Command, att api.FramebufferAttachment)
| 47 | // Get returns the framebuffer dimensions and format after a given command in |
| 48 | // the given capture, command and attachment. |
| 49 | func (c AttachmentFramebufferChanges) Get(ctx context.Context, after *path.Command, att api.FramebufferAttachment) (FramebufferAttachmentInfo, error) { |
| 50 | info, err := c.attachments[att].after(ctx, api.SubCmdIdx(after.Indices)) |
| 51 | if err != nil { |
| 52 | return FramebufferAttachmentInfo{}, err |
| 53 | } |
| 54 | if info.Err != nil { |
| 55 | log.W(ctx, "Framebuffer error after %v: %v", after, info.Err) |
| 56 | return FramebufferAttachmentInfo{}, &service.ErrDataUnavailable{Reason: messages.ErrFramebufferUnavailable()} |
| 57 | } |
| 58 | return info, nil |
| 59 | } |
| 60 | |
| 61 | const errNoAPI = fault.Const("Command has no API") |
| 62 |