app/headless: re-implement Screenshot on top of Backend

The new Framebuffer.ReadPixels method is enough to implement
Window.Screenshot. Use that instead of the OpenGL-specific
implementation.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-22 08:24:18 +01:00
parent e4a927982d
commit f305f71b20
5 changed files with 46 additions and 79 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ type nsContext struct {
prepared bool
}
func newGLContext() (glContext, error) {
func newGLContext() (backend, error) {
ctx := C.gio_headless_newContext()
return &nsContext{ctx: ctx, c: new(glimpl.Functions)}, nil
}