Bug 1065344 - Remove unnecessary mAppUnitsPerCSSPx field. r=mvujovic

This commit is contained in:
Markus Stange 2014-09-10 19:06:10 +02:00
parent b5e1633afb
commit d188509174
2 changed files with 2 additions and 5 deletions

View File

@ -142,8 +142,6 @@ nsFilterInstance::nsFilterInstance(nsIFrame *aTargetFrame,
mFilterSpaceToDeviceSpaceTransform = filterToUserSpace * mPaintTransform;
}
mAppUnitsPerCSSPx = mTargetFrame->PresContext()->AppUnitsPerCSSPixel();
mFilterSpaceToFrameSpaceInCSSPxTransform =
filterToUserSpace * GetUserSpaceToFrameSpaceInCSSPxTransform();
// mFilterSpaceToFrameSpaceInCSSPxTransform is always invertible
@ -493,7 +491,7 @@ nsFilterInstance::FrameSpaceToFilterSpace(const nsRect* aRect) const
return nsIntRect();
}
gfxRect rectInCSSPx =
nsLayoutUtils::RectToGfxRect(*aRect, mAppUnitsPerCSSPx);
nsLayoutUtils::RectToGfxRect(*aRect, nsPresContext::AppUnitsPerCSSPixel());
gfxRect rectInFilterSpace =
mFrameSpaceInCSSPxToFilterSpaceTransform.TransformBounds(rectInCSSPx);
rectInFilterSpace.RoundOut();
@ -514,7 +512,7 @@ nsFilterInstance::FilterSpaceToFrameSpace(const nsIntRect& aRect) const
gfxRect r(aRect.x, aRect.y, aRect.width, aRect.height);
r = mFilterSpaceToFrameSpaceInCSSPxTransform.TransformBounds(r);
// nsLayoutUtils::RoundGfxRectToAppRect rounds out.
return nsLayoutUtils::RoundGfxRectToAppRect(r, mAppUnitsPerCSSPx);
return nsLayoutUtils::RoundGfxRectToAppRect(r, nsPresContext::AppUnitsPerCSSPixel());
}
nsIntRegion

View File

@ -324,7 +324,6 @@ private:
nsTArray<mozilla::RefPtr<SourceSurface>> mInputImages;
nsTArray<FilterPrimitiveDescription> mPrimitiveDescriptions;
FilterDescription mFilterDescription;
int32_t mAppUnitsPerCSSPx;
bool mInitialized;
};