mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-24 06:06:09 +03:00
Merge pull request #2557 from pearcetm/acceleration-test
add check for missing webgl context in WebGLDrawer.isSupported()
This commit is contained in:
commit
2db1c2f1da
@ -195,7 +195,7 @@
|
||||
let canvasElement = document.createElement( 'canvas' );
|
||||
let webglContext = $.isFunction( canvasElement.getContext ) &&
|
||||
canvasElement.getContext( 'webgl' );
|
||||
let ext = webglContext.getExtension('WEBGL_lose_context');
|
||||
let ext = webglContext && webglContext.getExtension('WEBGL_lose_context');
|
||||
if(ext){
|
||||
ext.loseContext();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user