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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Decodes an embedded BMP image | 97 // Decodes an embedded BMP image |
98 check(r, "color_wheel.ico", SkISize::Make(128, 128), false); | 98 check(r, "color_wheel.ico", SkISize::Make(128, 128), false); |
99 // Decodes an embedded PNG image | 99 // Decodes an embedded PNG image |
100 check(r, "google_chrome.ico", SkISize::Make(256, 256), false); | 100 check(r, "google_chrome.ico", SkISize::Make(256, 256), false); |
101 | 101 |
102 // GIF | 102 // GIF |
103 check(r, "box.gif", SkISize::Make(200, 55), false); | 103 check(r, "box.gif", SkISize::Make(200, 55), false); |
104 check(r, "color_wheel.gif", SkISize::Make(128, 128), false); | 104 check(r, "color_wheel.gif", SkISize::Make(128, 128), false); |
105 check(r, "randPixels.gif", SkISize::Make(8, 8), false); | 105 check(r, "randPixels.gif", SkISize::Make(8, 8), false); |
106 | 106 |
| 107 // JPG |
| 108 check(r, "CMYK.jpg", SkISize::Make(642, 516), false); |
| 109 check(r, "color_wheel.jpg", SkISize::Make(128, 128), false); |
| 110 check(r, "grayscale.jpg", SkISize::Make(128, 128), false); |
| 111 check(r, "mandrill_512_q075.jpg", SkISize::Make(512, 512), false); |
| 112 check(r, "randPixels.jpg", SkISize::Make(8, 8), false); |
| 113 |
107 // PNG | 114 // PNG |
108 check(r, "arrow.png", SkISize::Make(187, 312), true); | 115 check(r, "arrow.png", SkISize::Make(187, 312), true); |
109 check(r, "baby_tux.png", SkISize::Make(240, 246), true); | 116 check(r, "baby_tux.png", SkISize::Make(240, 246), true); |
110 check(r, "color_wheel.png", SkISize::Make(128, 128), true); | 117 check(r, "color_wheel.png", SkISize::Make(128, 128), true); |
111 check(r, "half-transparent-white-pixel.png", SkISize::Make(1, 1), true); | 118 check(r, "half-transparent-white-pixel.png", SkISize::Make(1, 1), true); |
112 check(r, "mandrill_128.png", SkISize::Make(128, 128), true); | 119 check(r, "mandrill_128.png", SkISize::Make(128, 128), true); |
113 check(r, "mandrill_16.png", SkISize::Make(16, 16), true); | 120 check(r, "mandrill_16.png", SkISize::Make(16, 16), true); |
114 check(r, "mandrill_256.png", SkISize::Make(256, 256), true); | 121 check(r, "mandrill_256.png", SkISize::Make(256, 256), true); |
115 check(r, "mandrill_32.png", SkISize::Make(32, 32), true); | 122 check(r, "mandrill_32.png", SkISize::Make(32, 32), true); |
116 check(r, "mandrill_512.png", SkISize::Make(512, 512), true); | 123 check(r, "mandrill_512.png", SkISize::Make(512, 512), true); |
(...skipping 24 matching lines...) Expand all Loading... |
141 const char emptyGif[] = "GIFVER"; | 148 const char emptyGif[] = "GIFVER"; |
142 | 149 |
143 test_invalid_stream(r, nonSupportedStream, sizeof(nonSupportedStream)); | 150 test_invalid_stream(r, nonSupportedStream, sizeof(nonSupportedStream)); |
144 test_invalid_stream(r, emptyPng, sizeof(emptyPng)); | 151 test_invalid_stream(r, emptyPng, sizeof(emptyPng)); |
145 test_invalid_stream(r, emptyJpeg, sizeof(emptyJpeg)); | 152 test_invalid_stream(r, emptyJpeg, sizeof(emptyJpeg)); |
146 test_invalid_stream(r, emptyWebp, sizeof(emptyWebp)); | 153 test_invalid_stream(r, emptyWebp, sizeof(emptyWebp)); |
147 test_invalid_stream(r, emptyBmp, sizeof(emptyBmp)); | 154 test_invalid_stream(r, emptyBmp, sizeof(emptyBmp)); |
148 test_invalid_stream(r, emptyIco, sizeof(emptyIco)); | 155 test_invalid_stream(r, emptyIco, sizeof(emptyIco)); |
149 test_invalid_stream(r, emptyGif, sizeof(emptyGif)); | 156 test_invalid_stream(r, emptyGif, sizeof(emptyGif)); |
150 } | 157 } |
OLD | NEW |