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 308464 c31142f750f879fa3bc8f523285f3f19cd310bf6
parent 308463 4999ae42eaec6fce2ca8cc439ba660a2fdb9ec58
child 308465 7466366ce986deea1a21f47b998216a1527c528d
push id30537
push userphilringnalda@gmail.com
push dateSun, 07 Aug 2016 06:34:58 +0000
treeherdermozilla-central@70948f120f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1291045
milestone51.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 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