| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 check(r, "randPixels.bmp", SkISize::Make(8, 8), true, false); | 214 check(r, "randPixels.bmp", SkISize::Make(8, 8), true, false); |
| 215 | 215 |
| 216 // ICO | 216 // ICO |
| 217 // These two tests examine interestingly different behavior: | 217 // These two tests examine interestingly different behavior: |
| 218 // Decodes an embedded BMP image | 218 // Decodes an embedded BMP image |
| 219 check(r, "color_wheel.ico", SkISize::Make(128, 128), false, false); | 219 check(r, "color_wheel.ico", SkISize::Make(128, 128), false, false); |
| 220 // Decodes an embedded PNG image | 220 // Decodes an embedded PNG image |
| 221 check(r, "google_chrome.ico", SkISize::Make(256, 256), false, false); | 221 check(r, "google_chrome.ico", SkISize::Make(256, 256), false, false); |
| 222 | 222 |
| 223 // GIF | 223 // GIF |
| 224 check(r, "box.gif", SkISize::Make(200, 55), true, false); | 224 check(r, "box.gif", SkISize::Make(200, 55), false, false); |
| 225 check(r, "color_wheel.gif", SkISize::Make(128, 128), true, false); | 225 check(r, "color_wheel.gif", SkISize::Make(128, 128), false, false); |
| 226 check(r, "randPixels.gif", SkISize::Make(8, 8), true, false); | 226 check(r, "randPixels.gif", SkISize::Make(8, 8), false, false); |
| 227 | 227 |
| 228 // JPG | 228 // JPG |
| 229 check(r, "CMYK.jpg", SkISize::Make(642, 516), true, false, false); | 229 check(r, "CMYK.jpg", SkISize::Make(642, 516), true, false, false); |
| 230 check(r, "color_wheel.jpg", SkISize::Make(128, 128), true, false); | 230 check(r, "color_wheel.jpg", SkISize::Make(128, 128), true, false); |
| 231 check(r, "grayscale.jpg", SkISize::Make(128, 128), true, false); | 231 check(r, "grayscale.jpg", SkISize::Make(128, 128), true, false); |
| 232 check(r, "mandrill_512_q075.jpg", SkISize::Make(512, 512), true, false); | 232 check(r, "mandrill_512_q075.jpg", SkISize::Make(512, 512), true, false); |
| 233 check(r, "randPixels.jpg", SkISize::Make(8, 8), true, false); | 233 check(r, "randPixels.jpg", SkISize::Make(8, 8), true, false); |
| 234 | 234 |
| 235 // PNG | 235 // PNG |
| 236 check(r, "arrow.png", SkISize::Make(187, 312), true, false); | 236 check(r, "arrow.png", SkISize::Make(187, 312), true, false); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result); | 387 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result); |
| 388 result = decoder->start( | 388 result = decoder->start( |
| 389 decoder->getInfo().makeColorType(kIndex_8_SkColorType)); | 389 decoder->getInfo().makeColorType(kIndex_8_SkColorType)); |
| 390 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result); | 390 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result); |
| 391 } | 391 } |
| 392 | 392 |
| 393 DEF_TEST(Codec_Params, r) { | 393 DEF_TEST(Codec_Params, r) { |
| 394 test_invalid_parameters(r, "index8.png"); | 394 test_invalid_parameters(r, "index8.png"); |
| 395 test_invalid_parameters(r, "mandrill.wbmp"); | 395 test_invalid_parameters(r, "mandrill.wbmp"); |
| 396 } | 396 } |
| OLD | NEW |