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

Unified Diff: tests/CodexTest.cpp

Issue 1055743003: Swizzler changes Index8 and 565 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Gif rewinding that actually works Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/CodexTest.cpp
diff --git a/tests/CodexTest.cpp b/tests/CodexTest.cpp
index 26846a4550816371281c0797781a1b90cb31c355..20a9fed2f1a799eb330d78e2dd9dbfac12409335 100644
--- a/tests/CodexTest.cpp
+++ b/tests/CodexTest.cpp
@@ -41,7 +41,7 @@ static void check(skiatest::Reporter* r,
ERRORF(r, "Unable to decode '%s'", path);
return;
}
- SkImageInfo info = codec->getInfo();
+ SkImageInfo info = codec->getInfo().makeColorType(kN32_SkColorType);
msarett 2015/04/09 16:26:32 If we don't add this, gif will try to decode to kI
scroggo 2015/04/09 17:37:17 Another option: we could check for kIndex8, and se
msarett 2015/04/09 19:21:31 Done.
REPORTER_ASSERT(r, info.dimensions() == size);
SkBitmap bm;
bm.allocPixels(info);
@@ -94,6 +94,11 @@ DEF_TEST(Codec, r) {
// Decodes an embedded PNG image
check(r, "google_chrome.ico", SkISize::Make(256, 256), false);
+ // GIF
+ check(r, "box.gif", SkISize::Make(200, 55), false);
+ check(r, "color_wheel.gif", SkISize::Make(128, 128), false);
+ check(r, "randPixels.gif", SkISize::Make(8, 8), false);
+
// PNG
check(r, "arrow.png", SkISize::Make(187, 312), true);
check(r, "baby_tux.png", SkISize::Make(240, 246), true);

Powered by Google App Engine
This is Rietveld 408576698