mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 22:56:11 +03:00
remove viewer.destroy() from some tests
This commit is contained in:
parent
83ec2bb1f0
commit
3a5a738508
@ -197,7 +197,7 @@
|
|||||||
|
|
||||||
// Delete all our created resources
|
// Delete all our created resources
|
||||||
gl.deleteBuffer(this._glUnitQuadBuffer);
|
gl.deleteBuffer(this._glUnitQuadBuffer);
|
||||||
gl.deleteBuffer(this._glFrameBuffer);
|
gl.deleteFramebuffer(this._glFrameBuffer);
|
||||||
// TO DO: if/when render buffers or frame buffers are used, release them:
|
// TO DO: if/when render buffers or frame buffers are used, release them:
|
||||||
// gl.deleteRenderbuffer(someRenderbuffer);
|
// gl.deleteRenderbuffer(someRenderbuffer);
|
||||||
// gl.deleteFramebuffer(someFramebuffer);
|
// gl.deleteFramebuffer(someFramebuffer);
|
||||||
@ -749,9 +749,17 @@
|
|||||||
let gl = this._gl;
|
let gl = this._gl;
|
||||||
let canvas = tileContext.canvas;
|
let canvas = tileContext.canvas;
|
||||||
|
|
||||||
// This depends on gl.TEXTURE_2D being bound to the texture
|
try{
|
||||||
// associated with this canvas before calling this function
|
if(!canvas){
|
||||||
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas);
|
throw('Tile context does not have a canvas', tileContext);
|
||||||
|
}
|
||||||
|
// This depends on gl.TEXTURE_2D being bound to the texture
|
||||||
|
// associated with this canvas before calling this function
|
||||||
|
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, canvas);
|
||||||
|
} catch (e){
|
||||||
|
$.console.error('Error uploading image data to WebGL', e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
test/modules/controls.js
vendored
6
test/modules/controls.js
vendored
@ -19,9 +19,9 @@
|
|||||||
if (viewer && viewer.close) {
|
if (viewer && viewer.close) {
|
||||||
viewer.close();
|
viewer.close();
|
||||||
}
|
}
|
||||||
if (viewer && viewer.destroy){
|
// if (viewer && viewer.destroy){
|
||||||
viewer.destroy();
|
// viewer.destroy();
|
||||||
}
|
// }
|
||||||
|
|
||||||
viewer = null;
|
viewer = null;
|
||||||
}
|
}
|
||||||
|
@ -42,12 +42,12 @@
|
|||||||
|
|
||||||
resetTestVariables();
|
resetTestVariables();
|
||||||
|
|
||||||
if ( viewer && viewer.close ) {
|
// if ( viewer && viewer.close ) {
|
||||||
viewer.close();
|
// viewer.close();
|
||||||
}
|
// }
|
||||||
if (viewer && viewer.destroy){
|
// if (viewer && viewer.destroy){
|
||||||
viewer.destroy();
|
// viewer.destroy();
|
||||||
}
|
// }
|
||||||
|
|
||||||
viewer = null;
|
viewer = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user