skia2/include/codec
scroggo b427db1d45 Consolidate SkCodec functions for handling rewind
Previously, many of our codec implementations followed the same
pattern (often in a function named handleRewind):

switch (this->rewindIfNeeded()) {
  case CouldNotRewind:
    return CouldNotRewind;
  case NoRewindNecessary:
    // keep going
    break;
  case Rewound:
     <re-read header etc>
    break;
}

In this CL, remove the enum, and put the piece that happens in the
Rewound case into a virtual function, onRewind. rewindIfNeeded now
contains the common pieces from various functions named handleRewind.

In SkBmpCodec, add a function that returns whether the BMP is in ICO,
so it can have a common implementation for onRewind.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1288483002
2015-08-12 07:24:13 -07:00
..
SkCodec.h Consolidate SkCodec functions for handling rewind 2015-08-12 07:24:13 -07:00
SkEncodedFormat.h Add SkEncodedFormat, used by SkCodec. 2015-03-20 11:55:55 -07:00
SkScanlineDecoder.h Create a scanline decoder without creating a codec 2015-08-04 09:24:45 -07:00