aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/exp/shiny/driver/mtldriver/buffer.go
blob: 987d75adefb98eb726414bbc2b9c5033efc9bc85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build darwin
// +build darwin

package mtldriver

import "image"

// bufferImpl implements screen.Buffer.
type bufferImpl struct {
	rgba *image.RGBA
}

func (*bufferImpl) Release()                  {}
func (b *bufferImpl) Size() image.Point       { return b.rgba.Rect.Max }
func (b *bufferImpl) Bounds() image.Rectangle { return b.rgba.Rect }
func (b *bufferImpl) RGBA() *image.RGBA       { return b.rgba }