opengles emulator: fix a bug in RangeList
When an intersection is found, we want to add it to the output list, if splitting is needed and if not. Change-Id: I9c9827b1c0ecd434925ff5698dd42bc1025dbedf
This commit is contained in:
committed by
David 'Digit' Turner
parent
ded8587d2d
commit
0957f4acda
@@ -86,17 +86,17 @@ void RangeList::delRange(const Range& r,RangeList& deleted) {
|
|||||||
erase(i);
|
erase(i);
|
||||||
i--;
|
i--;
|
||||||
if (intersection!=old) { // otherwise split:
|
if (intersection!=old) { // otherwise split:
|
||||||
//intersection on right side
|
//intersection on right side
|
||||||
if(old.getStart() != intersection.getStart()) {
|
if(old.getStart() != intersection.getStart()) {
|
||||||
list.insert(list.begin(),Range(old.getStart(),intersection.getStart() - old.getStart()));
|
list.insert(list.begin(),Range(old.getStart(),intersection.getStart() - old.getStart()));
|
||||||
}
|
|
||||||
|
|
||||||
//intersection on left side
|
|
||||||
if(old.getEnd() != intersection.getEnd()) {
|
|
||||||
list.insert(list.begin(),Range(intersection.getEnd(),old.getEnd() - intersection.getEnd()));
|
|
||||||
}
|
|
||||||
deleted.addRange(intersection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//intersection on left side
|
||||||
|
if(old.getEnd() != intersection.getEnd()) {
|
||||||
|
list.insert(list.begin(),Range(intersection.getEnd(),old.getEnd() - intersection.getEnd()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deleted.addRange(intersection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user