From 530649073361430f35f367eb6a440a3c4ed3e542 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Fri, 23 Mar 2018 12:17:42 +0100 Subject: [PATCH] Module type for ol.webgl.Context --- src/ol/render/Event.js | 4 ++-- src/ol/render/webgl/CircleReplay.js | 4 ++-- src/ol/render/webgl/Immediate.js | 2 +- src/ol/render/webgl/LineStringReplay.js | 2 +- src/ol/render/webgl/PolygonReplay.js | 2 +- src/ol/render/webgl/Replay.js | 18 +++++++++--------- src/ol/render/webgl/ReplayGroup.js | 12 ++++++------ src/ol/render/webgl/TextureReplay.js | 2 +- src/ol/renderer/webgl/Layer.js | 6 +++--- src/ol/renderer/webgl/Map.js | 4 ++-- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/ol/render/Event.js b/src/ol/render/Event.js index d02c89fbfd..1ce0bcc3c9 100644 --- a/src/ol/render/Event.js +++ b/src/ol/render/Event.js @@ -12,7 +12,7 @@ import Event from '../events/Event.js'; * @param {ol.render.VectorContext=} opt_vectorContext Vector context. * @param {module:ol/PluggableMap~FrameState=} opt_frameState Frame state. * @param {?CanvasRenderingContext2D=} opt_context Context. - * @param {?ol.webgl.Context=} opt_glContext WebGL Context. + * @param {?module:ol/webgl/Context~WebGLContext=} opt_glContext WebGL Context. */ const RenderEvent = function( type, opt_vectorContext, opt_frameState, opt_context, @@ -45,7 +45,7 @@ const RenderEvent = function( /** * WebGL context. Only available when a WebGL renderer is used, null * otherwise. - * @type {ol.webgl.Context|null|undefined} + * @type {module:ol/webgl/Context~WebGLContext|null|undefined} * @api */ this.glContext = opt_glContext; diff --git a/src/ol/render/webgl/CircleReplay.js b/src/ol/render/webgl/CircleReplay.js index 03a39f2968..d5f5c92dba 100644 --- a/src/ol/render/webgl/CircleReplay.js +++ b/src/ol/render/webgl/CircleReplay.js @@ -181,7 +181,7 @@ WebGLCircleReplay.prototype.finish = function(context) { WebGLCircleReplay.prototype.getDeleteResourcesFunction = function(context) { // We only delete our stuff here. The shaders and the program may // be used by other CircleReplay instances (for other layers). And - // they will be deleted when disposing of the ol.webgl.Context + // they will be deleted when disposing of the module:ol/webgl/Context~WebGLContext // object. const verticesBuffer = this.verticesBuffer; const indicesBuffer = this.indicesBuffer; @@ -311,7 +311,7 @@ WebGLCircleReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, contex /** * @private * @param {WebGLRenderingContext} gl gl. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {Object} skippedFeaturesHash Ids of features to skip. */ WebGLCircleReplay.prototype.drawReplaySkipping_ = function(gl, context, skippedFeaturesHash) { diff --git a/src/ol/render/webgl/Immediate.js b/src/ol/render/webgl/Immediate.js index 27ab73dd39..3cec0bbc9e 100644 --- a/src/ol/render/webgl/Immediate.js +++ b/src/ol/render/webgl/Immediate.js @@ -11,7 +11,7 @@ import WebGLReplayGroup from '../webgl/ReplayGroup.js'; /** * @constructor * @extends {ol.render.VectorContext} - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {module:ol/coordinate~Coordinate} center Center. * @param {number} resolution Resolution. * @param {number} rotation Rotation. diff --git a/src/ol/render/webgl/LineStringReplay.js b/src/ol/render/webgl/LineStringReplay.js index 92cdddb20d..ce18544dbe 100644 --- a/src/ol/render/webgl/LineStringReplay.js +++ b/src/ol/render/webgl/LineStringReplay.js @@ -549,7 +549,7 @@ WebGLLineStringReplay.prototype.drawReplay = function(gl, context, skippedFeatur /** * @private * @param {WebGLRenderingContext} gl gl. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {Object} skippedFeaturesHash Ids of features to skip. */ WebGLLineStringReplay.prototype.drawReplaySkipping_ = function(gl, context, skippedFeaturesHash) { diff --git a/src/ol/render/webgl/PolygonReplay.js b/src/ol/render/webgl/PolygonReplay.js index 30fee93002..8047c4f361 100644 --- a/src/ol/render/webgl/PolygonReplay.js +++ b/src/ol/render/webgl/PolygonReplay.js @@ -986,7 +986,7 @@ WebGLPolygonReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, conte /** * @private * @param {WebGLRenderingContext} gl gl. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {Object} skippedFeaturesHash Ids of features to skip. */ WebGLPolygonReplay.prototype.drawReplaySkipping_ = function(gl, context, skippedFeaturesHash) { diff --git a/src/ol/render/webgl/Replay.js b/src/ol/render/webgl/Replay.js index d27e617649..661f394238 100644 --- a/src/ol/render/webgl/Replay.js +++ b/src/ol/render/webgl/Replay.js @@ -125,7 +125,7 @@ inherits(WebGLReplay, VectorContext); /** * @abstract - * @param {ol.webgl.Context} context WebGL context. + * @param {module:ol/webgl/Context~WebGLContext} context WebGL context. * @return {function()} Delete resources function. */ WebGLReplay.prototype.getDeleteResourcesFunction = function(context) {}; @@ -133,7 +133,7 @@ WebGLReplay.prototype.getDeleteResourcesFunction = function(context) {}; /** * @abstract - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. */ WebGLReplay.prototype.finish = function(context) {}; @@ -142,7 +142,7 @@ WebGLReplay.prototype.finish = function(context) {}; * @abstract * @protected * @param {WebGLRenderingContext} gl gl. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {module:ol/size~Size} size Size. * @param {number} pixelRatio Pixel ratio. * @return {ol.render.webgl.circlereplay.defaultshader.Locations| @@ -169,7 +169,7 @@ WebGLReplay.prototype.shutDownProgram = function(gl, locations) {}; * @abstract * @protected * @param {WebGLRenderingContext} gl gl. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {Object.} skippedFeaturesHash Ids of features * to skip. * @param {boolean} hitDetection Hit detection mode. @@ -181,7 +181,7 @@ WebGLReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hi * @abstract * @protected * @param {WebGLRenderingContext} gl gl. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {Object.} skippedFeaturesHash Ids of features * to skip. * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback. @@ -196,7 +196,7 @@ WebGLReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, ski /** * @protected * @param {WebGLRenderingContext} gl gl. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {Object.} skippedFeaturesHash Ids of features * to skip. * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback. @@ -223,7 +223,7 @@ WebGLReplay.prototype.drawHitDetectionReplay = function(gl, context, skippedFeat /** * @protected * @param {WebGLRenderingContext} gl gl. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {Object.} skippedFeaturesHash Ids of features * to skip. * @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback. @@ -245,7 +245,7 @@ WebGLReplay.prototype.drawHitDetectionReplayAll = function(gl, context, skippedF /** - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {module:ol/coordinate~Coordinate} center Center. * @param {number} resolution Resolution. * @param {number} rotation Rotation. @@ -353,7 +353,7 @@ WebGLReplay.prototype.replay = function(context, /** * @protected * @param {WebGLRenderingContext} gl gl. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {number} start Start index. * @param {number} end End index. */ diff --git a/src/ol/render/webgl/ReplayGroup.js b/src/ol/render/webgl/ReplayGroup.js index 5d57702842..cb59c906cb 100644 --- a/src/ol/render/webgl/ReplayGroup.js +++ b/src/ol/render/webgl/ReplayGroup.js @@ -81,7 +81,7 @@ WebGLReplayGroup.prototype.addDeclutter = function(style, group) {}; /** - * @param {ol.webgl.Context} context WebGL context. + * @param {module:ol/webgl/Context~WebGLContext} context WebGL context. * @return {function()} Delete resources function. */ WebGLReplayGroup.prototype.getDeleteResourcesFunction = function(context) { @@ -106,7 +106,7 @@ WebGLReplayGroup.prototype.getDeleteResourcesFunction = function(context) { /** - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. */ WebGLReplayGroup.prototype.finish = function(context) { let zKey; @@ -151,7 +151,7 @@ WebGLReplayGroup.prototype.isEmpty = function() { /** - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {module:ol/coordinate~Coordinate} center Center. * @param {number} resolution Resolution. * @param {number} rotation Rotation. @@ -186,7 +186,7 @@ WebGLReplayGroup.prototype.replay = function(context, /** * @private - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {module:ol/coordinate~Coordinate} center Center. * @param {number} resolution Resolution. * @param {number} rotation Rotation. @@ -232,7 +232,7 @@ WebGLReplayGroup.prototype.replayHitDetection_ = function(context, /** * @param {module:ol/coordinate~Coordinate} coordinate Coordinate. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {module:ol/coordinate~Coordinate} center Center. * @param {number} resolution Resolution. * @param {number} rotation Rotation. @@ -287,7 +287,7 @@ WebGLReplayGroup.prototype.forEachFeatureAtCoordinate = function( /** * @param {module:ol/coordinate~Coordinate} coordinate Coordinate. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {module:ol/coordinate~Coordinate} center Center. * @param {number} resolution Resolution. * @param {number} rotation Rotation. diff --git a/src/ol/render/webgl/TextureReplay.js b/src/ol/render/webgl/TextureReplay.js index a33efa7baf..5c8fb36feb 100644 --- a/src/ol/render/webgl/TextureReplay.js +++ b/src/ol/render/webgl/TextureReplay.js @@ -362,7 +362,7 @@ WebGLTextureReplay.prototype.drawReplay = function(gl, context, skippedFeaturesH * * @protected * @param {WebGLRenderingContext} gl gl. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @param {Object.} skippedFeaturesHash Ids of features * to skip. * @param {Array.} textures Textures. diff --git a/src/ol/renderer/webgl/Layer.js b/src/ol/renderer/webgl/Layer.js index fded21b22b..e8673fbeeb 100644 --- a/src/ol/renderer/webgl/Layer.js +++ b/src/ol/renderer/webgl/Layer.js @@ -139,7 +139,7 @@ WebGLLayerRenderer.prototype.bindFramebuffer = function(frameState, framebufferD /** * @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/layer/Layer~State} layerState Layer state. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. */ WebGLLayerRenderer.prototype.composeFrame = function(frameState, layerState, context) { @@ -183,7 +183,7 @@ WebGLLayerRenderer.prototype.composeFrame = function(frameState, layerState, con /** * @param {ol.render.EventType} type Event type. - * @param {ol.webgl.Context} context WebGL context. + * @param {module:ol/webgl/Context~WebGLContext} context WebGL context. * @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @private */ @@ -245,7 +245,7 @@ WebGLLayerRenderer.prototype.handleWebGLContextLost = function() { * @abstract * @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/layer/Layer~State} layerState Layer state. - * @param {ol.webgl.Context} context Context. + * @param {module:ol/webgl/Context~WebGLContext} context Context. * @return {boolean} whether composeFrame should be called. */ WebGLLayerRenderer.prototype.prepareFrame = function(frameState, layerState, context) {}; diff --git a/src/ol/renderer/webgl/Map.js b/src/ol/renderer/webgl/Map.js index b2d9c8a2d0..bf71762e50 100644 --- a/src/ol/renderer/webgl/Map.js +++ b/src/ol/renderer/webgl/Map.js @@ -92,7 +92,7 @@ const WebGLMapRenderer = function(container, map) { /** * @private - * @type {ol.webgl.Context} + * @type {module:ol/webgl/Context~WebGLContext} */ this.context_ = new WebGLContext(this.canvas_, this.gl_); @@ -335,7 +335,7 @@ WebGLMapRenderer.prototype.expireCache_ = function(map, frameState) { /** - * @return {ol.webgl.Context} The context. + * @return {module:ol/webgl/Context~WebGLContext} The context. */ WebGLMapRenderer.prototype.getContext = function() { return this.context_;