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 "SkAndroidCodec.h" | 9 #include "SkAndroidCodec.h" |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 check(r, "google_chrome.ico", SkISize::Make(256, 256), false, false, true, f
alse); | 401 check(r, "google_chrome.ico", SkISize::Make(256, 256), false, false, true, f
alse); |
402 | 402 |
403 // GIF | 403 // GIF |
404 // FIXME: We are not ready to test incomplete GIFs | 404 // FIXME: We are not ready to test incomplete GIFs |
405 check(r, "box.gif", SkISize::Make(200, 55), true, false, true, false); | 405 check(r, "box.gif", SkISize::Make(200, 55), true, false, true, false); |
406 check(r, "color_wheel.gif", SkISize::Make(128, 128), true, false, true, fals
e); | 406 check(r, "color_wheel.gif", SkISize::Make(128, 128), true, false, true, fals
e); |
407 // randPixels.gif is too small to test incomplete | 407 // randPixels.gif is too small to test incomplete |
408 check(r, "randPixels.gif", SkISize::Make(8, 8), true, false, true, false); | 408 check(r, "randPixels.gif", SkISize::Make(8, 8), true, false, true, false); |
409 | 409 |
410 // JPG | 410 // JPG |
411 check(r, "CMYK.jpg", SkISize::Make(642, 516), true, false, false); | 411 check(r, "CMYK.jpg", SkISize::Make(642, 516), true, false, true); |
412 check(r, "color_wheel.jpg", SkISize::Make(128, 128), true, false); | 412 check(r, "color_wheel.jpg", SkISize::Make(128, 128), true, false); |
413 // grayscale.jpg is too small to test incomplete | 413 // grayscale.jpg is too small to test incomplete |
414 check(r, "grayscale.jpg", SkISize::Make(128, 128), true, false, true, false)
; | 414 check(r, "grayscale.jpg", SkISize::Make(128, 128), true, false, true, false)
; |
415 check(r, "mandrill_512_q075.jpg", SkISize::Make(512, 512), true, false); | 415 check(r, "mandrill_512_q075.jpg", SkISize::Make(512, 512), true, false); |
416 // randPixels.jpg is too small to test incomplete | 416 // randPixels.jpg is too small to test incomplete |
417 check(r, "randPixels.jpg", SkISize::Make(8, 8), true, false, true, false); | 417 check(r, "randPixels.jpg", SkISize::Make(8, 8), true, false, true, false); |
418 | 418 |
419 // PNG | 419 // PNG |
420 check(r, "arrow.png", SkISize::Make(187, 312), true, false, true, false); | 420 check(r, "arrow.png", SkISize::Make(187, 312), true, false, true, false); |
421 check(r, "baby_tux.png", SkISize::Make(240, 246), true, false, true, false); | 421 check(r, "baby_tux.png", SkISize::Make(240, 246), true, false, true, false); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result); | 679 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result); |
680 result = decoder->startScanlineDecode( | 680 result = decoder->startScanlineDecode( |
681 decoder->getInfo().makeColorType(kIndex_8_SkColorType)); | 681 decoder->getInfo().makeColorType(kIndex_8_SkColorType)); |
682 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result); | 682 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result); |
683 } | 683 } |
684 | 684 |
685 DEF_TEST(Codec_Params, r) { | 685 DEF_TEST(Codec_Params, r) { |
686 test_invalid_parameters(r, "index8.png"); | 686 test_invalid_parameters(r, "index8.png"); |
687 test_invalid_parameters(r, "mandrill.wbmp"); | 687 test_invalid_parameters(r, "mandrill.wbmp"); |
688 } | 688 } |
OLD | NEW |