• Leon Scroggins III's avatar
    Handle SkStream::rewind properly. · dcfe5370
    Leon Scroggins III authored
    cherry-pick of https://code.google.com/p/skia/source/detail?r=10977
    
    include/core/SkStream.h:
    Update documentation to state that rewinding a stream at the beginning
    should return true. This is important because our decoders fail if
    rewind returns false, assuming that the stream is not at the beginning.
    
    src/images/SkImageDecoder_libpng.cpp:
    If rewind fails, call png_error.
    
    src/images/SkImageDecoder_libwebp.cpp:
    If rewind fails, report an error and return false.
    
    src/images/SkImageRef.cpp:
    If rewind fails report an error and return false.
    FIXME: Need to handle flattening properly. Should I perhaps move
    writeStream into SkOrderedWriteBuffer?
    
    src/images/SkJpegUtility.cpp:
    Report a jpeg error on failure to rewind.
    
    BUG:8432093
    Change-Id: Ie339cda0a9d31bf0abafc38f9c2c77726f23c6a6
    dcfe5370
SkStream.h 15.3 KB