Index: src/pdf/SkPDFTypes.cpp |
diff --git a/src/pdf/SkPDFTypes.cpp b/src/pdf/SkPDFTypes.cpp |
index faa08372e5e8c591b533526632dd691c033c6d83..4cd48f4757e55a5f081ee517d3ae6bbb03b3838b 100644 |
--- a/src/pdf/SkPDFTypes.cpp |
+++ b/src/pdf/SkPDFTypes.cpp |
@@ -177,7 +177,9 @@ |
return; // These have no resources. |
case Type::kObjRef: { |
SkPDFObject* obj = substituteMap.getSubstitute(fObject); |
- objNumMap->addObjectRecursively(obj, substituteMap); |
+ if (objNumMap->addObject(obj)) { |
+ obj->addResources(objNumMap, substituteMap); |
+ } |
return; |
} |
case Type::kObject: |
@@ -498,13 +500,6 @@ |
return true; |
} |
-void SkPDFObjNumMap::addObjectRecursively(SkPDFObject* obj, |
- const SkPDFSubstituteMap& subs) { |
- if (obj && this->addObject(obj)) { |
- obj->addResources(this, subs); |
- } |
-} |
- |
int32_t SkPDFObjNumMap::getObjectNumber(SkPDFObject* obj) const { |
int32_t* objectNumberFound = fObjectNumbers.find(obj); |
SkASSERT(objectNumberFound); |