Bug 1057904 (Part 2) - Make imgFrame::LockImageData and UnlockImageData private. r=tn
☠☠ backed out by 7f3c6470706b ☠ ☠
authorSeth Fowler <seth@mozilla.com>
Tue, 25 Nov 2014 00:10:11 -0800
changeset 217340 b42bc7db8a8ec59bd09bc4163e73467549879ad2
parent 217339 62c4e3d64b7d1fa63947154c8fda20838ae9243e
child 217341 f993ad4dc8f6e08f3890a71081dd1c026011070e
push id52271
push usermfowler@mozilla.com
push dateTue, 25 Nov 2014 08:11:21 +0000
treeherdermozilla-inbound@2a95a3663cc2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1057904
milestone36.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 1057904 (Part 2) - Make imgFrame::LockImageData and UnlockImageData private. r=tn
image/src/imgFrame.h
--- a/image/src/imgFrame.h
+++ b/image/src/imgFrame.h
@@ -59,19 +59,18 @@ 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() or
-   * LockImageData()) may be much more expensive than in the InitForDecoder()
-   * case.
+   * platforms, and raw access to the surface (using RawAccessRef()) 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();
@@ -108,19 +107,16 @@ 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()
@@ -146,16 +142,18 @@ 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) {}