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

Unified Diff: src/doc/SkDocument_PDF.cpp

Issue 935843007: Remove unused parameters to SkDocument::CreatePDF (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove SkPicture::EncodeBitmap Created 5 years, 10 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 | « include/core/SkPicture.h ('k') | src/pdf/SkPDFDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/doc/SkDocument_PDF.cpp
diff --git a/src/doc/SkDocument_PDF.cpp b/src/doc/SkDocument_PDF.cpp
index de65efe8c8cdaae59ddd7f0b4a35d464499fdfbc..6d6bf6352662962612e5a5e6fe43858ba4059130 100644
--- a/src/doc/SkDocument_PDF.cpp
+++ b/src/doc/SkDocument_PDF.cpp
@@ -11,16 +11,14 @@
class SkDocument_PDF : public SkDocument {
public:
- SkDocument_PDF(SkWStream* stream, void (*doneProc)(SkWStream*,bool),
- SkPicture::EncodeBitmap encoder,
+ SkDocument_PDF(SkWStream* stream,
+ void (*doneProc)(SkWStream*,bool),
SkScalar rasterDpi)
- : SkDocument(stream, doneProc)
- , fEncoder(encoder)
- , fRasterDpi(rasterDpi) {
- fDoc = SkNEW(SkPDFDocument);
- fCanvas = NULL;
- fDevice = NULL;
- }
+ : SkDocument(stream, doneProc)
+ , fDoc(SkNEW(SkPDFDocument))
+ , fDevice(NULL)
+ , fCanvas(NULL)
+ , fRasterDpi(rasterDpi) {}
virtual ~SkDocument_PDF() {
// subclasses must call close() in their destructors
@@ -37,9 +35,6 @@ protected:
mediaBoxSize.set(SkScalarRoundToInt(width), SkScalarRoundToInt(height));
fDevice = SkNEW_ARGS(SkPDFDevice, (mediaBoxSize, mediaBoxSize, SkMatrix::I()));
- if (fEncoder) {
- fDevice->setDCTEncoder(fEncoder);
- }
if (fRasterDpi != 0) {
fDevice->setRasterDpi(fRasterDpi);
}
@@ -82,29 +77,24 @@ private:
SkPDFDocument* fDoc;
SkPDFDevice* fDevice;
SkCanvas* fCanvas;
- SkPicture::EncodeBitmap fEncoder;
SkScalar fRasterDpi;
};
///////////////////////////////////////////////////////////////////////////////
-SkDocument* SkDocument::CreatePDF(SkWStream* stream, void (*done)(SkWStream*,bool),
- SkPicture::EncodeBitmap enc,
- SkScalar dpi) {
- return stream ? SkNEW_ARGS(SkDocument_PDF, (stream, done, enc, dpi)) : NULL;
+SkDocument* SkDocument::CreatePDF(SkWStream* stream, SkScalar dpi) {
+ return stream ? SkNEW_ARGS(SkDocument_PDF, (stream, NULL, dpi)) : NULL;
}
static void delete_wstream(SkWStream* stream, bool aborted) {
SkDELETE(stream);
}
-SkDocument* SkDocument::CreatePDF(const char path[],
- SkPicture::EncodeBitmap enc,
- SkScalar dpi) {
+SkDocument* SkDocument::CreatePDF(const char path[], SkScalar dpi) {
SkFILEWStream* stream = SkNEW_ARGS(SkFILEWStream, (path));
if (!stream->isValid()) {
SkDELETE(stream);
return NULL;
}
- return SkNEW_ARGS(SkDocument_PDF, (stream, delete_wstream, enc, dpi));
+ return SkNEW_ARGS(SkDocument_PDF, (stream, delete_wstream, dpi));
}
« no previous file with comments | « include/core/SkPicture.h ('k') | src/pdf/SkPDFDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698