Bug 1028536 - Remove BasicImageLayer::GetAndPaintCurrentImage. r=nical
authorCgg <clement.geiger@gmail.com>
Sat, 21 Jun 2014 15:16:36 +0200
changeset 223519 52156df5e29890d8ee6aea7bac4aa7f3c4a8e471
parent 223518 b92fe2cbbbcd73c77ee831b80d345a66b8bb98c6
child 223520 0a0e57c4e420fdf01b9f25114ba50d74e5bce86b
push id28095
push usercbook@mozilla.com
push dateTue, 13 Jan 2015 13:24:48 +0000
treeherdermozilla-central@a5700bec72e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1028536
milestone38.0a1
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
Bug 1028536 - Remove BasicImageLayer::GetAndPaintCurrentImage. r=nical From 75d863b86d2b4945c5cbe5b04bd73dcf0e2e817d Mon Sep 17 00:00:00 2001 --- gfx/layers/basic/BasicImageLayer.cpp | 42 ---------------------------------- 1 file changed, 42 deletions(-)
gfx/layers/basic/BasicImageLayer.cpp
--- a/gfx/layers/basic/BasicImageLayer.cpp
+++ b/gfx/layers/basic/BasicImageLayer.cpp
@@ -52,22 +52,16 @@ public:
   virtual TemporaryRef<SourceSurface> GetAsSourceSurface() MOZ_OVERRIDE;
 
 protected:
   BasicLayerManager* BasicManager()
   {
     return static_cast<BasicLayerManager*>(mManager);
   }
 
-  // only paints the image if aContext is non-null
-  void
-  GetAndPaintCurrentImage(DrawTarget* aTarget,
-                          float aOpacity,
-                          SourceSurface* aMaskSurface);
-
   gfx::IntSize mSize;
 };
 
 void
 BasicImageLayer::Paint(DrawTarget* aDT,
                        const gfx::Point& aDeviceOffset,
                        Layer* aMaskLayer)
 {
@@ -92,56 +86,16 @@ BasicImageLayer::Paint(DrawTarget* aDT,
                    surface, ToFilter(mFilter),
                    DrawOptions(GetEffectiveOpacity(), GetEffectiveOperator(this)),
                    aMaskLayer);
 
   mContainer->SetImageFactory(originalIF);
   GetContainer()->NotifyPaintedImage(image);
 }
 
-void
-BasicImageLayer::GetAndPaintCurrentImage(DrawTarget* aTarget,
-                                         float aOpacity,
-                                         SourceSurface* aMaskSurface)
-{
-  if (!mContainer) {
-    return;
-  }
-
-  nsRefPtr<ImageFactory> originalIF = mContainer->GetImageFactory();
-  mContainer->SetImageFactory(mManager->IsCompositingCheap() ?
-                              nullptr :
-                              BasicManager()->GetImageFactory());
-  IntSize size;
-  Image* image = nullptr;
-  RefPtr<SourceSurface> surf =
-    mContainer->LockCurrentAsSourceSurface(&size, &image);
-
-  if (!surf) {
-    mContainer->SetImageFactory(originalIF);
-    return;
-  }
-
-  if (aTarget) {
-    // The visible region can extend outside the image, so just draw
-    // within the image bounds.
-    SurfacePattern pat(surf, ExtendMode::CLAMP, Matrix(), ToFilter(mFilter));
-    CompositionOp op = GetEffectiveOperator(this);
-    DrawOptions opts(aOpacity, op);
-
-    aTarget->MaskSurface(pat, aMaskSurface, Point(0, 0), opts);
-
-    GetContainer()->NotifyPaintedImage(image);
-  }
-
-  mContainer->SetImageFactory(originalIF);
-
-  mContainer->UnlockCurrentImage();
-}
-
 TemporaryRef<SourceSurface>
 BasicImageLayer::GetAsSourceSurface()
 {
   if (!mContainer) {
     return nullptr;
   }
 
   gfx::IntSize dontCare;