Bug 782368; undo patch from 780868. r=mattwoodrow
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -3760,17 +3760,17 @@ ContainerState::SetupMaskLayer(Layer *aL
maskTransform.Scale(float(surfaceSize.width)/float(boundingRect.Width()),
float(surfaceSize.height)/float(boundingRect.Height()));
maskTransform.Translate(-boundingRect.TopLeft());
// imageTransform is only used when the clip is painted to the mask
gfxMatrix imageTransform = maskTransform;
imageTransform.Scale(mParameters.mXScale, mParameters.mYScale);
nsAutoPtr<MaskLayerImageCache::MaskLayerImageKey> newKey(
- new MaskLayerImageCache::MaskLayerImageKey(aLayer->Manager()->GetBackendType()));
+ new MaskLayerImageCache::MaskLayerImageKey());
// copy and transform the rounded rects
for (uint32_t i = 0; i < newData.mRoundedClipRects.Length(); ++i) {
newKey->mRoundedClipRects.AppendElement(
MaskLayerImageCache::PixelRoundedRect(newData.mRoundedClipRects[i],
mContainerFrame->PresContext()));
newKey->mRoundedClipRects[i].ScaleAndTranslate(imageTransform);
}
--- a/layout/base/MaskLayerImageCache.h
+++ b/layout/base/MaskLayerImageCache.h
@@ -125,26 +125,24 @@ public:
* mLayerCount counts the number of mask layers which have a reference to
* MaskLayerImageEntry::mContainer; it is maintained by MaskLayerUserData,
* which keeps a reference to the key. There will usually be mLayerCount + 1
* pointers to a key object (the +1 being from the hashtable entry), but this
* invariant may be temporarily broken.
*/
struct MaskLayerImageKey
{
- MaskLayerImageKey(layers::LayersBackend aBackend)
- : mBackend(aBackend)
- , mLayerCount(0)
+ MaskLayerImageKey()
+ : mLayerCount(0)
, mRoundedClipRects()
{
MOZ_COUNT_CTOR(MaskLayerImageKey);
}
MaskLayerImageKey(const MaskLayerImageKey& aKey)
- : mBackend(aKey.mBackend)
- , mLayerCount(aKey.mLayerCount)
+ : mLayerCount(aKey.mLayerCount)
, mRoundedClipRects(aKey.mRoundedClipRects)
{
MOZ_COUNT_CTOR(MaskLayerImageKey);
}
~MaskLayerImageKey()
{
MOZ_COUNT_DTOR(MaskLayerImageKey);
@@ -159,27 +157,25 @@ public:
PLDHashNumber Hash() const
{
PLDHashNumber hash = 0;
for (uint32_t i = 0; i < mRoundedClipRects.Length(); ++i) {
hash = AddToHash(hash, mRoundedClipRects[i].Hash());
}
- hash = AddToHash(hash, mBackend);
return hash;
}
bool operator==(const MaskLayerImageKey& aOther) const
{
return mRoundedClipRects == aOther.mRoundedClipRects;
}
- layers::LayersBackend mBackend;
mutable uint32_t mLayerCount;
nsTArray<PixelRoundedRect> mRoundedClipRects;
};
// Find an image container for aKey, returns nullptr if there is no suitable
// cached image. If there is an image, then aKey is set to point at the stored
// key for the image.