Bug 913443 - Move IsWidgetLayerManager() check out of UpdateCommonClipCount. r=roc

UpdateCommonClipCount accesses the PaintedLayerData's mLayer field in order to
get the layer manager. We want to be able to call UpdateCommonClipCount when
mLayer is null.

--HG--
extra : rebase_source : d2964e3e390e0cd564469dee2bf691e76be07cf2
This commit is contained in:
Markus Stange 2015-03-03 17:00:55 -05:00
parent 253c09b332
commit 9fcb811dd6

View File

@ -2033,10 +2033,6 @@ void
PaintedLayerData::UpdateCommonClipCount(
const DisplayItemClip& aCurrentClip)
{
if (!mLayer->Manager()->IsWidgetLayerManager()) {
return;
}
if (mCommonClipCount >= 0) {
mCommonClipCount = mItemClip.GetCommonRoundedRectCount(aCurrentClip, mCommonClipCount);
} else {
@ -3209,7 +3205,9 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
} else {
// check to see if the new item has rounded rect clips in common with
// other items in the layer
paintedLayerData->UpdateCommonClipCount(itemClip);
if (mManager->IsWidgetLayerManager()) {
paintedLayerData->UpdateCommonClipCount(itemClip);
}
InvalidateForLayerChange(item, paintedLayerData->mLayer);