mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56: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 canvasElement = document.createElement( 'canvas' );
|
||||||
let webglContext = $.isFunction( canvasElement.getContext ) &&
|
let webglContext = $.isFunction( canvasElement.getContext ) &&
|
||||||
canvasElement.getContext( 'webgl' );
|
canvasElement.getContext( 'webgl' );
|
||||||
let ext = webglContext.getExtension('WEBGL_lose_context');
|
let ext = webglContext && webglContext.getExtension('WEBGL_lose_context');
|
||||||
if(ext){
|
if(ext){
|
||||||
ext.loseContext();
|
ext.loseContext();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user