Move UBO updates from render layers to tweakers (#2703)

This commit is contained in:
Tim Sylvester
2024-09-10 11:37:50 -07:00
committed by GitHub
parent f74f4ff3cf
commit 29319a76bf
24 changed files with 563 additions and 657 deletions

View File

@@ -18,12 +18,16 @@
namespace mbgl {
class Bucket;
class Color;
class PaintParameters;
class LayerTweaker;
class PaintParameters;
class PaintPropertyBindersBase;
enum class RenderPass : uint8_t;
class RenderTile;
using LayerTweakerPtr = std::shared_ptr<LayerTweaker>;
using RenderTiles = std::shared_ptr<const std::vector<std::reference_wrapper<const RenderTile>>>;
namespace gfx {
@@ -245,6 +249,17 @@ public:
/// Set origin point
void setOrigin(std::optional<Point<double>> p) { origin = std::move(p); }
/// Get the property binders used for property updates
PaintPropertyBindersBase* getBinders();
const PaintPropertyBindersBase* getBinders() const;
/// Set the property binders used for property updates
void setBinders(std::shared_ptr<Bucket>, PaintPropertyBindersBase*);
const RenderTile* getRenderTile() const;
const std::shared_ptr<Bucket>& getBucket() const;
void setRenderTile(Immutable<std::vector<RenderTile>>, const RenderTile*);
const std::chrono::duration<double> createTime = util::MonotonicTimer::now();
protected:

View File

@@ -23,10 +23,10 @@ class LayerProperties;
enum class TranslateAnchorType : bool;
} // namespace style
class TransformState;
class LayerGroupBase;
class PaintParameters;
class RenderTree;
class TransformState;
class UnwrappedTileID;
/**

View File

@@ -8,14 +8,14 @@
namespace mbgl {
#if MLN_USE_UNORDERED_DENSE
template <typename Key, typename Value>
using unordered_map = ankerl::unordered_dense::map<Key, Value>;
template <typename Key, typename Value, typename Hash = std::hash<Key>>
using unordered_map = ankerl::unordered_dense::map<Key, Value, Hash>;
template <typename Value>
using unordered_set = ankerl::unordered_dense::set<Value>;
#else
template <typename Key, typename Value>
using unordered_map = std::unordered_map<Key, Value>;
template <typename Key, typename Value, typename Hash = std::hash<Key>>
using unordered_map = std::unordered_map<Key, Value, Hash>;
template <typename Value>
using unordered_set = std::unordered_set<Value>;