Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Move RenderData alongside RenderItem
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Jun 2, 2016
1 parent c902f90 commit e1a5856
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 37 deletions.
5 changes: 2 additions & 3 deletions src/mbgl/renderer/painter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@
#include <mbgl/tile/tile_id.hpp>

#include <mbgl/renderer/frame_history.hpp>
#include <mbgl/renderer/render_item.hpp>
#include <mbgl/renderer/bucket.hpp>

#include <mbgl/geometry/vao.hpp>
#include <mbgl/geometry/static_vertex_buffer.hpp>

#include <mbgl/gl/gl_config.hpp>
#include <mbgl/gl/gl.hpp>

#include <mbgl/style/render_item.hpp>
#include <mbgl/style/style.hpp>

#include <mbgl/gl/gl.hpp>

#include <mbgl/util/noncopyable.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/constants.hpp>
Expand Down
38 changes: 38 additions & 0 deletions src/mbgl/renderer/render_item.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#pragma once

#include <mbgl/util/color.hpp>

#include <set>
#include <vector>

namespace mbgl {

class Tile;
class Bucket;

namespace style {
class Layer;
class Source;
}

class RenderItem {
public:
RenderItem(const style::Layer& layer_,
const Tile* tile_ = nullptr,
Bucket* bucket_ = nullptr)
: tile(tile_), bucket(bucket_), layer(layer_) {
}

const Tile* const tile;
Bucket* const bucket;
const style::Layer& layer;
};

class RenderData {
public:
Color backgroundColor = {{ 0, 0, 0, 0 }};
std::set<style::Source*> sources;
std::vector<RenderItem> order;
};

} // namespace mbgl
24 changes: 0 additions & 24 deletions src/mbgl/style/render_item.hpp

This file was deleted.

1 change: 1 addition & 0 deletions src/mbgl/style/style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <mbgl/style/update_parameters.hpp>
#include <mbgl/style/cascade_parameters.hpp>
#include <mbgl/style/calculation_parameters.hpp>
#include <mbgl/renderer/render_item.hpp>
#include <mbgl/geometry/glyph_atlas.hpp>
#include <mbgl/geometry/line_atlas.hpp>
#include <mbgl/util/constants.hpp>
Expand Down
11 changes: 1 addition & 10 deletions src/mbgl/style/style.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#pragma once

#include <mbgl/style/render_item.hpp>
#include <mbgl/style/transition_options.hpp>

#include <mbgl/style/observer.hpp>
#include <mbgl/style/source_observer.hpp>
#include <mbgl/text/glyph_store_observer.hpp>
Expand All @@ -15,25 +13,18 @@
#include <mbgl/util/worker.hpp>
#include <mbgl/util/optional.hpp>
#include <mbgl/util/feature.hpp>
#include <mbgl/util/color.hpp>

#include <cstdint>
#include <string>
#include <vector>
#include <set>

namespace mbgl {

class FileSource;
class GlyphAtlas;
class SpriteAtlas;
class LineAtlas;

struct RenderData {
Color backgroundColor = {{ 0, 0, 0, 0 }};
std::set<style::Source*> sources;
std::vector<RenderItem> order;
};
class RenderData;

namespace style {

Expand Down

0 comments on commit e1a5856

Please sign in to comment.