Chromium Code Reviews| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 REPORTER_ASSERT(r, digest3 == digest1); | 77 REPORTER_ASSERT(r, digest3 == digest1); |
| 78 } else { | 78 } else { |
| 79 REPORTER_ASSERT(r, !scanlineDecoder); | 79 REPORTER_ASSERT(r, !scanlineDecoder); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 DEF_TEST(Codec, r) { | 83 DEF_TEST(Codec, r) { |
| 84 // WBMP | 84 // WBMP |
| 85 check(r, "mandrill.wbmp", SkISize::Make(512, 512), false); | 85 check(r, "mandrill.wbmp", SkISize::Make(512, 512), false); |
| 86 | 86 |
| 87 // WEBP | |
| 88 check(r, "baby_tux.webp", SkISize::Make(386, 395), false); | |
| 89 check(r, "color_wheel.webp", SkISize::Make(128, 128), false); | |
| 90 check(r, "yellow_rose.webp", SkISize::Make(400, 301), false); | |
|
jzern
2015/04/03 19:15:49
should be OK if you aren't concerned here about fu
| |
| 91 | |
| 87 // BMP | 92 // BMP |
| 88 check(r, "randPixels.bmp", SkISize::Make(8, 8), false); | 93 check(r, "randPixels.bmp", SkISize::Make(8, 8), false); |
| 89 | 94 |
| 90 // ICO | 95 // ICO |
| 91 // These two tests examine interestingly different behavior: | 96 // These two tests examine interestingly different behavior: |
| 92 // Decodes an embedded BMP image | 97 // Decodes an embedded BMP image |
| 93 check(r, "color_wheel.ico", SkISize::Make(128, 128), false); | 98 check(r, "color_wheel.ico", SkISize::Make(128, 128), false); |
| 94 // Decodes an embedded PNG image | 99 // Decodes an embedded PNG image |
| 95 check(r, "google_chrome.ico", SkISize::Make(256, 256), false); | 100 check(r, "google_chrome.ico", SkISize::Make(256, 256), false); |
| 96 | 101 |
| 97 // PNG | 102 // PNG |
| 98 check(r, "arrow.png", SkISize::Make(187, 312), true); | 103 check(r, "arrow.png", SkISize::Make(187, 312), true); |
| 99 check(r, "baby_tux.png", SkISize::Make(240, 246), true); | 104 check(r, "baby_tux.png", SkISize::Make(240, 246), true); |
| 100 check(r, "color_wheel.png", SkISize::Make(128, 128), true); | 105 check(r, "color_wheel.png", SkISize::Make(128, 128), true); |
| 101 check(r, "half-transparent-white-pixel.png", SkISize::Make(1, 1), true); | 106 check(r, "half-transparent-white-pixel.png", SkISize::Make(1, 1), true); |
| 102 check(r, "mandrill_128.png", SkISize::Make(128, 128), true); | 107 check(r, "mandrill_128.png", SkISize::Make(128, 128), true); |
| 103 check(r, "mandrill_16.png", SkISize::Make(16, 16), true); | 108 check(r, "mandrill_16.png", SkISize::Make(16, 16), true); |
| 104 check(r, "mandrill_256.png", SkISize::Make(256, 256), true); | 109 check(r, "mandrill_256.png", SkISize::Make(256, 256), true); |
| 105 check(r, "mandrill_32.png", SkISize::Make(32, 32), true); | 110 check(r, "mandrill_32.png", SkISize::Make(32, 32), true); |
| 106 check(r, "mandrill_512.png", SkISize::Make(512, 512), true); | 111 check(r, "mandrill_512.png", SkISize::Make(512, 512), true); |
| 107 check(r, "mandrill_64.png", SkISize::Make(64, 64), true); | 112 check(r, "mandrill_64.png", SkISize::Make(64, 64), true); |
| 108 check(r, "plane.png", SkISize::Make(250, 126), true); | 113 check(r, "plane.png", SkISize::Make(250, 126), true); |
| 109 check(r, "randPixels.png", SkISize::Make(8, 8), true); | 114 check(r, "randPixels.png", SkISize::Make(8, 8), true); |
| 110 check(r, "yellow_rose.png", SkISize::Make(400, 301), true); | 115 check(r, "yellow_rose.png", SkISize::Make(400, 301), true); |
| 111 } | 116 } |
| OLD | NEW |