Bug 1371958 part 2 - Move a mPaintedLayerItems.GetEntry() call into the else-branch where its result is actually used to avoid an unnecessary hashtable lookup when we don't take the else-branch. r=froydnj

MozReview-Commit-ID: sOwNzB8mxj
This commit is contained in:
Mats Palmgren 2017-06-17 00:06:04 +02:00
Родитель f8f1a23dc1
Коммит 5ef66d5e7d
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -4552,8 +4552,6 @@ FrameLayerBuilder::ComputeGeometryChangeForItem(DisplayItemData* aData)
return;
}
PaintedLayerItemsEntry* entry = mPaintedLayerItems.GetEntry(paintedLayer);
nsAutoPtr<nsDisplayItemGeometry> geometry;
PaintedDisplayItemLayerUserData* layerData =
@ -4615,6 +4613,7 @@ FrameLayerBuilder::ComputeGeometryChangeForItem(DisplayItemData* aData)
changedFrameInvalidations.IsEmpty() == 0) {
notifyRenderingChanged = false;
}
PaintedLayerItemsEntry* entry = mPaintedLayerItems.GetEntry(paintedLayer);
aData->mClip.AddOffsetAndComputeDifference(entry->mCommonClipCount,
shift, aData->mGeometry->ComputeInvalidationRegion(),
clip, entry->mLastCommonClipCount,