Bug 1239864 (part 5) - Use the new rect iterators in gfx/. r=nical.

This commit is contained in:
Nicholas Nethercote
2016-01-18 17:20:58 -08:00
parent 241b89e77e
commit 50ca8b0ee8
6 changed files with 26 additions and 35 deletions

View File

@@ -626,11 +626,11 @@ BasicCompositor::EndFrame()
// The source DrawTarget is clipped to the invalidation region, so we have
// to copy the individual rectangles in the region or else we'll draw blank
// pixels.
LayoutDeviceIntRegion::OldRectIterator iter(mInvalidRegion);
for (const LayoutDeviceIntRect *r = iter.Next(); r; r = iter.Next()) {
for (auto iter = mInvalidRegion.RectIter(); !iter.Done(); iter.Next()) {
const LayoutDeviceIntRect& r = iter.Get();
dest->CopySurface(source,
IntRect(r->x - mInvalidRect.x, r->y - mInvalidRect.y, r->width, r->height),
IntPoint(r->x - offset.x, r->y - offset.y));
IntRect(r.x - mInvalidRect.x, r.y - mInvalidRect.y, r.width, r.height),
IntPoint(r.x - offset.x, r.y - offset.y));
}
if (!mTarget) {
mWidget->EndRemoteDrawingInRegion(mDrawTarget, mInvalidRegion);