TINYGL: Refined rectangles merging and duplicated removal logic.

This commit is contained in:
Stefano Musumeci 2014-08-02 21:50:56 +02:00
parent ce4d4801df
commit 70d326f534

View File

@ -104,21 +104,20 @@ void tglPresentBuffer() {
} while(restartMerge);
rectanglesEnd = rectangles.end();
do {
Common::List<DirtyRectangle>::iterator it1 = rectangles.begin();
while (it1 != rectangles.end()) {
Common::List<DirtyRectangle>::iterator it2 = it1;
++it2;
while (it2 != rectanglesEnd) {
if ((*it1).rectangle.contains((*it2).rectangle)) {
it2 = rectangles.erase(it2);
} else {
++it2;
}
Common::List<DirtyRectangle>::iterator it1 = rectangles.begin();
while (it1 != rectangles.end()) {
Common::List<DirtyRectangle>::iterator it2 = it1;
++it2;
while (it2 != rectanglesEnd) {
if ((*it1).rectangle.contains((*it2).rectangle)) {
it2 = rectangles.erase(it2);
} else {
++it2;
}
++it1;
}
} while(restartMerge);
++it1;
}
Common::List<Graphics::DrawCall *>::const_iterator it = c->_drawCallsQueue.begin();
Common::List<Graphics::DrawCall *>::const_iterator end = c->_drawCallsQueue.end();