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 -5
View File
@@ -11,18 +11,18 @@ import (
"strings"
"gioui.org/app/internal/glimpl"
"gioui.org/gpu/gl"
"gioui.org/app/internal/srgb"
)
type Context struct {
c gl.Functions
c *glimpl.Functions
disp _EGLDisplay
eglCtx *eglContext
eglSurf _EGLSurface
width, height int
refreshFBO bool
// For sRGB emulation.
srgbFBO *gl.SRGBFBO
srgbFBO *srgb.SRGBFBO
}
type eglContext struct {
@@ -115,7 +115,7 @@ func NewContext(disp NativeDisplayType) (*Context, error) {
return c, nil
}
func (c *Context) Functions() gl.Functions {
func (c *Context) Functions() *glimpl.Functions {
return c.c
}
@@ -161,7 +161,7 @@ func (c *Context) MakeCurrent() error {
}
if c.srgbFBO == nil {
var err error
c.srgbFBO, err = gl.NewSRGBFBO(c.c)
c.srgbFBO, err = srgb.NewSRGBFBO(c.c)
if err != nil {
return err
}