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

Unified Diff: src/pdf/SkPDFDocument.cpp

Issue 869783003: Cleanup SkPDFObject::emit* (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDocument.cpp
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp
index c4a5d448a54cc1ca6dd873a4a7737b3095aee7ac..c522b39516ee3cdbfa06458aea3131bb076ab37f 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -89,9 +89,13 @@ public:
: fCat(cat), fOut(out), fBaseOffset(SkToOffT(out->bytesWritten())) {
}
- void stream(SkPDFObject* obj) {
- fCat->setFileOffset(obj, this->offset());
- obj->emit(fOut, fCat, true);
+ void stream(SkPDFObject* object) {
+ fCat->setFileOffset(object, this->offset());
+ SkPDFObject* realObject = fCat->getSubstituteObject(object);
+ fCat->emitObjectNumber(fOut, realObject);
+ fOut->writeText(" obj\n");
+ realObject->emitObject(fOut, fCat);
+ fOut->writeText("\nendobj\n");
}
off_t offset() {
« no previous file with comments | « no previous file | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698