Bug 1022612. Part 34: Skip RecomputeVisibilityForItems in inactive layers. r=mattwoodrow

RecomputeVisibilityForItems for the retained ThebesLayer already recomputes
visibility for all items in that layer, including items nested in other items.

--HG--
extra : rebase_source : 5549164408aef7bcb3fb9204b1d6b96476d3f675
This commit is contained in:
Robert O'Callahan 2014-06-23 16:24:14 +12:00
parent 6de4722ba0
commit b6a4027d58

View File

@ -4259,13 +4259,17 @@ FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer,
// ThebesLayer
gfxContextMatrixAutoSaveRestore saveMatrix(aContext);
nsIntPoint offset = GetTranslationForThebesLayer(aLayer);
nsPresContext* presContext = entry->mContainerLayerFrame->PresContext();
int32_t appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();
RecomputeVisibilityForItems(entry->mItems, builder, aRegionToDraw,
offset, appUnitsPerDevPixel,
userData->mXScale, userData->mYScale);
if (!layerBuilder->GetContainingThebesLayerData()) {
// Recompute visibility of items in our ThebesLayer. Note that this
// recomputes visibility for all descendants of our display items too,
// so there's no need to do this for the items in inactive ThebesLayers.
int32_t appUnitsPerDevPixel = presContext->AppUnitsPerDevPixel();
RecomputeVisibilityForItems(entry->mItems, builder, aRegionToDraw,
offset, appUnitsPerDevPixel,
userData->mXScale, userData->mYScale);
}
nsRefPtr<nsRenderingContext> rc = new nsRenderingContext();
rc->Init(presContext->DeviceContext(), aContext);