Bug 1291045 (Part 4) - Remove IDecodingTask::GetDecoder(). r=edwin
authorSeth Fowler <mark.seth.fowler@gmail.com>
Wed, 27 Jul 2016 19:37:27 -0700
changeset 397556 c31142f750f879fa3bc8f523285f3f19cd310bf6
parent 397555 4999ae42eaec6fce2ca8cc439ba660a2fdb9ec58
child 397557 7466366ce986deea1a21f47b998216a1527c528d
push id25332
push usermaglione.k@gmail.com
push dateSat, 06 Aug 2016 21:21:51 +0000
reviewersedwin
bugs1291045
milestone51.0a1
Bug 1291045 (Part 4) - Remove IDecodingTask::GetDecoder(). r=edwin
image/IDecodingTask.h
--- a/image/IDecodingTask.h
+++ b/image/IDecodingTask.h
@@ -44,19 +44,16 @@ public:
 
   /// @return a priority hint that DecodePool can use when scheduling this task.
   virtual TaskPriority Priority() const = 0;
 
   /// A default implementation of IResumable which resubmits the task to the
   /// DecodePool. Subclasses can override this if they need different behavior.
   void Resume() override;
 
-  /// @return a non-null weak pointer to the Decoder associated with this task.
-  virtual NotNull<Decoder*> GetDecoder() const = 0;
-
 protected:
   virtual ~IDecodingTask() { }
 };
 
 
 /**
  * An IDecodingTask implementation for full decodes of single frame images.
  */
@@ -70,18 +67,16 @@ public:
 
   void Run() override;
   bool ShouldPreferSyncRun() const override;
 
   // Full decodes are low priority compared to metadata decodes because they
   // don't block layout or page load.
   TaskPriority Priority() const override { return TaskPriority::eLow; }
 
-  NotNull<Decoder*> GetDecoder() const override { return mDecoder; }
-
 private:
   virtual ~DecodingTask();
 
   NotNull<RefPtr<RasterImage>> mImage;
   NotNull<RefPtr<Decoder>> mDecoder;
   RefPtr<imgFrame> mSurface;
 };
 
@@ -98,18 +93,16 @@ public:
 
   void Run() override;
   bool ShouldPreferSyncRun() const override;
 
   // Full decodes are low priority compared to metadata decodes because they
   // don't block layout or page load.
   TaskPriority Priority() const override { return TaskPriority::eLow; }
 
-  NotNull<Decoder*> GetDecoder() const override { return mDecoder; }
-
 private:
   virtual ~AnimationDecodingTask() { }
 
   NotNull<RefPtr<Decoder>> mDecoder;
 };
 
 
 /**
@@ -128,18 +121,16 @@ public:
   // header) so there's no reason to refuse to run them synchronously if the
   // caller will allow us to.
   bool ShouldPreferSyncRun() const override { return true; }
 
   // Metadata decodes run at the highest priority because they block layout and
   // page load.
   TaskPriority Priority() const override { return TaskPriority::eHigh; }
 
-  NotNull<Decoder*> GetDecoder() const override { return mDecoder; }
-
 private:
   virtual ~MetadataDecodingTask() { }
 
   NotNull<RefPtr<Decoder>> mDecoder;
 };
 
 
 /**
@@ -158,18 +149,16 @@ public:
   bool ShouldPreferSyncRun() const override { return true; }
   TaskPriority Priority() const override { return TaskPriority::eLow; }
 
   // Anonymous decoders normally get all their data at once. We have tests where
   // they don't; in these situations, the test re-runs them manually. So no
   // matter what, we don't want to resume by posting a task to the DecodePool.
   void Resume() override { }
 
-  NotNull<Decoder*> GetDecoder() const override { return mDecoder; }
-
 private:
   virtual ~AnonymousDecodingTask() { }
 
   NotNull<RefPtr<Decoder>> mDecoder;
 };
 
 } // namespace image
 } // namespace mozilla