Bug 673417. imglib: remove more PRBools. r=joe
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 05 Aug 2011 09:57:16 -0400
changeset 73927 d5db87177940e051688f289f9f76807fc90d87d3
parent 73926 198491e83664a4b5d70822b9a4ff1b4d8ca69b1e
child 73928 39d0aea0cbcd316decfecf9a60020295ffe771f7
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersjoe
bugs673417
milestone8.0a1
Bug 673417. imglib: remove more PRBools. r=joe
modules/libpr0n/src/Image.h
modules/libpr0n/src/RasterImage.cpp
modules/libpr0n/src/RasterImage.h
modules/libpr0n/src/VectorImage.cpp
modules/libpr0n/src/VectorImage.h
--- a/modules/libpr0n/src/Image.h
+++ b/modules/libpr0n/src/Image.h
@@ -153,17 +153,17 @@ protected:
   PRPackedBool                mInitialized:1;   // Have we been initalized?
   PRPackedBool                mAnimating:1;     // Are we currently animating?
   PRPackedBool                mError:1;         // Error handling
 
   /**
    * Extended by child classes, if they have additional
    * conditions for being able to animate
    */
-  virtual PRBool ShouldAnimate() {
+  virtual bool ShouldAnimate() {
     return mAnimationConsumers > 0 && mAnimationMode != kDontAnimMode;
   }
 };
 
 } // namespace imagelib
 } // namespace mozilla
 
 #endif // MOZILLA_IMAGELIB_IMAGE_H_
--- a/modules/libpr0n/src/RasterImage.cpp
+++ b/modules/libpr0n/src/RasterImage.cpp
@@ -2111,41 +2111,41 @@ RasterImage::Discard(bool force)
           mFrames.Length(),
           num_containers,
           num_discardable_containers,
           total_source_bytes,
           discardable_source_bytes));
 }
 
 // Helper method to determine if we can discard an image
-PRBool
+bool
 RasterImage::CanDiscard() {
   return (DiscardingEnabled() && // Globally enabled...
           mDiscardable &&        // ...Enabled at creation time...
           (mLockCount == 0) &&   // ...not temporarily disabled...
           mHasSourceData &&      // ...have the source data...
           mDecoded);             // ...and have something to discard.
 }
 
-PRBool
+bool
 RasterImage::CanForciblyDiscard() {
   return mDiscardable &&         // ...Enabled at creation time...
          mHasSourceData;         // ...have the source data...
 }
 
 // Helper method to tell us whether the clock is currently running for
 // discarding this image. Mainly for assertions.
-PRBool
+bool
 RasterImage::DiscardingActive() {
   return !!(mDiscardTrackerNode.prev || mDiscardTrackerNode.next);
 }
 
 // Helper method to determine if we're storing the source data in a buffer
 // or just writing it directly to the decoder
-PRBool
+bool
 RasterImage::StoringSourceData() {
   return (mDecodeOnDraw || mDiscardable);
 }
 
 
 // Sets up a decoder for this image. It is an error to call this function
 // when decoding is already in process (ie - when mDecoder is non-null).
 nsresult
@@ -2812,17 +2812,17 @@ RasterImage::WriteToRasterImage(nsIInput
   }
 
   // We wrote everything we got
   *aWriteCount = aCount;
 
   return NS_OK;
 }
 
-PRBool
+bool
 RasterImage::ShouldAnimate()
 {
   return Image::ShouldAnimate() && mFrames.Length() >= 2 &&
          !mAnimationFinished;
 }
 
 //******************************************************************************
 /* readonly attribute PRUint32 framesNotified; */
--- a/modules/libpr0n/src/RasterImage.h
+++ b/modules/libpr0n/src/RasterImage.h
@@ -540,23 +540,23 @@ private: // data
     eShutdownIntent_Interrupted = 1,
     eShutdownIntent_Error       = 2,
     eShutdownIntent_AllCount    = 3
   };
   nsresult ShutdownDecoder(eShutdownIntent aIntent);
 
   // Helpers
   void DoError();
-  PRBool CanDiscard();
-  PRBool CanForciblyDiscard();
-  PRBool DiscardingActive();
-  PRBool StoringSourceData();
+  bool CanDiscard();
+  bool CanForciblyDiscard();
+  bool DiscardingActive();
+  bool StoringSourceData();
 
 protected:
-  PRBool ShouldAnimate();
+  bool ShouldAnimate();
 };
 
 // XXXdholbert These helper classes should move to be inside the
 // scope of the RasterImage class.
 // Decoding Helper Class
 //
 // We use this class to mimic the interactivity benefits of threading
 // in a single-threaded event loop. We want to progressively decode
--- a/modules/libpr0n/src/VectorImage.cpp
+++ b/modules/libpr0n/src/VectorImage.cpp
@@ -296,17 +296,17 @@ VectorImage::StopAnimation()
 
   NS_ABORT_IF_FALSE(mIsFullyLoaded && mHaveAnimations,
                     "Should not have been animating!");
 
   mSVGDocumentWrapper->StopAnimation();
   return NS_OK;
 }
 
-PRBool
+bool
 VectorImage::ShouldAnimate()
 {
   return Image::ShouldAnimate() && mIsFullyLoaded && mHaveAnimations;
 }
 
 //------------------------------------------------------------------------------
 // imgIContainer methods
 
--- a/modules/libpr0n/src/VectorImage.h
+++ b/modules/libpr0n/src/VectorImage.h
@@ -94,17 +94,17 @@ public:
   virtual PRUint32 GetSourceHeapSize();
 
   // Callback for SVGRootRenderingObserver
   void InvalidateObserver();
 
 protected:
   virtual nsresult StartAnimation();
   virtual nsresult StopAnimation();
-  virtual PRBool   ShouldAnimate();
+  virtual bool     ShouldAnimate();
 
 private:
   nsWeakPtr                          mObserver;   //! imgIDecoderObserver
   nsRefPtr<SVGDocumentWrapper>       mSVGDocumentWrapper;
   nsRefPtr<SVGRootRenderingObserver> mRenderingObserver;
 
   nsIntRect      mRestrictedRegion;       // If we were created by
                                           // ExtractFrame, this is the region