Merge branch 'master' into libuv010
Conflicts: setup-libraries.sh
This commit is contained in:
@@ -511,18 +511,12 @@ void Map::updateTiles() {
|
||||
}
|
||||
|
||||
void Map::updateRenderState() {
|
||||
std::forward_list<Tile::ID> ids;
|
||||
|
||||
// Update all clipping IDs.
|
||||
ClipIDGenerator generator;
|
||||
for (const std::shared_ptr<StyleSource> &source : getActiveSources()) {
|
||||
ids.splice_after(ids.before_begin(), source->source->getIDs());
|
||||
generator.update(source->source->getLoadedTiles());
|
||||
source->source->updateMatrices(painter.projMatrix, state);
|
||||
}
|
||||
|
||||
const std::map<Tile::ID, ClipID> clipIDs = computeClipIDs(ids);
|
||||
|
||||
for (const std::shared_ptr<StyleSource> &source : getActiveSources()) {
|
||||
source->source->updateClipIDs(clipIDs);
|
||||
}
|
||||
}
|
||||
|
||||
void Map::prepare() {
|
||||
|
||||
@@ -121,7 +121,6 @@ void Source::finishRender(Painter &painter) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::forward_list<Tile::ID> Source::getIDs() const {
|
||||
std::forward_list<Tile::ID> ptrs;
|
||||
|
||||
@@ -132,6 +131,18 @@ std::forward_list<Tile::ID> Source::getIDs() const {
|
||||
return ptrs;
|
||||
}
|
||||
|
||||
std::forward_list<Tile *> Source::getLoadedTiles() const {
|
||||
std::forward_list<Tile *> ptrs;
|
||||
auto it = ptrs.before_begin();
|
||||
for (const auto &pair : tiles) {
|
||||
if (pair.second->data->ready()) {
|
||||
it = ptrs.insert_after(it, pair.second.get());
|
||||
}
|
||||
}
|
||||
return ptrs;
|
||||
}
|
||||
|
||||
|
||||
TileData::State Source::hasTile(const Tile::ID& id) {
|
||||
auto it = tiles.find(id);
|
||||
if (it != tiles.end()) {
|
||||
|
||||
Reference in New Issue
Block a user