| 1 | // Copyright 2019 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | //go:build darwin && cgo |
| 6 | |
| 7 | package mtldriver |
| 8 | |
| 9 | import "image" |
| 10 | |
| 11 | // bufferImpl implements screen.Buffer. |
| 12 | type bufferImpl struct { |
| 13 | rgba *image.RGBA |
| 14 | } |
| 15 | |
| 16 | func (*bufferImpl) Release() {} |
| 17 | func (b *bufferImpl) Size() image.Point { return b.rgba.Rect.Max } |
| 18 | func (b *bufferImpl) Bounds() image.Rectangle { return b.rgba.Rect } |
| 19 | func (b *bufferImpl) RGBA() *image.RGBA { return b.rgba } |