From 161b15c6aaf13112ddc38a9108ee4abbec94adfa Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 7 Aug 2012 10:04:20 +0200 Subject: [PATCH] Log WebGLContext{Lost,Restored} events in debug mode --- src/ol/webgl/map.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ol/webgl/map.js b/src/ol/webgl/map.js index 2689f57fa5..77ca6306e5 100644 --- a/src/ol/webgl/map.js +++ b/src/ol/webgl/map.js @@ -478,6 +478,9 @@ ol.webgl.Map.prototype.handleSizeChanged = function() { * @protected */ ol.webgl.Map.prototype.handleWebGLContextLost = function(event) { + if (goog.DEBUG) { + ol.webgl.map.logger.info('WebGLContextLost'); + } event.preventDefault(); this.locations_ = null; this.arrayBuffer_ = null; @@ -494,6 +497,9 @@ ol.webgl.Map.prototype.handleWebGLContextLost = function(event) { * @protected */ ol.webgl.Map.prototype.handleWebGLContextRestored = function() { + if (goog.DEBUG) { + ol.webgl.map.logger.info('WebGLContextRestored'); + } var gl = this.gl_; gl.activeTexture(goog.webgl.TEXTURE0); gl.blendFunc(goog.webgl.SRC_ALPHA, goog.webgl.ONE_MINUS_SRC_ALPHA);