mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 780868 - Only reuse MaskLayers on LayerManagers with the same backend type. r=nrc
This commit is contained in:
parent
d1983dab73
commit
e9e1b28a99
@ -3109,7 +3109,7 @@ ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aCl
|
||||
|
||||
// check to see if we can reuse a mask image
|
||||
const MaskLayerImageCache::MaskLayerImageKey* key =
|
||||
new MaskLayerImageCache::MaskLayerImageKey(roundedRects);
|
||||
new MaskLayerImageCache::MaskLayerImageKey(roundedRects, aLayer->Manager()->GetBackendType());
|
||||
const MaskLayerImageCache::MaskLayerImageKey* lookupKey = key;
|
||||
|
||||
nsRefPtr<ImageContainer> container =
|
||||
|
@ -113,8 +113,9 @@ public:
|
||||
class MaskLayerImageKey
|
||||
{
|
||||
public:
|
||||
MaskLayerImageKey(const nsTArray<PixelRoundedRect>& aRoundedClipRects)
|
||||
: mLayerCount(0)
|
||||
MaskLayerImageKey(const nsTArray<PixelRoundedRect>& aRoundedClipRects, layers::LayersBackend aBackend)
|
||||
: mBackend(aBackend)
|
||||
, mLayerCount(0)
|
||||
, mRoundedClipRects(aRoundedClipRects)
|
||||
{}
|
||||
|
||||
@ -132,6 +133,7 @@ public:
|
||||
for (PRUint32 i = 0; i < mRoundedClipRects.Length(); ++i) {
|
||||
hash = AddToHash(hash, mRoundedClipRects[i].Hash());
|
||||
}
|
||||
hash = AddToHash(hash, mBackend);
|
||||
|
||||
return hash;
|
||||
}
|
||||
@ -141,6 +143,7 @@ public:
|
||||
return mRoundedClipRects == aOther.mRoundedClipRects;
|
||||
}
|
||||
|
||||
layers::LayersBackend mBackend;
|
||||
mutable PRUint32 mLayerCount;
|
||||
nsTArray<PixelRoundedRect> mRoundedClipRects;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user