Backed out changeset a5d2e586777c (bug 1220082) for bustage. r=bustage on CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 03 Mar 2016 17:19:22 +0100
changeset 324929 fa7a5698fced4b1e5bf67178233a2a82d2b9288f
parent 324928 029e7b380dacbe4b5488719a7f89f12678184495
child 324930 6c8b2fbba88b9044bf47ac4e8a76dafeb8d629b6
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1220082
milestone47.0a1
backs outa5d2e586777cdef660d7e625a5253669fd8b33ec
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset a5d2e586777c (bug 1220082) for bustage. r=bustage on CLOSED TREE
gfx/layers/ImageContainer.cpp
gfx/layers/ImageContainer.h
image/RasterImage.cpp
image/RasterImage.h
--- a/gfx/layers/ImageContainer.cpp
+++ b/gfx/layers/ImageContainer.cpp
@@ -285,28 +285,22 @@ ImageContainer::ClearAllImages()
 
   ReentrantMonitorAutoEnter mon(mReentrantMonitor);
   SetCurrentImageInternal(nsTArray<NonOwningImage>());
 }
 
 void
 ImageContainer::SetCurrentImageInTransaction(Image *aImage)
 {
-  nsAutoTArray<NonOwningImage,1> images;
-  images.AppendElement(NonOwningImage(aImage));
-  SetCurrentImagesInTransaction(images);
-}
-
-void
-ImageContainer::SetCurrentImagesInTransaction(const nsTArray<NonOwningImage>& aImages)
-{
   NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
   NS_ASSERTION(!mImageClient, "Should use async image transfer with ImageBridge.");
 
-  SetCurrentImageInternal(aImages);
+  AutoTArray<NonOwningImage,1> images;
+  images.AppendElement(NonOwningImage(aImage));
+  SetCurrentImageInternal(images);
 }
 
 bool ImageContainer::IsAsync() const
 {
   return mImageClient != nullptr;
 }
 
 uint64_t ImageContainer::GetAsyncContainerID() const
--- a/gfx/layers/ImageContainer.h
+++ b/gfx/layers/ImageContainer.h
@@ -429,17 +429,16 @@ public:
    * aImage can be null. While it's null, nothing will be painted.
    * 
    * The Image data must not be modified after this method is called!
    * Note that this must not be called if ENABLE_ASYNC been set.
    *
    * You won't get meaningful painted/dropped counts when using this method.
    */
   void SetCurrentImageInTransaction(Image* aImage);
-  void SetCurrentImagesInTransaction(const nsTArray<NonOwningImage>& aImages);
 
   /**
    * Returns true if this ImageContainer uses the ImageBridge IPDL protocol.
    *
    * Can be called from any thread.
    */
   bool IsAsync() const;
 
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -73,18 +73,16 @@ NS_IMPL_ISUPPORTS(RasterImage, imgIConta
 
 //******************************************************************************
 RasterImage::RasterImage(ImageURL* aURI /* = nullptr */) :
   ImageResource(aURI), // invoke superclass's constructor
   mSize(0,0),
   mLockCount(0),
   mDecodeCount(0),
   mRequestedSampleSize(0),
-  mImageProducerID(ImageContainer::AllocateProducerID()),
-  mLastFrameID(0),
   mLastImageContainerDrawResult(DrawResult::NOT_READY),
 #ifdef DEBUG
   mFramesNotified(0),
 #endif
   mSourceBuffer(new SourceBuffer()),
   mFrameCount(0),
   mHasSize(false),
   mTransient(false),
@@ -688,21 +686,17 @@ RasterImage::GetImageContainer(LayerMana
   Tie(drawResult, image) = GetCurrentImage(container, aFlags);
   if (!image) {
     return nullptr;
   }
 
   // |image| holds a reference to a SourceSurface which in turn holds a lock on
   // the current frame's VolatileBuffer, ensuring that it doesn't get freed as
   // long as the layer system keeps this ImageContainer alive.
-  nsAutoTArray<ImageContainer::NonOwningImage, 1> imageList;
-  imageList.AppendElement(ImageContainer::NonOwningImage(image, TimeStamp(),
-                                                         mLastFrameID++,
-                                                         mImageProducerID));
-  container->SetCurrentImagesInTransaction(imageList);
+  container->SetCurrentImageInTransaction(image);
 
   mLastImageContainerDrawResult = drawResult;
   mImageContainer = container;
 
   return container.forget();
 }
 
 void
@@ -719,19 +713,17 @@ RasterImage::UpdateImageContainer()
   RefPtr<layers::Image> image;
   Tie(drawResult, image) = GetCurrentImage(container, FLAG_NONE);
   if (!image) {
     return;
   }
 
   mLastImageContainerDrawResult = drawResult;
   AutoTArray<ImageContainer::NonOwningImage, 1> imageList;
-  imageList.AppendElement(ImageContainer::NonOwningImage(image, TimeStamp(),
-                                                         mLastFrameID++,
-                                                         mImageProducerID));
+  imageList.AppendElement(ImageContainer::NonOwningImage(image));
   container->SetCurrentImages(imageList);
 }
 
 size_t
 RasterImage::SizeOfSourceWithComputedFallback(MallocSizeOf aMallocSizeOf) const
 {
   return mSourceBuffer->SizeOfIncludingThisWithComputedFallback(aMallocSizeOf);
 }
--- a/image/RasterImage.h
+++ b/image/RasterImage.h
@@ -31,17 +31,16 @@
 #include "nsIObserver.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Pair.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/WeakPtr.h"
 #include "mozilla/UniquePtr.h"
-#include "ImageContainer.h"
 #ifdef DEBUG
   #include "imgIContainerDebug.h"
 #endif
 
 class nsIInputStream;
 class nsIRequest;
 
 #define NS_RASTERIMAGE_CID \
@@ -363,19 +362,16 @@ private: // data
 
   // A hint for image decoder that directly scale the image to smaller buffer
   int                        mRequestedSampleSize;
 
   // A weak pointer to our ImageContainer, which stays alive only as long as
   // the layer system needs it.
   WeakPtr<layers::ImageContainer> mImageContainer;
 
-  layers::ImageContainer::ProducerID mImageProducerID;
-  layers::ImageContainer::FrameID mLastFrameID
-
   // If mImageContainer is non-null, this contains the DrawResult we obtained
   // the last time we updated it.
   DrawResult mLastImageContainerDrawResult;
 
 #ifdef DEBUG
   uint32_t                       mFramesNotified;
 #endif