aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkPDFDocument.cpp7
-rw-r--r--src/pdf/SkPDFDocument.h2
2 files changed, 2 insertions, 7 deletions
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp
index 96a79aedb8..ee009651b6 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -193,8 +193,7 @@ void SkPDFDocument::serialize(const sk_sp<SkPDFObject>& object) {
fObjectSerializer.serializeObjects(this->getStream());
}
-SkCanvas* SkPDFDocument::onBeginPage(SkScalar width, SkScalar height,
- const SkRect& trimBox) {
+SkCanvas* SkPDFDocument::onBeginPage(SkScalar width, SkScalar height) {
SkASSERT(!fCanvas.get()); // endPage() was called before this.
if (fPages.empty()) {
// if this is the first page if the document.
@@ -218,10 +217,6 @@ SkCanvas* SkPDFDocument::onBeginPage(SkScalar width, SkScalar height,
fPageDevice = sk_make_sp<SkPDFDevice>(pageSize, this);
fPageDevice->setFlip(); // Only the top-level device needs to be flipped.
fCanvas.reset(new SkPDFCanvas(fPageDevice));
- if (SkRect::MakeWH(width, height) != trimBox) {
- fCanvas->clipRect(trimBox);
- fCanvas->translate(trimBox.x(), trimBox.y());
- }
return fCanvas.get();
}
diff --git a/src/pdf/SkPDFDocument.h b/src/pdf/SkPDFDocument.h
index 7f8b6c84a3..3e3a50ae83 100644
--- a/src/pdf/SkPDFDocument.h
+++ b/src/pdf/SkPDFDocument.h
@@ -61,7 +61,7 @@ public:
sk_sp<SkPixelSerializer>,
bool);
~SkPDFDocument() override;
- SkCanvas* onBeginPage(SkScalar, SkScalar, const SkRect&) override;
+ SkCanvas* onBeginPage(SkScalar, SkScalar) override;
void onEndPage() override;
void onClose(SkWStream*) override;
void onAbort() override;