diff options
author | halcanary <halcanary@google.com> | 2015-02-20 06:17:26 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-20 06:17:26 -0800 |
commit | a1f1ee98a1f6d0770f6243270ca2f0e6c92efaba (patch) | |
tree | 427609a03b889602589a698834b96ea0035e6e8a /tests/PDFPrimitivesTest.cpp | |
parent | 07d5947b886bef06621e830e9f8bf253f9bad703 (diff) |
PDF : New factory function for SkPDFDevice
SkPDFDevice now has factory function that matches what callers need.
Review URL: https://codereview.chromium.org/941023005
Diffstat (limited to 'tests/PDFPrimitivesTest.cpp')
-rw-r--r-- | tests/PDFPrimitivesTest.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp index 2d4ac77aa4..97ad25e09a 100644 --- a/tests/PDFPrimitivesTest.cpp +++ b/tests/PDFPrimitivesTest.cpp @@ -11,6 +11,7 @@ #include "SkFlate.h" #include "SkImageEncoder.h" #include "SkMatrix.h" +#include "SkPDFCanon.h" #include "SkPDFCatalog.h" #include "SkPDFDevice.h" #include "SkPDFStream.h" @@ -215,8 +216,8 @@ static void TestSubstitute(skiatest::Reporter* reporter) { // and there is no assert on input data in Debug mode. static void test_issue1083() { SkISize pageSize = SkISize::Make(100, 100); - SkAutoTUnref<SkPDFDevice> dev(new SkPDFDevice(pageSize, pageSize, SkMatrix::I())); - + SkPDFCanon canon; + SkAutoTUnref<SkPDFDevice> dev(SkPDFDevice::Create(pageSize, 72.0f, &canon)); SkCanvas c(dev); SkPaint paint; paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding); @@ -354,8 +355,10 @@ void DummyImageFilter::toString(SkString* str) const { // CPU rasterization. DEF_TEST(PDFImageFilter, reporter) { SkISize pageSize = SkISize::Make(100, 100); - SkAutoTUnref<SkPDFDevice> device(new SkPDFDevice(pageSize, pageSize, SkMatrix::I())); - SkCanvas canvas(device.get()); + SkPDFCanon canon; + SkAutoTUnref<SkPDFDevice> pdfDevice( + SkPDFDevice::Create(pageSize, 72.0f, &canon)); + SkCanvas canvas(pdfDevice.get()); SkAutoTUnref<DummyImageFilter> filter(new DummyImageFilter()); // Filter just created; should be unvisited. |