b=536065 don't init pixman regions with empty boxes r=roc

This commit is contained in:
Karl Tomlinson 2009-12-29 12:56:24 +13:00
parent d2bb3e348e
commit b94030a69c

View File

@ -1741,8 +1741,10 @@ InitRegion(pixman_region32* aRegion,
nsAutoTArray<pixman_box32,10> rects; nsAutoTArray<pixman_box32,10> rects;
rects.SetCapacity(aRects.Length()); rects.SetCapacity(aRects.Length());
for (PRUint32 i = 0; i < aRects.Length (); ++i) { for (PRUint32 i = 0; i < aRects.Length (); ++i) {
if (!aRects[i].IsEmpty()) {
rects.AppendElement(ToPixmanBox(aRects[i])); rects.AppendElement(ToPixmanBox(aRects[i]));
} }
}
pixman_region32_init_rects(aRegion, pixman_region32_init_rects(aRegion,
rects.Elements(), rects.Length()); rects.Elements(), rects.Length());