Bug 1464032 Part 3: Remove unused GetObjectRef. r=jrmuizel
authorBob Owen <bobowencode@gmail.com>
Sun, 02 Dec 2018 14:14:03 +0000
changeset 477754 b2e0e341bb82f5f6f04a02c631fd835c506e96e2
parent 477753 274a9d9596a2b7a2d046e198ebcddaa4c45f82e0
child 477755 76f6050cb57f39e8dbe3d0ec6bc987725944e82a
push id113373
push userbobowencode@gmail.com
push dateFri, 07 Jun 2019 11:10:59 +0000
treeherdermozilla-inbound@2195b79ea888 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1464032
milestone69.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 1464032 Part 3: Remove unused GetObjectRef. r=jrmuizel
gfx/2d/RecordedEvent.h
gfx/2d/RecordedEventImpl.h
--- a/gfx/2d/RecordedEvent.h
+++ b/gfx/2d/RecordedEvent.h
@@ -286,18 +286,16 @@ class RecordedEvent {
   template <class S>
   void RecordStrokeOptions(S& aStream,
                            const StrokeOptions& aStrokeOptions) const;
   template <class S>
   void ReadStrokeOptions(S& aStream, StrokeOptions& aStrokeOptions);
 
   virtual std::string GetName() const = 0;
 
-  virtual ReferencePtr GetObjectRef() const = 0;
-
   virtual ReferencePtr GetDestinedDT() { return nullptr; }
 
   void OutputSimplePatternInfo(const PatternStorage& aStorage,
                                std::stringstream& aOutput) const;
 
   template <class S>
   static bool DoWithEvent(S& aStream, EventType aType,
                           const std::function<bool(RecordedEvent*)>& aAction);
--- a/gfx/2d/RecordedEventImpl.h
+++ b/gfx/2d/RecordedEventImpl.h
@@ -55,18 +55,16 @@ class RecordedDrawingEvent : public Reco
   RecordedDrawingEvent(RecordedEvent::EventType aType, DrawTarget* aTarget)
       : RecordedEventDerived<Derived>(aType), mDT(aTarget) {}
 
   template <class S>
   RecordedDrawingEvent(RecordedEvent::EventType aType, S& aStream);
   template <class S>
   void Record(S& aStream) const;
 
-  ReferencePtr GetObjectRef() const override;
-
   ReferencePtr mDT;
 };
 
 class RecordedDrawTargetCreation
     : public RecordedEventDerived<RecordedDrawTargetCreation> {
  public:
   RecordedDrawTargetCreation(ReferencePtr aRefPtr, BackendType aType,
                              const IntSize& aSize, SurfaceFormat aFormat,
@@ -83,17 +81,16 @@ class RecordedDrawTargetCreation
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   virtual void OutputSimpleEventInfo(
       std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "DrawTarget Creation"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   ReferencePtr mRefPtr;
   BackendType mBackendType;
   IntSize mSize;
   SurfaceFormat mFormat;
   bool mHasExistingData;
   RefPtr<SourceSurface> mExistingData;
 
@@ -114,17 +111,16 @@ class RecordedDrawTargetDestruction
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "DrawTarget Destruction"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   ReferencePtr mRefPtr;
 
   BackendType mBackendType;
 
  private:
   friend class RecordedEvent;
 
@@ -145,17 +141,16 @@ class RecordedCreateSimilarDrawTarget
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   virtual void OutputSimpleEventInfo(
       std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "CreateSimilarDrawTarget"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   ReferencePtr mRefPtr;
   IntSize mSize;
   SurfaceFormat mFormat;
 
  private:
   friend class RecordedEvent;
 
@@ -178,17 +173,16 @@ class RecordedCreateClippedDrawTarget
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   virtual void OutputSimpleEventInfo(
       std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "CreateClippedDrawTarget"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   ReferencePtr mRefPtr;
   IntSize mMaxSize;
   Matrix mTransform;
   SurfaceFormat mFormat;
 
  private:
   friend class RecordedEvent;
@@ -220,17 +214,16 @@ class RecordedCreateDrawTargetForFilter
   template <class S>
   void Record(S& aStream) const;
   virtual void OutputSimpleEventInfo(
       std::stringstream& aStringStream) const override;
 
   std::string GetName() const override {
     return "CreateSimilarDrawTargetForFilter";
   }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   ReferencePtr mRefPtr;
   IntSize mMaxSize;
   SurfaceFormat mFormat;
   ReferencePtr mFilter;
   ReferencePtr mSource;
   Rect mSourceRect;
   Point mDestPoint;
@@ -846,17 +839,16 @@ class RecordedPathCreation : public Reco
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "Path Creation"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   FillRule mFillRule;
   std::vector<PathOp> mPathOps;
 
@@ -872,17 +864,16 @@ class RecordedPathDestruction
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "Path Destruction"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template <class S>
   MOZ_IMPLICIT RecordedPathDestruction(S& aStream);
@@ -906,17 +897,16 @@ class RecordedSourceSurfaceCreation
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "SourceSurface Creation"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   uint8_t* mData;
   int32_t mStride;
   IntSize mSize;
@@ -935,17 +925,16 @@ class RecordedSourceSurfaceDestruction
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "SourceSurface Destruction"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template <class S>
   MOZ_IMPLICIT RecordedSourceSurfaceDestruction(S& aStream);
@@ -965,17 +954,16 @@ class RecordedExternalSurfaceCreation
 
   template <class S>
   void Record(S& aStream) const;
   virtual void OutputSimpleEventInfo(std::stringstream& aStringStream) const;
 
   virtual std::string GetName() const {
     return "SourceSurfaceSharedData Creation";
   }
-  virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   uint64_t mKey;
 
   template <class S>
@@ -994,17 +982,16 @@ class RecordedFilterNodeCreation
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "FilterNode Creation"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   FilterType mType;
 
   template <class S>
@@ -1019,17 +1006,16 @@ class RecordedFilterNodeDestruction
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "FilterNode Destruction"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template <class S>
   MOZ_IMPLICIT RecordedFilterNodeDestruction(S& aStream);
@@ -1051,17 +1037,16 @@ class RecordedGradientStopsCreation
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "GradientStops Creation"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   GradientStop* mStops;
   uint32_t mNumStops;
   ExtendMode mExtendMode;
@@ -1079,17 +1064,16 @@ class RecordedGradientStopsDestruction
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "GradientStops Destruction"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template <class S>
   MOZ_IMPLICIT RecordedGradientStopsDestruction(S& aStream);
@@ -1102,17 +1086,16 @@ class RecordedSnapshot : public Recorded
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "Snapshot"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   ReferencePtr mDT;
 
   template <class S>
@@ -1132,17 +1115,16 @@ class RecordedIntoLuminanceSource
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "IntoLuminanceSource"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   ReferencePtr mDT;
   LuminanceType mLuminanceType;
   float mOpacity;
@@ -1174,17 +1156,16 @@ class RecordedFontData : public Recorded
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "Font Data"; }
-  ReferencePtr GetObjectRef() const override { return nullptr; };
 
   void SetFontData(const uint8_t* aData, uint32_t aSize, uint32_t aIndex);
 
   bool GetFontDetails(RecordedFontDetails& fontDetails);
 
  private:
   friend class RecordedEvent;
 
@@ -1221,17 +1202,16 @@ class RecordedFontDescriptor
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "Font Desc"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   void SetFontDescriptor(const uint8_t* aData, uint32_t aSize, uint32_t aIndex);
 
   bool mHasDesc;
 
@@ -1265,17 +1245,16 @@ class RecordedUnscaledFontCreation
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "UnscaledFont Creation"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   void SetFontInstanceData(const uint8_t* aData, uint32_t aSize);
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
   uint64_t mFontDataKey;
@@ -1293,17 +1272,16 @@ class RecordedUnscaledFontDestruction
       : RecordedEventDerived(UNSCALEDFONTDESTRUCTION), mRefPtr(aRefPtr) {}
 
   bool PlayEvent(Translator* aTranslator) const override;
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "UnscaledFont Destruction"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template <class S>
   MOZ_IMPLICIT RecordedUnscaledFontDestruction(S& aStream);
@@ -1332,17 +1310,16 @@ class RecordedScaledFontCreation
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "ScaledFont Creation"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
   void SetFontInstanceData(const uint8_t* aData, uint32_t aSize,
                            const FontVariation* aVariations,
                            uint32_t aNumVariations);
 
  private:
   friend class RecordedEvent;
 
@@ -1364,17 +1341,16 @@ class RecordedScaledFontDestruction
 
   bool PlayEvent(Translator* aTranslator) const override;
 
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "ScaledFont Destruction"; }
-  ReferencePtr GetObjectRef() const override { return mRefPtr; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mRefPtr;
 
   template <class S>
   MOZ_IMPLICIT RecordedScaledFontDestruction(S& aStream);
@@ -1455,17 +1431,16 @@ class RecordedFilterNodeSetAttribute
   }
 
   bool PlayEvent(Translator* aTranslator) const override;
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "SetAttribute"; }
-  ReferencePtr GetObjectRef() const override { return mNode; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mNode;
 
   uint32_t mIndex;
   ArgType mArgType;
@@ -1495,17 +1470,16 @@ class RecordedFilterNodeSetInput
         mInputSurface(aInputSurface) {}
 
   bool PlayEvent(Translator* aTranslator) const override;
   template <class S>
   void Record(S& aStream) const;
   void OutputSimpleEventInfo(std::stringstream& aStringStream) const override;
 
   std::string GetName() const override { return "SetInput"; }
-  ReferencePtr GetObjectRef() const override { return mNode; }
 
  private:
   friend class RecordedEvent;
 
   ReferencePtr mNode;
   uint32_t mIndex;
   ReferencePtr mInputFilter;
   ReferencePtr mInputSurface;
@@ -1736,21 +1710,16 @@ RecordedDrawingEvent<T>::RecordedDrawing
 }
 
 template <class T>
 template <class S>
 void RecordedDrawingEvent<T>::Record(S& aStream) const {
   WriteElement(aStream, mDT);
 }
 
-template <class T>
-ReferencePtr RecordedDrawingEvent<T>::GetObjectRef() const {
-  return mDT;
-}
-
 inline bool RecordedDrawTargetCreation::PlayEvent(
     Translator* aTranslator) const {
   RefPtr<DrawTarget> newDT =
       aTranslator->CreateDrawTarget(mRefPtr, mSize, mFormat);
 
   // If we couldn't create a DrawTarget this will probably cause us to crash
   // with nullptr later in the playback, so return false to abort.
   if (!newDT) {