diff options
author | scroggo <scroggo@google.com> | 2015-04-01 11:25:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-01 11:25:20 -0700 |
commit | 58421544808562973ad66b2e3b8f9da1c5b8a36f (patch) | |
tree | 31d6673ccc7fb00c2f4ec363c2ae2351268778f3 /include/codec | |
parent | fb8307c6b78bfbaa5e969a9df0c007c232d6251d (diff) |
SkCodec::onGetScanlineDecoder must call rewind.
This mirrors the behavior in onGetPixels, and allows the implementation
to share code for handling calls to rewindIfNeeded.
This also fixes a bug where getScanlineDecoder was calling
rewindIfNeeded and treating the result as a bool.
In SkPngCodec, factor out the code to call rewindIfNeeded, and call it
in both onGetPixels and onGetScanlineDecoder.
Update the test to include testing the scanline decoder. Rename "gen"
to "codec" now that it must be an SkCodec.
BUG=skia:3257
Depends on https://codereview.chromium.org/1048423003/ (DIFFERENT ISSUE).
Review URL: https://codereview.chromium.org/1050893002
Diffstat (limited to 'include/codec')
-rw-r--r-- | include/codec/SkCodec.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h index 051564cf73..6f313a1c70 100644 --- a/include/codec/SkCodec.h +++ b/include/codec/SkCodec.h @@ -121,8 +121,8 @@ protected: /** * Override if your codec supports scanline decoding. * - * No need to call rewindIfNeeded(), which will have already been called - * by the base class. + * As in onGetPixels(), the implementation must call rewindIfNeeded() and + * handle as appropriate. * * @param dstInfo Info of the destination. If the dimensions do not match * those of getInfo, this implies a scale. |