geojs 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/geo.js +10 -4
- package/geo.lean.js +10 -4
- package/geo.lean.min.js +1 -1
- package/geo.min.js +1 -1
- package/package.json +1 -1
- package/src/webgl/quadFeature.js +7 -2
package/package.json
CHANGED
package/src/webgl/quadFeature.js
CHANGED
|
@@ -3,6 +3,8 @@ var registerFeature = require('../registry').registerFeature;
|
|
|
3
3
|
var quadFeature = require('../quadFeature');
|
|
4
4
|
var timestamp = require('../timestamp');
|
|
5
5
|
|
|
6
|
+
let _memoryCheckLargestTested = 4096 * 4096;
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* Create a new instance of class quadFeature.
|
|
8
10
|
*
|
|
@@ -373,8 +375,11 @@ var webgl_quadFeature = function (arg) {
|
|
|
373
375
|
quad.texture.bind(renderState);
|
|
374
376
|
// only check if the context is out of memory when using modestly large
|
|
375
377
|
// textures. The check is slow.
|
|
376
|
-
if (
|
|
377
|
-
|
|
378
|
+
if (quad.image.width * quad.image.height > _memoryCheckLargestTested) {
|
|
379
|
+
_memoryCheckLargestTested = quad.image.width * quad.image.height;
|
|
380
|
+
if (context.getError() === context.OUT_OF_MEMORY) {
|
|
381
|
+
console.log('Insufficient GPU memory for texture');
|
|
382
|
+
}
|
|
378
383
|
}
|
|
379
384
|
if (quad.opacity !== opacity) {
|
|
380
385
|
opacity = quad.opacity;
|