mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
app/internal/srgb: move sRGB emulation to new internal package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
type context struct {
|
||||
owner *window
|
||||
c gl.Functions
|
||||
c *glimpl.Functions
|
||||
ctx C.CFTypeRef
|
||||
layer C.CFTypeRef
|
||||
init bool
|
||||
@@ -50,7 +50,7 @@ func newContext(w *window) (*context, error) {
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func (c *context) Functions() gl.Functions {
|
||||
func (c *context) Functions() *glimpl.Functions {
|
||||
return c.c
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,7 +6,6 @@ package window
|
||||
|
||||
import (
|
||||
"gioui.org/app/internal/glimpl"
|
||||
"gioui.org/gpu/gl"
|
||||
)
|
||||
|
||||
/*
|
||||
@@ -19,7 +18,7 @@ import (
|
||||
import "C"
|
||||
|
||||
type context struct {
|
||||
c gl.Functions
|
||||
c *glimpl.Functions
|
||||
ctx C.CFTypeRef
|
||||
view C.CFTypeRef
|
||||
}
|
||||
@@ -41,7 +40,7 @@ func newContext(w *window) (*context, error) {
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func (c *context) Functions() gl.Functions {
|
||||
func (c *context) Functions() *glimpl.Functions {
|
||||
return c.c
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"gioui.org/gpu/gl"
|
||||
"gioui.org/app/internal/glimpl"
|
||||
"gioui.org/io/event"
|
||||
"gioui.org/io/system"
|
||||
"gioui.org/unit"
|
||||
@@ -32,7 +32,7 @@ type Callbacks interface {
|
||||
}
|
||||
|
||||
type Context interface {
|
||||
Functions() gl.Functions
|
||||
Functions() *glimpl.Functions
|
||||
Present() error
|
||||
MakeCurrent() error
|
||||
Release()
|
||||
|
||||
Reference in New Issue
Block a user