Bug 803826 - Only reset the layer builder pointer in ~ClippedDisplayItem. r=mattwoodrow, a=bajaj

PaintInactiveLayer was resetting the layer manager's layer builder pointer, but
this was unnecessary as this was also being done on destruction of the
ClippedDisplayItem.
This commit is contained in:
Chris Lord 2012-10-23 12:05:14 +01:00
Родитель da5e3699b5
Коммит a32492abc9
2 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -1928,8 +1928,7 @@ PaintInactiveLayer(nsDisplayListBuilder* aBuilder,
if (builder) {
builder->DidEndTransaction();
}
basic->SetUserData(&gLayerManagerLayerBuilder, NULL);
#ifdef MOZ_DUMP_PAINTING
if (gfxUtils::sDumpPainting) {
DumpPaintedImage(aItem, surf);
@ -2341,7 +2340,7 @@ FrameLayerBuilder::AddThebesDisplayItem(ThebesLayer* aLayer,
ClippedDisplayItem* cdi =
entry->mItems.AppendElement(ClippedDisplayItem(aItem, aClip,
mContainerLayerGeneration));
cdi->mInactiveLayer = tempManager;
cdi->mInactiveLayerManager = tempManager;
}
}
@ -2402,11 +2401,11 @@ FrameLayerBuilder::StoreDataForFrame(nsIFrame* aFrame,
FrameLayerBuilder::ClippedDisplayItem::~ClippedDisplayItem()
{
if (mInactiveLayer) {
if (mInactiveLayerManager) {
// We always start a transaction during layer construction for all inactive
// layers, but we don't necessarily call EndTransaction during painting.
// If the transaaction is still open, end it to avoid assertions.
BasicLayerManager* basic = static_cast<BasicLayerManager*>(mInactiveLayer.get());
BasicLayerManager* basic = static_cast<BasicLayerManager*>(mInactiveLayerManager.get());
if (basic->InTransaction()) {
basic->EndTransaction(nullptr, nullptr);
}
@ -3156,8 +3155,8 @@ FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer,
}
}
if (cdi->mInactiveLayer) {
PaintInactiveLayer(builder, cdi->mInactiveLayer, cdi->mItem, aContext, rc);
if (cdi->mInactiveLayerManager) {
PaintInactiveLayer(builder, cdi->mInactiveLayerManager, cdi->mItem, aContext, rc);
} else {
nsIFrame* frame = cdi->mItem->GetUnderlyingFrame();
if (frame) {

Просмотреть файл

@ -605,7 +605,7 @@ protected:
* layer, then this stores the layer manager being
* used for the inactive transaction.
*/
nsRefPtr<LayerManager> mInactiveLayer;
nsRefPtr<LayerManager> mInactiveLayerManager;
Clip mClip;
uint32_t mContainerLayerGeneration;