Skip to content

Commit

Permalink
Limit glyph atlas texture growth to 1024x1024
Browse files Browse the repository at this point in the history
  • Loading branch information
bhousel committed Jan 12, 2016
1 parent a1714e1 commit 1c3f5c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/symbol/glyph_atlas.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ GlyphAtlas.prototype.resize = function() {
var origw = this.width,
origh = this.height;

// For now, don't grow the atlas beyond 1024x1024 because of how
// texture coords pack into unsigned byte in symbol bucket.
if (origw > 512 || origh > 512) return;

if (this.texture) {
if (this.gl) {
this.gl.deleteTexture(this.texture);
Expand Down

0 comments on commit 1c3f5c6

Please sign in to comment.