| Index: src/pdf/SkPDFTypes.h | 
| diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h | 
| index cdfef6cb9208685c2fe5f11a58c99daecb832dbf..201d62b2efe05465f7ee36be6357fbb27a2d5b30 100644 | 
| --- a/src/pdf/SkPDFTypes.h | 
| +++ b/src/pdf/SkPDFTypes.h | 
| @@ -17,7 +17,6 @@ | 
| class SkData; | 
| class SkPDFObjNumMap; | 
| class SkPDFObject; | 
| -class SkPDFSubstituteMap; | 
| class SkStreamAsset; | 
| class SkString; | 
| class SkWStream; | 
| @@ -41,16 +40,14 @@ public: | 
| *  @param stream   The writable output stream to send the output to. | 
| */ | 
| virtual void emitObject(SkWStream* stream, | 
| -                            const SkPDFObjNumMap& objNumMap, | 
| -                            const SkPDFSubstituteMap& substitutes) const = 0; | 
| +                            const SkPDFObjNumMap& objNumMap) const = 0; | 
|  | 
| /** | 
| *  Adds all transitive dependencies of this object to the | 
| *  catalog.  Implementations should respect the catalog's object | 
| *  substitution map. | 
| */ | 
| -    virtual void addResources(SkPDFObjNumMap* catalog, | 
| -                              const SkPDFSubstituteMap& substitutes) const {} | 
| +    virtual void addResources(SkPDFObjNumMap* catalog) const {} | 
|  | 
| /** | 
| *  Release all resources associated with this SkPDFObject.  It is | 
| @@ -121,10 +118,8 @@ public: | 
|  | 
| /** These two non-virtual methods mirror SkPDFObject's | 
| corresponding virtuals. */ | 
| -    void emitObject(SkWStream*, | 
| -                    const SkPDFObjNumMap&, | 
| -                    const SkPDFSubstituteMap&) const; | 
| -    void addResources(SkPDFObjNumMap*, const SkPDFSubstituteMap&) const; | 
| +    void emitObject(SkWStream*, const SkPDFObjNumMap&) const; | 
| +    void addResources(SkPDFObjNumMap*) const; | 
|  | 
| bool isName() const; | 
|  | 
| @@ -171,9 +166,8 @@ static_assert(sizeof(SkString) == sizeof(void*), "SkString_size"); | 
| class SkPDFAtom final : public SkPDFObject { | 
| public: | 
| void emitObject(SkWStream* stream, | 
| -                    const SkPDFObjNumMap& objNumMap, | 
| -                    const SkPDFSubstituteMap& substitutes) final; | 
| -    void addResources(SkPDFObjNumMap*, const SkPDFSubstituteMap&) const final; | 
| +                    const SkPDFObjNumMap& objNumMap) final; | 
| +    void addResources(SkPDFObjNumMap* const final; | 
| SkPDFAtom(SkPDFUnion&& v) : fValue(std::move(v) {} | 
|  | 
| private: | 
| @@ -197,10 +191,8 @@ public: | 
|  | 
| // The SkPDFObject interface. | 
| void emitObject(SkWStream* stream, | 
| -                    const SkPDFObjNumMap& objNumMap, | 
| -                    const SkPDFSubstituteMap& substitutes) const override; | 
| -    void addResources(SkPDFObjNumMap*, | 
| -                      const SkPDFSubstituteMap&) const override; | 
| +                    const SkPDFObjNumMap& objNumMap) const override; | 
| +    void addResources(SkPDFObjNumMap*) const override; | 
| void drop() override; | 
|  | 
| /** The size of the array. | 
| @@ -247,10 +239,8 @@ public: | 
|  | 
| // The SkPDFObject interface. | 
| void emitObject(SkWStream* stream, | 
| -                    const SkPDFObjNumMap& objNumMap, | 
| -                    const SkPDFSubstituteMap& substitutes) const override; | 
| -    void addResources(SkPDFObjNumMap*, | 
| -                      const SkPDFSubstituteMap&) const override; | 
| +                    const SkPDFObjNumMap& objNumMap) const override; | 
| +    void addResources(SkPDFObjNumMap*) const override; | 
| void drop() override; | 
|  | 
| /** The size of the dictionary. | 
| @@ -282,8 +272,7 @@ public: | 
| /** Emit the dictionary, without the "<<" and ">>". | 
| */ | 
| void emitAll(SkWStream* stream, | 
| -                 const SkPDFObjNumMap& objNumMap, | 
| -                 const SkPDFSubstituteMap& substitutes) const; | 
| +                 const SkPDFObjNumMap& objNumMap) const; | 
|  | 
| private: | 
| struct Record { | 
| @@ -312,10 +301,8 @@ public: | 
| ~SkPDFSharedStream(); | 
| SkPDFDict* dict() { return &fDict; } | 
| void emitObject(SkWStream*, | 
| -                    const SkPDFObjNumMap&, | 
| -                    const SkPDFSubstituteMap&) const override; | 
| -    void addResources(SkPDFObjNumMap*, | 
| -                      const SkPDFSubstituteMap&) const override; | 
| +                    const SkPDFObjNumMap&) const override; | 
| +    void addResources(SkPDFObjNumMap*) const override; | 
| void drop() override; | 
|  | 
| private: | 
| @@ -346,9 +333,8 @@ public: | 
|  | 
| // The SkPDFObject interface. | 
| void emitObject(SkWStream* stream, | 
| -                    const SkPDFObjNumMap& objNumMap, | 
| -                    const SkPDFSubstituteMap& substitutes) const override; | 
| -    void addResources(SkPDFObjNumMap*, const SkPDFSubstituteMap&) const final; | 
| +                    const SkPDFObjNumMap& objNumMap) const override; | 
| +    void addResources(SkPDFObjNumMap*) const final; | 
| void drop() override; | 
|  | 
| protected: | 
| @@ -383,9 +369,8 @@ public: | 
|  | 
| /** Add the passed object to the catalog, as well as all its dependencies. | 
| *  @param obj   The object to add.  If nullptr, this is a noop. | 
| -     *  @param subs  Will be passed to obj->addResources(). | 
| */ | 
| -    void addObjectRecursively(SkPDFObject* obj, const SkPDFSubstituteMap& subs); | 
| +    void addObjectRecursively(SkPDFObject* obj); | 
|  | 
| /** Get the object number for the passed object. | 
| *  @param obj         The object of interest. | 
| @@ -401,32 +386,6 @@ private: | 
|  | 
| //////////////////////////////////////////////////////////////////////////////// | 
|  | 
| -/** \class SkPDFSubstituteMap | 
| - | 
| -    The PDF Substitute Map manages substitute objects and owns the | 
| -    substitutes. | 
| -*/ | 
| -class SkPDFSubstituteMap : SkNoncopyable { | 
| -public: | 
| -    ~SkPDFSubstituteMap(); | 
| -    /** Set substitute object for the passed object. | 
| -        Refs substitute. | 
| -     */ | 
| -    void setSubstitute(SkPDFObject* original, SkPDFObject* substitute); | 
| - | 
| -    /** Find and return any substitute object set for the passed object. If | 
| -     *  there is none, return the passed object. | 
| -     */ | 
| -    SkPDFObject* getSubstitute(SkPDFObject* object) const; | 
| - | 
| -    SkPDFObject* operator()(SkPDFObject* o) const { | 
| -        return this->getSubstitute(o); | 
| -    } | 
| - | 
| -private: | 
| -    SkTHashMap<SkPDFObject*, SkPDFObject*> fSubstituteMap; | 
| -}; | 
| - | 
| #ifdef SK_PDF_IMAGE_STATS | 
| extern SkAtomic<int> gDrawImageCalls; | 
| extern SkAtomic<int> gJpegImageObjects; | 
|  |