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
@@ -8,6 +8,6 @@ import (
"gioui.org/app/internal/egl"
)
func newGLContext() (glContext, error) {
func newGLContext() (backend, error) {
return egl.NewContext(egl.EGL_DEFAULT_DISPLAY)
}