OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "Resources.h" | 8 #include "Resources.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkCodec.h" | 10 #include "SkCodec.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 REPORTER_ASSERT(r, digest3 == digest1); | 82 REPORTER_ASSERT(r, digest3 == digest1); |
83 } else { | 83 } else { |
84 REPORTER_ASSERT(r, !scanlineDecoder); | 84 REPORTER_ASSERT(r, !scanlineDecoder); |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
88 DEF_TEST(Codec, r) { | 88 DEF_TEST(Codec, r) { |
89 // WBMP | 89 // WBMP |
90 check(r, "mandrill.wbmp", SkISize::Make(512, 512), false); | 90 check(r, "mandrill.wbmp", SkISize::Make(512, 512), false); |
91 | 91 |
| 92 // WEBP |
| 93 check(r, "baby_tux.webp", SkISize::Make(386, 395), false); |
| 94 check(r, "color_wheel.webp", SkISize::Make(128, 128), false); |
| 95 check(r, "yellow_rose.webp", SkISize::Make(400, 301), false); |
| 96 |
92 // BMP | 97 // BMP |
93 check(r, "randPixels.bmp", SkISize::Make(8, 8), false); | 98 check(r, "randPixels.bmp", SkISize::Make(8, 8), false); |
94 | 99 |
95 // ICO | 100 // ICO |
96 // These two tests examine interestingly different behavior: | 101 // These two tests examine interestingly different behavior: |
97 // Decodes an embedded BMP image | 102 // Decodes an embedded BMP image |
98 check(r, "color_wheel.ico", SkISize::Make(128, 128), false); | 103 check(r, "color_wheel.ico", SkISize::Make(128, 128), false); |
99 // Decodes an embedded PNG image | 104 // Decodes an embedded PNG image |
100 check(r, "google_chrome.ico", SkISize::Make(256, 256), false); | 105 check(r, "google_chrome.ico", SkISize::Make(256, 256), false); |
101 | 106 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 test_empty(r, "empty_images/zero-embedded.ico"); | 217 test_empty(r, "empty_images/zero-embedded.ico"); |
213 test_empty(r, "empty_images/zero-width.bmp"); | 218 test_empty(r, "empty_images/zero-width.bmp"); |
214 test_empty(r, "empty_images/zero-height.bmp"); | 219 test_empty(r, "empty_images/zero-height.bmp"); |
215 test_empty(r, "empty_images/zero-width.jpg"); | 220 test_empty(r, "empty_images/zero-width.jpg"); |
216 test_empty(r, "empty_images/zero-height.jpg"); | 221 test_empty(r, "empty_images/zero-height.jpg"); |
217 test_empty(r, "empty_images/zero-width.png"); | 222 test_empty(r, "empty_images/zero-width.png"); |
218 test_empty(r, "empty_images/zero-height.png"); | 223 test_empty(r, "empty_images/zero-height.png"); |
219 test_empty(r, "empty_images/zero-width.wbmp"); | 224 test_empty(r, "empty_images/zero-width.wbmp"); |
220 test_empty(r, "empty_images/zero-height.wbmp"); | 225 test_empty(r, "empty_images/zero-height.wbmp"); |
221 } | 226 } |
OLD | NEW |