do not use shared pointers for buckets
This commit is contained in:
@@ -68,7 +68,7 @@ public:
|
||||
linevertexbuffer lineVertex;
|
||||
debug_font_buffer debugFontVertex;
|
||||
|
||||
std::shared_ptr<FillBuffer> fillBuffer;
|
||||
FillBuffer fillBuffer;
|
||||
|
||||
std::forward_list<Layer> layers;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ class Painter;
|
||||
|
||||
class Bucket {
|
||||
public:
|
||||
virtual void draw(const Style& style, const std::string& layerName) = 0;
|
||||
virtual void render(Painter& painter) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -13,15 +13,14 @@ struct pbf;
|
||||
|
||||
class FillBucket : public Bucket {
|
||||
public:
|
||||
FillBucket(const std::shared_ptr<FillBuffer>& buffer);
|
||||
FillBucket(FillBuffer& buffer);
|
||||
|
||||
void addGeometry(pbf& data);
|
||||
|
||||
virtual void draw(const Style& style, const std::string& layerName);
|
||||
virtual void render(Painter& painter);
|
||||
|
||||
public:
|
||||
std::shared_ptr<FillBuffer> buffer;
|
||||
FillBuffer& buffer;
|
||||
|
||||
struct group {
|
||||
uint32_t vertex_length;
|
||||
|
||||
@@ -34,7 +34,6 @@ struct FillStyle {
|
||||
float stroke_width = 1;
|
||||
};
|
||||
|
||||
|
||||
class Style {
|
||||
public:
|
||||
StrokeStyle strokeStyle(const std::string& layer_name) const;
|
||||
|
||||
Reference in New Issue
Block a user