Backed out changeset b42bc7db8a8e (bug 1057904)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 25 Nov 2014 14:13:59 +0100
changeset 217479 7f3c6470706b72ba1acac076693743d126fd21ea
parent 217478 17d459ae22422cfd675c9cf48026729b6b575c0c
child 217480 0ec10b196dcf3da5e1abd6af601678ce4c1ecb02
push id27882
push userryanvm@gmail.com
push dateTue, 25 Nov 2014 21:56:56 +0000
treeherdermozilla-central@ced1402861b8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1057904
milestone36.0a1
backs outb42bc7db8a8ec59bd09bc4163e73467549879ad2
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 b42bc7db8a8e (bug 1057904)
image/src/imgFrame.h
--- a/image/src/imgFrame.h
+++ b/image/src/imgFrame.h
@@ -59,18 +59,19 @@ public:
 
   /**
    * Initialize this imgFrame with a new surface and draw the provided
    * gfxDrawable into it.
    *
    * This is appropriate to use when drawing content into an imgFrame, as it
    * uses the same graphics backend as normal content drawing. The downside is
    * that the underlying surface may not be stored in a volatile buffer on all
-   * platforms, and raw access to the surface (using RawAccessRef()) may be much
-   * more expensive than in the InitForDecoder() case.
+   * platforms, and raw access to the surface (using RawAccessRef() or
+   * LockImageData()) may be much more expensive than in the InitForDecoder()
+   * case.
    */
   nsresult InitWithDrawable(gfxDrawable* aDrawable,
                             const nsIntSize& aSize,
                             const SurfaceFormat aFormat,
                             GraphicsFilter aFilter,
                             uint32_t aImageFlags);
 
   DrawableFrameRef DrawableRef();
@@ -107,16 +108,19 @@ public:
   bool ImageComplete() const;
 
   void SetHasNoAlpha();
   void SetAsNonPremult(bool aIsNonPremult);
 
   bool GetCompositingFailed() const;
   void SetCompositingFailed(bool val);
 
+  nsresult LockImageData();
+  nsresult UnlockImageData();
+
   void SetDiscardable();
   void SetOptimizable();
 
   TemporaryRef<SourceSurface> GetSurface();
   TemporaryRef<DrawTarget> GetDrawTarget();
 
   Color
   SinglePixelColor()
@@ -142,18 +146,16 @@ public:
 
     return ((1 << mPaletteDepth) * sizeof(uint32_t));
   }
 
 private: // methods
 
   ~imgFrame();
 
-  nsresult LockImageData();
-  nsresult UnlockImageData();
   nsresult Optimize();
 
   struct SurfaceWithFormat {
     nsRefPtr<gfxDrawable> mDrawable;
     SurfaceFormat mFormat;
     SurfaceWithFormat() {}
     SurfaceWithFormat(gfxDrawable* aDrawable, SurfaceFormat aFormat)
      : mDrawable(aDrawable), mFormat(aFormat) {}