Repository navigation
Feature state updates - #15872
Feature state updates#15872jmalanen wants to merge 6 commits into
Conversation
5fe6a4a to
d1ea075
Compare
d1ea075 to
17b4361
Compare
| `@"${_.startCase(propertyName)}"`; | ||
| case 'string': | ||
| case 'image': // TODO: replace once we implement image expressions | ||
| case 'resolvedImage': // TODO: replace once we implement image expressions |
There was a problem hiding this comment.
We'll want to make these changes in the https://github.com/mapbox/mapbox-gl-native-ios repo.
Similarly the Android ones in https://github.com/mapbox/mapbox-gl-native-android. Correct @tobrun?
| if (!missingImagesRequested) { | ||
| worker.self().invoke(&GeometryTileWorker::onImagesAvailable, | ||
| std::move(images), | ||
| std::move(patterns), | ||
| std::move(versionMap), | ||
| imageCorrelationID); | ||
| } else { | ||
| layoutResult->iconAtlas = makeImageAtlas(images, patterns, versionMap); | ||
| missingImagesRequested = false; | ||
| } |
There was a problem hiding this comment.
This needs a unit test, if for some reason missingImagesRequested is stale and set to true, we will never trigger re-layout when image manager provides requested images.
| using namespace mbgl; | ||
| FeatureState newState; | ||
|
|
||
| if (result.size() > 0) { |
| } | ||
| } | ||
| } else { | ||
| if (view->featureID) { |
| } | ||
|
|
||
|
|
||
| virtual bool uploadPending() const { return needsUpload() || stateChanged; } |
There was a problem hiding this comment.
why couldn't we just check stateChanged insideneedsUpload()?
| uploaded = false; | ||
| updated |= it->second.updateVertexVectors(states, layer, imagePositions, tile); | ||
| } | ||
| stateChanged = updated; |
There was a problem hiding this comment.
I see this snippet being repeated several times, can it be shared?
There was a problem hiding this comment.
maybe put to a basic class?
| const style::expression::Value&) = 0; | ||
|
|
||
| virtual void updateVertexVectors(const FeatureStates&, const GeometryTileLayer&, const ImagePositions&) {} | ||
| virtual bool updateVertexVectors(const FeatureStates&, |
There was a problem hiding this comment.
pls add a comment documenting the returned value
| virtual bool updateVertexVectors(const FeatureStates&, | ||
| const GeometryTileLayer&, | ||
| const ImagePositions&, | ||
| GeometryTile&) { |
There was a problem hiding this comment.
Let's not pass tile here, it's better to keep it decoupled from rendering
0d3b0ab to
b0426ff
Compare
b0426ff to
51d2589
Compare
51d2589 to
a45b876
Compare
|
@jmalanen does this need a changelog, or is it all internal code so far that doesn't impact developers until we introduce new APIs? |
This is all internal code for now that doesn't impact developers. |
|
is there anything that an outside contributor can do to help push this along? I would like to use this feature in mapbox/mapbox-gl-js#7207 |
|
Our team is very eager for this release as well. |
|
I'm stuck on an old fork of GL JS waiting for this, I'd love to see this get moving again. |
|
Thanks for all the great work. Super excited about this PR, our team has been looking forward to this for a while. Anything we can help do to get this moved along? |
|
@chapmanjacobd @jmurphy-asurity @jplante @derrickrung Which one of you are interested in the GL native version? This is currently on hold, but if you are interested in GL JS please add your request to mapbox/mapbox-gl-js#7207 |
|
Thanks for the update @jmalanen. I'm interested in both, but GL JS is more important to me. Why is this on hold? It seemed like it was nearly ready. |
[glfw] Update feature state only when the layer is visible
-- small optimization to the glfw test app
[core] Add feature state support to composite crossfade binder
-- This adds feature state support for eg. fill-pattern
-- Related gl-js PR: mapbox/mapbox-gl-js#8927
[core] Add getMissingImages API to GeometryTile
[core] Pass GeometryTile to paint property binder
-- These two are requirements for the above composite crossfade binder patch
[core] Upload buckets only when there are feature state changes
-- Optimization
Fixes: #15895