Move WebGL typedefs out of src/ol/typedefs.js
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user