Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization: avoid generating data-driven fill-outline-color buffers if fill-antialias is false #12353

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/data/program_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,10 @@ export default class ProgramConfiguration {

for (const property in layer.paint._values) {
if (!filterProperties(property)) continue;

// optimization: ignore fill-outline-color if antialias is disabled
if ((property: any) === 'fill-outline-color' && ((layer.paint: any).get('fill-antialias') === false)) continue;

const value = layer.paint.get(property);
if (!(value instanceof PossiblyEvaluatedPropertyValue) || !supportsPropertyExpression(value.property.specification)) {
continue;
Expand Down