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

Side by Side Diff: tests/CodexTest.cpp

Issue 1472933002: Make SkAndroidCodec support ico (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments Created 5 years 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
« no previous file with comments | « src/codec/SkSwizzler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "SkAndroidCodec.h" 9 #include "SkAndroidCodec.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 check(r, "color_wheel.webp", SkISize::Make(128, 128), false, true); 394 check(r, "color_wheel.webp", SkISize::Make(128, 128), false, true);
395 check(r, "yellow_rose.webp", SkISize::Make(400, 301), false, true); 395 check(r, "yellow_rose.webp", SkISize::Make(400, 301), false, true);
396 396
397 // BMP 397 // BMP
398 check(r, "randPixels.bmp", SkISize::Make(8, 8), true, false); 398 check(r, "randPixels.bmp", SkISize::Make(8, 8), true, false);
399 399
400 // ICO 400 // ICO
401 // FIXME: We are not ready to test incomplete ICOs 401 // FIXME: We are not ready to test incomplete ICOs
402 // These two tests examine interestingly different behavior: 402 // These two tests examine interestingly different behavior:
403 // Decodes an embedded BMP image 403 // Decodes an embedded BMP image
404 check(r, "color_wheel.ico", SkISize::Make(128, 128), false, false, false); 404 check(r, "color_wheel.ico", SkISize::Make(128, 128), true, false, false);
405 // Decodes an embedded PNG image 405 // Decodes an embedded PNG image
406 check(r, "google_chrome.ico", SkISize::Make(256, 256), false, false, false); 406 check(r, "google_chrome.ico", SkISize::Make(256, 256), true, false, false);
407 407
408 // GIF 408 // GIF
409 // FIXME: We are not ready to test incomplete GIFs 409 // FIXME: We are not ready to test incomplete GIFs
410 check(r, "box.gif", SkISize::Make(200, 55), true, false, false); 410 check(r, "box.gif", SkISize::Make(200, 55), true, false, false);
411 check(r, "color_wheel.gif", SkISize::Make(128, 128), true, false, false); 411 check(r, "color_wheel.gif", SkISize::Make(128, 128), true, false, false);
412 // randPixels.gif is too small to test incomplete 412 // randPixels.gif is too small to test incomplete
413 check(r, "randPixels.gif", SkISize::Make(8, 8), true, false, false); 413 check(r, "randPixels.gif", SkISize::Make(8, 8), true, false, false);
414 414
415 // JPG 415 // JPG
416 check(r, "CMYK.jpg", SkISize::Make(642, 516), true, false); 416 check(r, "CMYK.jpg", SkISize::Make(642, 516), true, false);
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 REPORTER_ASSERT(r, SkImageDecoder::DecodeMemory(data->data(), data->size(), &bitmap)); 870 REPORTER_ASSERT(r, SkImageDecoder::DecodeMemory(data->data(), data->size(), &bitmap));
871 871
872 // So SkCodec should, too. 872 // So SkCodec should, too.
873 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(data)); 873 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(data));
874 REPORTER_ASSERT(r, codec); 874 REPORTER_ASSERT(r, codec);
875 if (!codec) { 875 if (!codec) {
876 return; 876 return;
877 } 877 }
878 test_info(r, codec, codec->getInfo(), SkCodec::kSuccess, nullptr); 878 test_info(r, codec, codec->getInfo(), SkCodec::kSuccess, nullptr);
879 } 879 }
OLDNEW
« no previous file with comments | « src/codec/SkSwizzler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698