зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1440177 - Part 5: Don't call GetDisplayItemDataForManager in AddPaintedDisplayItem since we already have it passed in as a parameter. r=jnicol
MozReview-Commit-ID: IHrVPutPSC5 --HG-- extra : rebase_source : c42f425a665a12a8602d9a7cfacdb16b14cf81a2
This commit is contained in:
Родитель
ba1dc01583
Коммит
0d25ffa6b4
|
@ -410,7 +410,7 @@ DisplayItemClip::AppendRoundedRects(nsTArray<RoundedRect>* aArray, uint32_t aCou
|
|||
}
|
||||
|
||||
bool
|
||||
DisplayItemClip::ComputeRegionInClips(DisplayItemClip* aOldClip,
|
||||
DisplayItemClip::ComputeRegionInClips(const DisplayItemClip* aOldClip,
|
||||
const nsPoint& aShift,
|
||||
nsRegion* aCombined) const
|
||||
{
|
||||
|
|
|
@ -121,7 +121,7 @@ public:
|
|||
* The result is stored in aCombined. If the result would be infinite
|
||||
* (because one or both of the clips does no clipping), returns false.
|
||||
*/
|
||||
bool ComputeRegionInClips(DisplayItemClip* aOldClip,
|
||||
bool ComputeRegionInClips(const DisplayItemClip* aOldClip,
|
||||
const nsPoint& aShift,
|
||||
nsRegion* aCombined) const;
|
||||
|
||||
|
|
|
@ -4852,28 +4852,23 @@ FrameLayerBuilder::AddPaintedDisplayItem(PaintedLayerData* aLayerData,
|
|||
nsIntRect intClip;
|
||||
bool hasClip = false;
|
||||
if (aLayerState != LAYER_NONE) {
|
||||
DisplayItemData *data = GetDisplayItemDataForManager(aItem, layer->Manager());
|
||||
if (data) {
|
||||
tempManager = data->mInactiveManager;
|
||||
}
|
||||
if (!tempManager) {
|
||||
tempManager = new BasicLayerManager(BasicLayerManager::BLM_INACTIVE);
|
||||
}
|
||||
if (aData) {
|
||||
tempManager = aData->mInactiveManager;
|
||||
|
||||
// We need to grab these before calling AddLayerDisplayItem because it will overwrite them.
|
||||
nsRegion clip;
|
||||
DisplayItemClip* oldClip = nullptr;
|
||||
GetOldLayerFor(aItem, nullptr, &oldClip);
|
||||
hasClip = aClip.ComputeRegionInClips(oldClip,
|
||||
if (aClip.ComputeRegionInClips(&aData->GetClip(),
|
||||
aTopLeft - paintedData->mLastAnimatedGeometryRootOrigin,
|
||||
&clip);
|
||||
|
||||
if (hasClip) {
|
||||
&clip)) {
|
||||
intClip = clip.GetBounds().ScaleToOutsidePixels(paintedData->mXScale,
|
||||
paintedData->mYScale,
|
||||
paintedData->mAppUnitsPerDevPixel);
|
||||
}
|
||||
}
|
||||
if (!tempManager) {
|
||||
tempManager = new BasicLayerManager(BasicLayerManager::BLM_INACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
AddLayerDisplayItem(layer, aItem, aLayerState, tempManager, aData);
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ public:
|
|||
uint32_t GetDisplayItemKey() { return mDisplayItemKey; }
|
||||
layers::Layer* GetLayer() const { return mLayer; }
|
||||
nsDisplayItemGeometry* GetGeometry() const { return mGeometry.get(); }
|
||||
const DisplayItemClip& GetClip() const { return mClip; }
|
||||
void Invalidate() { mIsInvalid = true; }
|
||||
void ClearAnimationCompositorState();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче