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

Fix undefined type error when removing line-gradient paint property #10557

Merged
merged 1 commit into from
Apr 12, 2021

Conversation

astojilj
Copy link
Contributor

Render test is added to cover triple buffering in gl-native's Metal backend. There, solid color and gradient line program reuse the same uniform buffer: this test specifically covers the case when, for one layer, line program (with larger uniform buffer requirements) is used after line_gradient program (when line-gradient paint property gets disabled).

In gl-js, this triggered Uncaught TypeError: Cannot read property 'expression' of undefined in

this.stepInterpolant = expression._styleExpression.expression instanceof Step;

Fix for it is included here.

Render test is added to cover triple buffering line programs in Metal.
Solid color and gradient line program uses the same uniform buffer: this test covers the case when, for one layer, line program (with larger uniform buffer requirements) is used after line_gradient.

In gl-js this triggered `Uncaught TypeError: Cannot read property 'expression' of undefined` in https://github.com/mapbox/mapbox-gl-js/blob/d66ff288e7ab2e917e9e676bee942dd6a46171e7/src/style/style_layer/line_style_layer.js#L64.
@mourner mourner merged commit 689a177 into main Apr 12, 2021
@mourner mourner deleted the astojilj-3buffer-test branch April 12, 2021 09:11
@karimnaaji karimnaaji added this to the v2.3 milestone May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants