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

Unified Diff: tests/PDFPrimitivesTest.cpp

Issue 941023005: PDF : New factory function for SkPDFDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase on 07d5947 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 | « tests/CanvasTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PDFPrimitivesTest.cpp
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 2d4ac77aa445f508b8653191fa857a91b5f7fc40..97ad25e09a167f48276f9cabd3a633d2bb787c04 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.
« no previous file with comments | « tests/CanvasTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698