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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geojs",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "JavaScript Geo Visualization and Analysis Library",
5
5
  "homepage": "https://github.com/OpenGeoscience/geojs",
6
6
  "license": "Apache-2.0",
@@ -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 ((quad.image.width > 4096 || quad.image.height > 4096 || quad.image.width * quad.image.height > 4194304) && context.getError() === context.OUT_OF_MEMORY) {
377
- console.log('Insufficient GPU memory for texture');
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;