app/internal/srgb: move sRGB emulation to new internal package

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-10 16:53:51 +01:00
parent 3ae5a37c24
commit adb950cbf3
11 changed files with 81 additions and 80 deletions
+5 -3
View File
@@ -9,6 +9,8 @@ import (
"image"
"runtime"
"gioui.org/app/internal/glimpl"
"gioui.org/app/internal/srgb"
"gioui.org/gpu"
"gioui.org/gpu/gl"
"gioui.org/op"
@@ -18,12 +20,12 @@ import (
type Window struct {
size image.Point
ctx context
fbo *gl.SRGBFBO
fbo *srgb.SRGBFBO
gpu *gpu.GPU
}
type context interface {
Functions() gl.Functions
Functions() *glimpl.Functions
MakeCurrent() error
ReleaseCurrent()
Release()
@@ -41,7 +43,7 @@ func NewWindow(width, height int) (*Window, error) {
}
err = contextDo(ctx, func() error {
f := ctx.Functions()
fbo, err := gl.NewSRGBFBO(f)
fbo, err := srgb.NewSRGBFBO(f)
if err != nil {
ctx.Release()
return err