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

Side by Side Diff: tests/PDFDocumentTest.cpp

Issue 1552263003: SkPDF: Change handling of large-numbers in matricies. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-01-05 (Tuesday) 13:11:15 EST Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "Test.h" 7 #include "Test.h"
8 8
9 #include "Resources.h" 9 #include "Resources.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 DEF_TEST(document_dct_encoder, r) { 149 DEF_TEST(document_dct_encoder, r) {
150 REQUIRE_PDF_DOCUMENT(document_dct_encoder, r); 150 REQUIRE_PDF_DOCUMENT(document_dct_encoder, r);
151 SkBitmap bm; 151 SkBitmap bm;
152 if (GetResourceAsBitmap("mandrill_64.png", &bm)) { 152 if (GetResourceAsBitmap("mandrill_64.png", &bm)) {
153 // Lossy encoding works better on photographs. 153 // Lossy encoding works better on photographs.
154 REPORTER_ASSERT(r, count_bytes(bm, true) < count_bytes(bm, false)); 154 REPORTER_ASSERT(r, count_bytes(bm, true) < count_bytes(bm, false));
155 } 155 }
156 } 156 }
157
158 DEF_TEST(document_skbug_4734, r) {
159 REQUIRE_PDF_DOCUMENT(document_skbug_4734, r);
160 SkDynamicMemoryWStream stream;
161 SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&stream));
162 SkCanvas* canvas = doc->beginPage(64, 64);
163 canvas->scale(10000.0f, 10000.0f);
164 canvas->translate(20.0f, 10.0f);
165 canvas->rotate(30.0f);
166 const char text[] = "HELLO";
167 canvas->drawText(text, strlen(text), 0, 0, SkPaint());
168 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698