Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1629)

Unified Diff: src/pdf/SkPDFTypes.cpp

Issue 1394263003: SkPDF: Optionally output PDF/A-2b archive format. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-10-12 (Monday) 11:49:14 EDT Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFTypes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFTypes.cpp
diff --git a/src/pdf/SkPDFTypes.cpp b/src/pdf/SkPDFTypes.cpp
index 4cd48f4757e55a5f081ee517d3ae6bbb03b3838b..faa08372e5e8c591b533526632dd691c033c6d83 100644
--- a/src/pdf/SkPDFTypes.cpp
+++ b/src/pdf/SkPDFTypes.cpp
@@ -177,9 +177,7 @@ void SkPDFUnion::addResources(SkPDFObjNumMap* objNumMap,
return; // These have no resources.
case Type::kObjRef: {
SkPDFObject* obj = substituteMap.getSubstitute(fObject);
- if (objNumMap->addObject(obj)) {
- obj->addResources(objNumMap, substituteMap);
- }
+ objNumMap->addObjectRecursively(obj, substituteMap);
return;
}
case Type::kObject:
@@ -500,6 +498,13 @@ bool SkPDFObjNumMap::addObject(SkPDFObject* obj) {
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);
« no previous file with comments | « src/pdf/SkPDFTypes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698