[core] don't assign clip IDs to tiles that aren't rendered

This commit is contained in:
Konstantin Käfer
2016-11-01 16:14:33 +01:00
parent 3b38cf48b7
commit bcdbbbcac2
9 changed files with 44 additions and 3 deletions

View File

@@ -15,6 +15,10 @@ void ClipIDGenerator::update(Renderables& renderables) {
for (auto it = renderables.begin(); it != end; it++) {
auto& tileID = it->first;
auto& renderable = it->second;
if (!renderable.used) {
continue;
}
renderable.clip = {};
Leaf leaf{ renderable.clip };
@@ -58,6 +62,9 @@ void ClipIDGenerator::update(Renderables& renderables) {
uint8_t count = 1;
for (auto& pair : renderables) {
auto& renderable = pair.second;
if (!renderable.used) {
continue;
}
renderable.clip.mask |= mask;
// Assign only to clip IDs that have no value yet.