Move WebGL typedefs out of src/ol/typedefs.js

This commit is contained in:
Frederic Junod
2018-03-23 13:22:51 +01:00
parent 5306490733
commit 873b01bba5
5 changed files with 75 additions and 71 deletions

View File

@@ -25,6 +25,14 @@ import WebGLContext from '../../webgl/Context.js';
import ContextEventType from '../../webgl/ContextEventType.js';
/**
* @typedef {Object} TextureCacheEntry
* @property {number} magFilter
* @property {number} minFilter
* @property {WebGLTexture} texture
*/
/**
* Texture cache high water mark.
* @type {number}
@@ -103,7 +111,7 @@ const WebGLMapRenderer = function(container, map) {
/**
* @private
* @type {ol.structs.LRUCache.<ol.WebglTextureCacheEntry|null>}
* @type {ol.structs.LRUCache.<module:ol/renderer/webgl/Map~TextureCacheEntry|null>}
*/
this.textureCache_ = new LRUCache();
@@ -295,9 +303,9 @@ WebGLMapRenderer.prototype.disposeInternal = function() {
if (!gl.isContextLost()) {
this.textureCache_.forEach(
/**
* @param {?ol.WebglTextureCacheEntry} textureCacheEntry
* Texture cache entry.
*/
* @param {?module:ol/renderer/webgl/Map~TextureCacheEntry} textureCacheEntry
* Texture cache entry.
*/
function(textureCacheEntry) {
if (textureCacheEntry) {
gl.deleteTexture(textureCacheEntry.texture);