erase vector instead of clearing it to preserve the pre-allocated memory
CCBUG: 299594 REVIEW: 104897
This commit is contained in:
parent
601243e549
commit
ee53114054
1 changed files with 1 additions and 1 deletions
|
@ -655,7 +655,7 @@ void Toplevel::damageNotifyEvent(XDamageNotifyEvent* e)
|
||||||
|
|
||||||
const float area = rect().width()*rect().height();
|
const float area = rect().width()*rect().height();
|
||||||
damageRects.reserve(16);
|
damageRects.reserve(16);
|
||||||
damageRects.clear();
|
damageRects.erase(damageRects.begin(), damageRects.end());
|
||||||
damageRects << QRect(e->area.x, e->area.y, e->area.width, e->area.height);
|
damageRects << QRect(e->area.x, e->area.y, e->area.width, e->area.height);
|
||||||
|
|
||||||
// we can not easily say anything about the overall ratio since the new rects may intersect the present
|
// we can not easily say anything about the overall ratio since the new rects may intersect the present
|
||||||
|
|
Loading…
Reference in a new issue