-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
5fe6a4a
to
d1ea075
Compare
d1ea075
to
17b4361
Compare
@@ -159,7 +159,7 @@ global.objCTestValue = function (property, layerType, arraysAsStructs, indent) { | |||
`@"'${_.startCase(propertyName)}'"` : | |||
`@"${_.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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
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.
yes ticket in mapbox/mapbox-gl-native-android#33
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
platform/glfw/glfw_view.cpp
Outdated
using namespace mbgl; | ||
FeatureState newState; | ||
|
||
if (result.size() > 0) { |
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.
nit: !result.empty()
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.
Done
platform/glfw/glfw_view.cpp
Outdated
} | ||
} | ||
} else { | ||
if (view->featureID) { |
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.
nit: else if
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.
Done
src/mbgl/renderer/bucket.hpp
Outdated
@@ -50,7 +52,9 @@ class Bucket { | |||
bool needsUpload() const { | |||
return hasData() && !uploaded; | |||
} | |||
|
|||
|
|||
virtual bool uploadPending() const { return needsUpload() || stateChanged; } |
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.
why couldn't we just check stateChanged
insideneedsUpload()
?
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.
Done
} | ||
stateChanged = updated; |
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 see this snippet being repeated several times, can it be shared?
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.
maybe put to a basic class?
@@ -109,9 +110,19 @@ class PaintPropertyBinder { | |||
const ImagePositions&, const optional<PatternDependency>&, | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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