gpu: Merge GPU.Collect and GPU.Frame

There's no meaningful reason to have them separate. The intention was to
enable rendering concurrent with other processing, but that's gaining
framerate at the expense of input latency and complicating ImageOp
semantics.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-08-24 08:25:10 +02:00
parent 7acc031ccf
commit 414be0a0b3
6 changed files with 22 additions and 40 deletions
+1 -6
View File
@@ -16,9 +16,6 @@ import (
)
// ImageOp sets the brush to an image.
//
// Note: the ImageOp may keep a reference to the backing image.
// See NewImageOp for details.
type ImageOp struct {
uniform bool
color color.NRGBA
@@ -47,9 +44,7 @@ type LinearGradientOp struct {
type PaintOp struct {
}
// NewImageOp creates an ImageOp backed by src. See
// gioui.org/io/system.FrameEvent for a description of when data
// referenced by operations is safe to re-use.
// NewImageOp creates an ImageOp backed by src.
//
// NewImageOp assumes the backing image is immutable, and may cache a
// copy of its contents in a GPU-friendly way. Create new ImageOps to