Skip to content

Commit

Permalink
Ensure each tile symbol tile uses its own unique Program based on its…
Browse files Browse the repository at this point in the history
… state
  • Loading branch information
Arindam Bose committed Apr 2, 2020
1 parent 54e3408 commit 9f1aba5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/render/draw_symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,6 @@ function drawLayerSymbols(painter, sourceCache, layer, coords, isText, translate

const depthMode = painter.depthModeForSublayer(0, DepthMode.ReadOnly);

let program;
let size;
const variablePlacement = layer.layout.get('text-variable-anchor');

const tileRenderState: Array<SymbolTileRenderState> = [];
Expand All @@ -259,10 +257,8 @@ function drawLayerSymbols(painter, sourceCache, layer, coords, isText, translate
const sizeData = isText ? bucket.textSizeData : bucket.iconSizeData;
const transformed = pitchWithMap || tr.pitch !== 0;

if (!program) {
program = painter.useProgram(getSymbolProgramName(isSDF, isText, bucket), programConfiguration);
size = symbolSize.evaluateSizeForZoom(sizeData, tr.zoom);
}
const program = painter.useProgram(getSymbolProgramName(isSDF, isText, bucket), programConfiguration);
const size = symbolSize.evaluateSizeForZoom(sizeData, tr.zoom);

let texSize: [number, number];
let texSizeIcon: [number, number] = [0, 0];
Expand Down

0 comments on commit 9f1aba5

Please sign in to comment.