-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 #8273: Layer#setPaintProperty returns true for CrossFadedDataDriv… #8289
Conversation
👍 want to add a new test ensuring this keeps working moving forward? |
Is it correct to try to land a test in |
@ahk yep, set it up to reproduce the erstwhile error state and make sure getPaintProperty returns what you expect can also do a render test to make sure the proper pattern applies, but seems like a unit test should suffice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding a render test would be more useful than a unit test for this case.
@asheemmamoowala I read through a ton of the render tests, wanted to make sure my thinking was correct before I created one. I think I should land a test into the |
@ahk correct! One small note is that we're trying to add small-sized tests if possible (so not 512x512 like the one above, but e.g. 64x64 if it still can exercise the bug). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
This patch fixes a bug reported in issue #8273. Users were unable to update
line-pattern
property images viaMap#setPaintProperty.
There is only one change and it removes an unnecessary check that the previous value for this property didn't exist. As long as the value has changed (which is checked inStyle#setPaintProperty
before deferral to the layer) then the layer needs to be updated, or for example the image used for the property value isn't added to the texture atlas.It's possible this affects performance, but benchmarks didn't seem to indicate that. I can imagine that some updates from a non-image value would only need re-layout on changing to or from a null value. Any opinions on that question are greatly appreciated.
Launch Checklist