[core] shader program must always match bucket in render symbol layer
Before this change, `RenderSymbolLayer` with updated style was trying to render symbols using the previous bucket (with paint property binders that matched a previous program). Now, symbol bucket caches the latest corresponding paint properties (caching is happening on complete tiles only). As a result, `RenderSymbolLayer` always picks the shader program and its parameters in sync with the obtained bucket.
This commit is contained in:
@@ -71,10 +71,13 @@ RenderLayer::RenderTiles RenderLayer::filterRenderTiles(RenderTiles tiles, Filte
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tile.tile.getBucket(*baseImpl)) {
|
||||
if (Bucket* bucket = tile.tile.getBucket(*baseImpl)) {
|
||||
tile.used = true;
|
||||
tile.needsClipping |= needsClipping_;
|
||||
filtered.emplace_back(tile);
|
||||
if (tile.tile.isComplete()) {
|
||||
updateBucketPaintProperties(bucket);
|
||||
}
|
||||
}
|
||||
}
|
||||
return filtered;
|
||||
@@ -84,6 +87,10 @@ void RenderLayer::markContextDestroyed() {
|
||||
// no-op
|
||||
}
|
||||
|
||||
void RenderLayer::updateBucketPaintProperties(Bucket*) const {
|
||||
// no-op
|
||||
}
|
||||
|
||||
void RenderLayer::checkRenderability(const PaintParameters& parameters,
|
||||
const uint32_t activeBindingCount) {
|
||||
// Only warn once for every layer.
|
||||
|
||||
Reference in New Issue
Block a user