diff options
author | halcanary <halcanary@google.com> | 2016-01-06 09:02:25 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-06 09:02:26 -0800 |
commit | 53b1c09c139d2e8e04bc86e230256a23629ad7f2 (patch) | |
tree | e3fe14fc3b2529ae2d0290932960f5437d7777a2 /tests/PDFDocumentTest.cpp | |
parent | 54e63082191f337084f96083ca90d7c35273d6ff (diff) |
SkPDF: Change handling of large-numbers in matricies.
re-do http://crrev.com/1438503002 right.
Also, add a unit test that asserts without this change.
BUG=skia:734
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1552263003
Review URL: https://codereview.chromium.org/1552263003
Diffstat (limited to 'tests/PDFDocumentTest.cpp')
-rw-r--r-- | tests/PDFDocumentTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/PDFDocumentTest.cpp b/tests/PDFDocumentTest.cpp index c3a5f0e041..995e35f8c0 100644 --- a/tests/PDFDocumentTest.cpp +++ b/tests/PDFDocumentTest.cpp @@ -154,3 +154,15 @@ DEF_TEST(document_dct_encoder, r) { REPORTER_ASSERT(r, count_bytes(bm, true) < count_bytes(bm, false)); } } + +DEF_TEST(document_skbug_4734, r) { + REQUIRE_PDF_DOCUMENT(document_skbug_4734, r); + SkDynamicMemoryWStream stream; + SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&stream)); + SkCanvas* canvas = doc->beginPage(64, 64); + canvas->scale(10000.0f, 10000.0f); + canvas->translate(20.0f, 10.0f); + canvas->rotate(30.0f); + const char text[] = "HELLO"; + canvas->drawText(text, strlen(text), 0, 0, SkPaint()); +} |