aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFBitmap.h
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-04-17 13:27:24 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-17 13:27:24 -0700
commita8448bc3dfe0f2e768838b4416fb3ebf823b694e (patch)
treeabf34ab1bc7bfee5aac81f4a6d1f4c4b636b66fd /src/pdf/SkPDFBitmap.h
parent673e902c9b9982a167f54f1cc175d8d9cab8bcaf (diff)
PDF: Correctly embed JPEG images directly into PDF output.
We only embed images with YUV planes. That should only grab the subset of color JPEGs supported by PDF. BUG=skia:3180 Review URL: https://codereview.chromium.org/1025773002
Diffstat (limited to 'src/pdf/SkPDFBitmap.h')
-rw-r--r--src/pdf/SkPDFBitmap.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/pdf/SkPDFBitmap.h b/src/pdf/SkPDFBitmap.h
index bf41f6341a..2c8653f315 100644
--- a/src/pdf/SkPDFBitmap.h
+++ b/src/pdf/SkPDFBitmap.h
@@ -26,22 +26,15 @@ class SkPDFBitmap : public SkPDFObject {
public:
// Returns NULL on unsupported bitmap;
static SkPDFBitmap* Create(SkPDFCanon*, const SkBitmap&);
- ~SkPDFBitmap();
- void emitObject(SkWStream*,
- const SkPDFObjNumMap& objNumMap,
- const SkPDFSubstituteMap& substitutes) override;
- void addResources(SkPDFObjNumMap*,
- const SkPDFSubstituteMap&) const override;
bool equals(const SkBitmap& other) const {
return fBitmap.getGenerationID() == other.getGenerationID() &&
fBitmap.pixelRefOrigin() == other.pixelRefOrigin() &&
fBitmap.dimensions() == other.dimensions();
}
-private:
+protected:
const SkBitmap fBitmap;
- const SkAutoTUnref<SkPDFObject> fSMask;
- SkPDFBitmap(const SkBitmap&, SkPDFObject*);
+ SkPDFBitmap(const SkBitmap& bm) : fBitmap(bm) {}
};
#endif // SkPDFBitmap_DEFINED