diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-01-03 17:17:57 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-01-11 11:30:04 +0200 |
commit | 2bdab82dedf545b4272c534b067c68614d0355b7 (patch) | |
tree | ee437a1e8f26a25fe2e30d65db3d4e4e2985ae10 /src/mbgl/renderer/render_layer.hpp | |
parent | 2da9d483ac8bce5bfa7523f9113e1bc4ef2cbfb5 (diff) | |
download | qtlocation-mapboxgl-2bdab82dedf545b4272c534b067c68614d0355b7.tar.gz |
[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.
Diffstat (limited to 'src/mbgl/renderer/render_layer.hpp')
-rw-r--r-- | src/mbgl/renderer/render_layer.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mbgl/renderer/render_layer.hpp b/src/mbgl/renderer/render_layer.hpp index 485e5551c6..758412f932 100644 --- a/src/mbgl/renderer/render_layer.hpp +++ b/src/mbgl/renderer/render_layer.hpp @@ -96,6 +96,10 @@ protected: // Code specific to RenderTiles sorting / filtering virtual RenderTiles filterRenderTiles(RenderTiles) const; virtual void sortRenderTiles(const TransformState&); + // For some layers, we want Buckets to cache their corresponding paint properties, so that outdated buckets (and + // the cached paint properties) can be still in use while the tile is loading new buckets (which will + // correpond to the current paint properties of the layer). + virtual void updateBucketPaintProperties(Bucket*) const; using FilterFunctionPtr = bool (*)(RenderTile&); RenderTiles filterRenderTiles(RenderTiles, FilterFunctionPtr) const; |