Bug 782368; undo patch from 780868. r=mattwoodrow
authorNicholas Cameron <ncameron@mozilla.com>
Wed, 12 Dec 2012 10:57:52 +1300
changeset 121278 390fb4d217875a55e992990ab87356aad5997da6
parent 121277 7e67e86f81d67fe51dd3b955d59b1138ee5d8540
child 121279 7ce1a8ae8ed6f4129c8d26602d2ea8388bf824c4
push idunknown
push userunknown
push dateunknown
reviewersmattwoodrow
bugs782368, 780868
milestone20.0a1
Bug 782368; undo patch from 780868. r=mattwoodrow
layout/base/FrameLayerBuilder.cpp
layout/base/MaskLayerImageCache.h
--- 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.