OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 | 7 |
8 #include "SkDocument.h" | 8 #include "SkDocument.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkImageGenerator.h" | 10 #include "SkImageGenerator.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 } | 35 } |
36 } | 36 } |
37 return false; | 37 return false; |
38 } | 38 } |
39 | 39 |
40 | 40 |
41 static SkData* load_resource( | 41 static SkData* load_resource( |
42 skiatest::Reporter* r, const char* test, const char* filename) { | 42 skiatest::Reporter* r, const char* test, const char* filename) { |
43 SkString path(GetResourcePath(filename)); | 43 SkString path(GetResourcePath(filename)); |
44 SkData* data = SkData::NewFromFileName(path.c_str()); | 44 SkData* data = SkData::NewFromFileName(path.c_str()); |
45 if (!data && r->verbose()) { | 45 if (!data) { |
46 SkDebugf("\n%s: Resource '%s' can not be found.\n", | 46 INFOF(r, "\n%s: Resource '%s' can not be found.\n", |
47 test, filename); | 47 test, filename); |
48 } | 48 } |
49 return data; // May return nullptr. | 49 return data; // May return nullptr. |
50 } | 50 } |
51 | 51 |
52 /** | 52 /** |
53 * Test that for Jpeg files that use the JFIF colorspace, they are | 53 * Test that for Jpeg files that use the JFIF colorspace, they are |
54 * directly embedded into the PDF (without re-encoding) when that | 54 * directly embedded into the PDF (without re-encoding) when that |
55 * makes sense. | 55 * makes sense. |
56 */ | 56 */ |
57 DEF_TEST(PDFJpegEmbedTest, r) { | 57 DEF_TEST(PDFJpegEmbedTest, r) { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 ERRORF(r, "%s failed isJfif test", kTests[i].path); | 136 ERRORF(r, "%s failed isJfif test", kTests[i].path); |
137 continue; | 137 continue; |
138 } | 138 } |
139 if (!isJfif) { | 139 if (!isJfif) { |
140 continue; // not applicable | 140 continue; // not applicable |
141 } | 141 } |
142 if (kTests[i].type != info.fType) { | 142 if (kTests[i].type != info.fType) { |
143 ERRORF(r, "%s failed jfif type test", kTests[i].path); | 143 ERRORF(r, "%s failed jfif type test", kTests[i].path); |
144 continue; | 144 continue; |
145 } | 145 } |
146 if (r->verbose()) { | 146 INFOF(r, "\nJpegIdentification: %s [%d x %d]\n", kTests[i].path, |
147 SkDebugf("\nJpegIdentification: %s [%d x %d]\n", kTests[i].path, | 147 info.fSize.width(), info.fSize.height()); |
148 info.fSize.width(), info.fSize.height()); | |
149 } | |
150 } | 148 } |
151 } | 149 } |
OLD | NEW |