Skip to content

Commit

Permalink
populate paint arrays once per line feature (#9452)
Browse files Browse the repository at this point in the history
instead of once per linestring in a multiline
  • Loading branch information
ansis authored Mar 24, 2020
1 parent a2afce6 commit eeab959
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/data/bucket/line_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,13 @@ class LineBucket implements Bucket {
const roundLimit = layout.get('line-round-limit');

for (const line of geometry) {
this.addLine(line, feature, join, cap, miterLimit, roundLimit, index, canonical, imagePositions);
this.addLine(line, feature, join, cap, miterLimit, roundLimit);
}

this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature, index, imagePositions, canonical);
}

addLine(vertices: Array<Point>, feature: BucketFeature, join: string, cap: string, miterLimit: number, roundLimit: number, index: number, canonical: CanonicalTileID, imagePositions: {[_: string]: ImagePosition}) {
addLine(vertices: Array<Point>, feature: BucketFeature, join: string, cap: string, miterLimit: number, roundLimit: number) {
this.distance = 0;
this.scaledDistance = 0;
this.totalDistance = 0;
Expand Down Expand Up @@ -468,8 +470,6 @@ class LineBucket implements Bucket {
}
}
}

this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature, index, imagePositions, canonical);
}

/**
Expand Down

0 comments on commit eeab959

Please sign in to comment.