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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 REPORTER_ASSERT(r, SkIsAlign2(subset.fLeft) && SkIsAlign2(subset.fTo
p)); | 148 REPORTER_ASSERT(r, SkIsAlign2(subset.fLeft) && SkIsAlign2(subset.fTo
p)); |
149 } else { | 149 } else { |
150 // No subsets will work. | 150 // No subsets will work. |
151 REPORTER_ASSERT(r, result == SkCodec::kUnimplemented); | 151 REPORTER_ASSERT(r, result == SkCodec::kUnimplemented); |
152 } | 152 } |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 DEF_TEST(Codec, r) { | 156 DEF_TEST(Codec, r) { |
157 // WBMP | 157 // WBMP |
158 check(r, "mandrill.wbmp", SkISize::Make(512, 512), false, false); | 158 check(r, "mandrill.wbmp", SkISize::Make(512, 512), true, false); |
159 | 159 |
160 // WEBP | 160 // WEBP |
161 check(r, "baby_tux.webp", SkISize::Make(386, 395), false, true); | 161 check(r, "baby_tux.webp", SkISize::Make(386, 395), false, true); |
162 check(r, "color_wheel.webp", SkISize::Make(128, 128), false, true); | 162 check(r, "color_wheel.webp", SkISize::Make(128, 128), false, true); |
163 check(r, "yellow_rose.webp", SkISize::Make(400, 301), false, true); | 163 check(r, "yellow_rose.webp", SkISize::Make(400, 301), false, true); |
164 | 164 |
165 // BMP | 165 // BMP |
166 check(r, "randPixels.bmp", SkISize::Make(8, 8), false, false); | 166 check(r, "randPixels.bmp", SkISize::Make(8, 8), false, false); |
167 | 167 |
168 // ICO | 168 // ICO |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 test_empty(r, "empty_images/zero-embedded.ico"); | 285 test_empty(r, "empty_images/zero-embedded.ico"); |
286 test_empty(r, "empty_images/zero-width.bmp"); | 286 test_empty(r, "empty_images/zero-width.bmp"); |
287 test_empty(r, "empty_images/zero-height.bmp"); | 287 test_empty(r, "empty_images/zero-height.bmp"); |
288 test_empty(r, "empty_images/zero-width.jpg"); | 288 test_empty(r, "empty_images/zero-width.jpg"); |
289 test_empty(r, "empty_images/zero-height.jpg"); | 289 test_empty(r, "empty_images/zero-height.jpg"); |
290 test_empty(r, "empty_images/zero-width.png"); | 290 test_empty(r, "empty_images/zero-width.png"); |
291 test_empty(r, "empty_images/zero-height.png"); | 291 test_empty(r, "empty_images/zero-height.png"); |
292 test_empty(r, "empty_images/zero-width.wbmp"); | 292 test_empty(r, "empty_images/zero-width.wbmp"); |
293 test_empty(r, "empty_images/zero-height.wbmp"); | 293 test_empty(r, "empty_images/zero-height.wbmp"); |
294 } | 294 } |
OLD | NEW |