forked from joejulian/gio
app/internal/glimpl: [wasm] remove slow getError calls
The removal of getError significantly improves performance on js/wasm: Opera 72 (w/ AMD Ryzen 3900X): ~12.29ms per frame to ~8.09ms; Chrome 87 (w/ Snapdragon 435): ~156.34ms per frame to ~94.31ms; Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
@@ -185,7 +185,8 @@ func (f *Functions) FramebufferTexture2D(target, attachment, texTarget gl.Enum,
|
||||
f.Ctx.Call("framebufferTexture2D", int(target), int(attachment), int(texTarget), js.Value(t), level)
|
||||
}
|
||||
func (f *Functions) GetError() gl.Enum {
|
||||
return gl.Enum(f.Ctx.Call("getError").Int())
|
||||
// Avoid slow getError calls. See gio#179.
|
||||
return 0
|
||||
}
|
||||
func (f *Functions) GetRenderbufferParameteri(target, pname gl.Enum) int {
|
||||
return paramVal(f.Ctx.Call("getRenderbufferParameteri", int(pname)))
|
||||
|
||||
Reference in New Issue
Block a user