Bug 591687. Disable emtpy transactions with mac plugin layers. r=roc, a=blocker.

This commit is contained in:
Matt Woodrow 2011-02-15 21:25:34 -08:00
Родитель edf8e997c0
Коммит 2068f42ec4
1 изменённых файлов: 10 добавлений и 2 удалений

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

@ -1835,8 +1835,7 @@ nsObjectFrame::GetLayerState(nsDisplayListBuilder* aBuilder,
mInstanceOwner->GetDrawingModel() == NPDrawingModelCoreGraphics &&
mInstanceOwner->IsRemoteDrawingCoreAnimation())
{
// Disabled on Mac OS X for now.
return mozilla::LAYER_NONE;
return mozilla::LAYER_ACTIVE;
}
#endif
@ -3253,7 +3252,16 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(NPRect *invalidRect)
presContext->DevPixelsToAppUnits(invalidRect->top),
presContext->DevPixelsToAppUnits(invalidRect->right - invalidRect->left),
presContext->DevPixelsToAppUnits(invalidRect->bottom - invalidRect->top));
#ifndef XP_MACOSX
mObjectFrame->InvalidateLayer(rect + mObjectFrame->GetUsedBorderAndPadding().TopLeft(), nsDisplayItem::TYPE_PLUGIN);
#else
if (FrameLayerBuilder::HasDedicatedLayer(mObjectFrame, nsDisplayItem::TYPE_PLUGIN)) {
mObjectFrame->InvalidateWithFlags(rect + mObjectFrame->GetUsedBorderAndPadding().TopLeft(),
nsIFrame::INVALIDATE_NO_THEBES_LAYERS);
} else {
mObjectFrame->Invalidate(rect + mObjectFrame->GetUsedBorderAndPadding().TopLeft());
}
#endif
return NS_OK;
}