Bug 1057904 (Part 2) - Make imgFrame::LockImageData and UnlockImageData private. r=tn
authorSeth Fowler <seth@mozilla.com>
Wed, 26 Nov 2014 13:22:10 -0800
changeset 217622 25bf6420a6ad749f843d10d30bca7418d4674cc0
parent 217621 63c554369c55403ac680a29123d791c9313d26c2
child 217623 b0f351e99e1ab7d8d50d3d3205cb1feb00248b16
push id52341
push usermfowler@mozilla.com
push dateWed, 26 Nov 2014 21:22:25 +0000
treeherdermozilla-inbound@7ee7e774e19f [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) {}