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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 } | 70 } |
71 | 71 |
72 DEF_TEST(Codec, r) { | 72 DEF_TEST(Codec, r) { |
73 // WBMP | 73 // WBMP |
74 check(r, "mandrill.wbmp", SkISize::Make(512, 512), true); | 74 check(r, "mandrill.wbmp", SkISize::Make(512, 512), true); |
75 | 75 |
76 // BMP | 76 // BMP |
77 check(r, "randPixels.bmp", SkISize::Make(8, 8), true); | 77 check(r, "randPixels.bmp", SkISize::Make(8, 8), true); |
78 | 78 |
79 // ICO | 79 // ICO |
80 // These two tests examine interestingly different behavior: | |
81 // Decodes an embedded BMP image | |
80 check(r, "color_wheel.ico", SkISize::Make(128, 128), true); | 82 check(r, "color_wheel.ico", SkISize::Make(128, 128), true); |
scroggo
2015/04/01 18:28:21
Sorry; you had a conflict with my change that just
| |
83 // Decodes an embedded PNG image | |
84 check(r, "google_chrome.ico", SkISize::Make(256, 256), true); | |
81 | 85 |
82 // PNG | 86 // PNG |
83 check(r, "arrow.png", SkISize::Make(187, 312), true); | 87 check(r, "arrow.png", SkISize::Make(187, 312), true); |
84 check(r, "baby_tux.png", SkISize::Make(240, 246), true); | 88 check(r, "baby_tux.png", SkISize::Make(240, 246), true); |
85 check(r, "color_wheel.png", SkISize::Make(128, 128), true); | 89 check(r, "color_wheel.png", SkISize::Make(128, 128), true); |
86 check(r, "half-transparent-white-pixel.png", SkISize::Make(1, 1), true); | 90 check(r, "half-transparent-white-pixel.png", SkISize::Make(1, 1), true); |
87 check(r, "mandrill_128.png", SkISize::Make(128, 128), true); | 91 check(r, "mandrill_128.png", SkISize::Make(128, 128), true); |
88 check(r, "mandrill_16.png", SkISize::Make(16, 16), true); | 92 check(r, "mandrill_16.png", SkISize::Make(16, 16), true); |
89 check(r, "mandrill_256.png", SkISize::Make(256, 256), true); | 93 check(r, "mandrill_256.png", SkISize::Make(256, 256), true); |
90 check(r, "mandrill_32.png", SkISize::Make(32, 32), true); | 94 check(r, "mandrill_32.png", SkISize::Make(32, 32), true); |
91 check(r, "mandrill_512.png", SkISize::Make(512, 512), true); | 95 check(r, "mandrill_512.png", SkISize::Make(512, 512), true); |
92 check(r, "mandrill_64.png", SkISize::Make(64, 64), true); | 96 check(r, "mandrill_64.png", SkISize::Make(64, 64), true); |
93 check(r, "plane.png", SkISize::Make(250, 126), true); | 97 check(r, "plane.png", SkISize::Make(250, 126), true); |
94 check(r, "randPixels.png", SkISize::Make(8, 8), true); | 98 check(r, "randPixels.png", SkISize::Make(8, 8), true); |
95 check(r, "yellow_rose.png", SkISize::Make(400, 301), true); | 99 check(r, "yellow_rose.png", SkISize::Make(400, 301), true); |
96 } | 100 } |
OLD | NEW |