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

Unified Diff: src/pdf/SkPDFBitmap.cpp

Issue 1304493002: SkPDF: Simplify PDFStream / emitObject() const (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: formatting Created 5 years, 4 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/SkPDFFont.cpp » ('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 f1a053f0aae7ecd2ebeeefb71aab7079feebc0be..ba26cd8308450623cf47482474797953de3fed51 100644
--- a/src/pdf/SkPDFBitmap.cpp
+++ b/src/pdf/SkPDFBitmap.cpp
@@ -249,7 +249,7 @@ public:
~PDFAlphaBitmap() {}
void emitObject(SkWStream*,
const SkPDFObjNumMap&,
- const SkPDFSubstituteMap&) override;
+ const SkPDFSubstituteMap&) const override;
private:
const SkBitmap fBitmap;
@@ -257,7 +257,7 @@ private:
void PDFAlphaBitmap::emitObject(SkWStream* stream,
const SkPDFObjNumMap& objNumMap,
- const SkPDFSubstituteMap& substitutes) {
+ const SkPDFSubstituteMap& substitutes) const {
SkAutoLockPixels autoLockPixels(fBitmap);
SkASSERT(fBitmap.colorType() != kIndex_8_SkColorType ||
fBitmap.getColorTable());
@@ -293,7 +293,7 @@ public:
const SkAutoTUnref<SkPDFObject> fSMask;
void emitObject(SkWStream*,
const SkPDFObjNumMap&,
- const SkPDFSubstituteMap&) override;
+ const SkPDFSubstituteMap&) const override;
void addResources(SkPDFObjNumMap*,
const SkPDFSubstituteMap&) const override;
PDFDefaultBitmap(const SkBitmap& bm, SkPDFObject* smask)
@@ -345,7 +345,7 @@ static SkPDFArray* make_indexed_color_space(const SkColorTable* table) {
void PDFDefaultBitmap::emitObject(SkWStream* stream,
const SkPDFObjNumMap& objNumMap,
- const SkPDFSubstituteMap& substitutes) {
+ const SkPDFSubstituteMap& substitutes) const {
SkAutoLockPixels autoLockPixels(fBitmap);
SkASSERT(fBitmap.colorType() != kIndex_8_SkColorType ||
fBitmap.getColorTable());
@@ -407,12 +407,12 @@ public:
: SkPDFBitmap(bm), fData(SkRef(data)), fIsYUV(isYUV) {}
void emitObject(SkWStream*,
const SkPDFObjNumMap&,
- const SkPDFSubstituteMap&) override;
+ const SkPDFSubstituteMap&) const override;
};
void PDFJpegBitmap::emitObject(SkWStream* stream,
const SkPDFObjNumMap& objNumMap,
- const SkPDFSubstituteMap& substituteMap) {
+ const SkPDFSubstituteMap& substituteMap) const {
SkPDFDict pdfDict("XObject");
pdfDict.insertName("Subtype", "Image");
pdfDict.insertInt("Width", fBitmap.width());
« no previous file with comments | « no previous file | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698