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
@@ -16,7 +16,7 @@ type jsContext struct {
f *glimpl.Functions
}
func newGLContext() (glContext, error) {
func newGLContext() (backend, error) {
version := 2
doc := js.Global().Get("document")
cnv := doc.Call("createElement", "canvas")