OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |