do not use shared pointers for buckets

This commit is contained in:
Konstantin Käfer
2014-01-23 15:12:31 +01:00
parent 50021b730c
commit dba3be9829
7 changed files with 30 additions and 40 deletions

View File

@@ -68,7 +68,7 @@ public:
linevertexbuffer lineVertex;
debug_font_buffer debugFontVertex;
std::shared_ptr<FillBuffer> fillBuffer;
FillBuffer fillBuffer;
std::forward_list<Layer> layers;

View File

@@ -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;
};

View File

@@ -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;

View File

@@ -34,7 +34,6 @@ struct FillStyle {
float stroke_width = 1;
};
class Style {
public:
StrokeStyle strokeStyle(const std::string& layer_name) const;