diff options
author | msarett <msarett@google.com> | 2015-12-04 05:43:09 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-04 05:43:09 -0800 |
commit | 1603e9310f62cf0dd543cdb09dea06aa78373f13 (patch) | |
tree | 5ef44b26dbdec877f35834a79c0e6408e7518d9e /src/codec/SkBmpCodec.cpp | |
parent | bbf2ce4b06bce1d5b70529b2fe08c159c1a93704 (diff) |
Make SkAndroidCodec support ico
BUG=skia:
Review URL: https://codereview.chromium.org/1472933002
Diffstat (limited to 'src/codec/SkBmpCodec.cpp')
-rw-r--r-- | src/codec/SkBmpCodec.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp index 191c2ad800..aff54021a7 100644 --- a/src/codec/SkBmpCodec.cpp +++ b/src/codec/SkBmpCodec.cpp @@ -481,6 +481,8 @@ bool SkBmpCodec::ReadHeader(SkStream* stream, bool inIco, SkCodec** codecOut) { // Return the codec switch (inputFormat) { case kStandard_BmpInputFormat: + // We require streams to have a memory base for Bmp-in-Ico decodes. + SkASSERT(!inIco || nullptr != stream->getMemoryBase()); *codecOut = new SkBmpStandardCodec(imageInfo, stream, bitsPerPixel, numColors, bytesPerColor, offset - bytesRead, rowOrder, inIco); return true; |