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
@@ -7,14 +7,14 @@ import (
"syscall/js"
"gioui.org/app/internal/glimpl"
"gioui.org/gpu/gl"
"gioui.org/app/internal/srgb"
)
type context struct {
ctx js.Value
cnv js.Value
f gl.Functions
srgbFBO *gl.SRGBFBO
f *glimpl.Functions
srgbFBO *srgb.SRGBFBO
}
func newContext(w *window) (*context, error) {
@@ -45,7 +45,7 @@ func newContext(w *window) (*context, error) {
return c, nil
}
func (c *context) Functions() gl.Functions {
func (c *context) Functions() *glimpl.Functions {
return c.f
}
@@ -76,7 +76,7 @@ func (c *context) Unlock() {}
func (c *context) MakeCurrent() error {
if c.srgbFBO == nil {
var err error
c.srgbFBO, err = gl.NewSRGBFBO(c.f)
c.srgbFBO, err = srgb.NewSRGBFBO(c.f)
if err != nil {
c.Release()
c.srgbFBO = nil