Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: tests/CodexTest.cpp

Issue 1287423002: Scanline decoding for bmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Scanline decoding for bmp without reordering Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 DEF_TEST(Codec, r) { 191 DEF_TEST(Codec, r) {
192 // WBMP 192 // WBMP
193 check(r, "mandrill.wbmp", SkISize::Make(512, 512), true, false); 193 check(r, "mandrill.wbmp", SkISize::Make(512, 512), true, false);
194 194
195 // WEBP 195 // WEBP
196 check(r, "baby_tux.webp", SkISize::Make(386, 395), false, true); 196 check(r, "baby_tux.webp", SkISize::Make(386, 395), false, true);
197 check(r, "color_wheel.webp", SkISize::Make(128, 128), false, true); 197 check(r, "color_wheel.webp", SkISize::Make(128, 128), false, true);
198 check(r, "yellow_rose.webp", SkISize::Make(400, 301), false, true); 198 check(r, "yellow_rose.webp", SkISize::Make(400, 301), false, true);
199 199
200 // BMP 200 // BMP
201 check(r, "randPixels.bmp", SkISize::Make(8, 8), false, false); 201 check(r, "randPixels.bmp", SkISize::Make(8, 8), true, false);
202 202
203 // ICO 203 // ICO
204 // These two tests examine interestingly different behavior: 204 // These two tests examine interestingly different behavior:
205 // Decodes an embedded BMP image 205 // Decodes an embedded BMP image
206 check(r, "color_wheel.ico", SkISize::Make(128, 128), false, false); 206 check(r, "color_wheel.ico", SkISize::Make(128, 128), false, false);
207 // Decodes an embedded PNG image 207 // Decodes an embedded PNG image
208 check(r, "google_chrome.ico", SkISize::Make(256, 256), false, false); 208 check(r, "google_chrome.ico", SkISize::Make(256, 256), false, false);
209 209
210 // GIF 210 // GIF
211 check(r, "box.gif", SkISize::Make(200, 55), false, false); 211 check(r, "box.gif", SkISize::Make(200, 55), false, false);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result); 357 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result);
358 result = decoder->start( 358 result = decoder->start(
359 decoder->getInfo().makeColorType(kIndex_8_SkColorType)); 359 decoder->getInfo().makeColorType(kIndex_8_SkColorType));
360 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result); 360 REPORTER_ASSERT(r, SkCodec::kInvalidParameters == result);
361 } 361 }
362 362
363 DEF_TEST(Codec_Params, r) { 363 DEF_TEST(Codec_Params, r) {
364 test_invalid_parameters(r, "index8.png"); 364 test_invalid_parameters(r, "index8.png");
365 test_invalid_parameters(r, "mandrill.wbmp"); 365 test_invalid_parameters(r, "mandrill.wbmp");
366 } 366 }
OLDNEW
« src/codec/SkBmpStandardCodec.cpp ('K') | « src/codec/SkScanlineDecoder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698