Acknowledge that SkIcoCodec can rewind and test it.
authorscroggo <scroggo@google.com>
Wed, 1 Apr 2015 17:24:37 +0000 (10:24 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 1 Apr 2015 17:24:37 +0000 (10:24 -0700)
Since SkIcoCodec has an SkCodec for its encoded images, backed by
SkMemoryStreams, the SkMemoryStream can always rewind, and will be
rewound by the sub-codec if necessary (now that SkBmpCodec and
SkPngCodec support rewinding).

Depends on https://codereview.chromium.org/1057483003/ and
https://codereview.chromium.org/1048423003/ (DIFFERENT ISSUES).

BUG=skia:3257

Review URL: https://codereview.chromium.org/1054603002

tests/CodexTest.cpp

index f201070..f4ed0e8 100644 (file)
@@ -77,8 +77,7 @@ DEF_TEST(Codec, r) {
     check(r, "randPixels.bmp", SkISize::Make(8, 8), true);
 
     // ICO
-    // TODO (msarett): SkIcoCodec should be able to rewind.
-    check(r, "color_wheel.ico", SkISize::Make(128, 128), false);
+    check(r, "color_wheel.ico", SkISize::Make(128, 128), true);
 
     // PNG
     check(r, "arrow.png", SkISize::Make(187, 312), true);