Bug 940455 - Add LayerManager functonality to clear out a portion of the window for the OS to paint. r=roc,Bas

This commit is contained in:
Matt Woodrow
2014-02-13 13:20:41 +13:00
parent 69560da592
commit 93029b755f
16 changed files with 6447 additions and 5692 deletions

View File

@@ -625,6 +625,16 @@ BasicLayerManager::EndTransactionInternal(DrawThebesLayerCallback aCallback,
}
PaintLayer(mTarget, mRoot, aCallback, aCallbackData, nullptr);
if (!mRegionToClear.IsEmpty()) {
AutoSetOperator op(mTarget, gfxContext::OPERATOR_CLEAR);
nsIntRegionRectIterator iter(mRegionToClear);
const nsIntRect *r;
while ((r = iter.Next())) {
mTarget->NewPath();
mTarget->Rectangle(gfxRect(r->x, r->y, r->width, r->height));
mTarget->Fill();
}
}
if (mWidget) {
FlashWidgetUpdateArea(mTarget);
}