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

Unified Diff: src/pdf/SkPDFBitmap.cpp

Issue 1398193002: Revert of SkPDF: Optionally output PDF/A-2b archive format. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/doc/SkDocument_PDF.cpp ('k') | src/pdf/SkPDFMetadata.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFBitmap.cpp
diff --git a/src/pdf/SkPDFBitmap.cpp b/src/pdf/SkPDFBitmap.cpp
index 52b65c01d460d2701b0d59113ccd1ae45938940e..1978040ec93309a4527912f55dea7d0ce5b32421 100644
--- a/src/pdf/SkPDFBitmap.cpp
+++ b/src/pdf/SkPDFBitmap.cpp
@@ -364,17 +364,19 @@
namespace {
class PDFDefaultBitmap : public SkPDFObject {
public:
- void emitObject(SkWStream* stream,
+ void emitObject(SkWStream* stream,
const SkPDFObjNumMap& objNumMap,
- const SkPDFSubstituteMap& subs) const override {
- emit_image_xobject(stream, fImage, false, fSMask, objNumMap, subs);
+ const SkPDFSubstituteMap& substitutes) const override {
+ emit_image_xobject(stream, fImage, false, fSMask, objNumMap, substitutes);
}
void addResources(SkPDFObjNumMap* catalog,
- const SkPDFSubstituteMap& subs) const override {
+ const SkPDFSubstituteMap& substitutes) const override {
if (fSMask.get()) {
- SkPDFObject* obj = subs.getSubstitute(fSMask.get());
+ SkPDFObject* obj = substitutes.getSubstitute(fSMask.get());
SkASSERT(obj);
- catalog->addObjectRecursively(obj, subs);
+ if (catalog->addObject(obj)) {
+ obj->addResources(catalog, substitutes);
+ }
}
}
PDFDefaultBitmap(const SkImage* image, SkPDFObject* smask)
« no previous file with comments | « src/doc/SkDocument_PDF.cpp ('k') | src/pdf/SkPDFMetadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698