diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp index 5542fcabc6..b504de8a16 100644 --- a/src/core/SkPicture.cpp +++ b/src/core/SkPicture.cpp @@ -93,11 +93,12 @@ bool SkPicture::StreamIsSKP(SkStream* stream, SkPictInfo* pInfo) { if (!stream->readScalar(&info.fCullRect.fRight )) { return false; } if (!stream->readScalar(&info.fCullRect.fBottom)) { return false; } - if (!IsValidPictInfo(info)) { return false; } - - if (pInfo) { *pInfo = info; } - return true; + if (pInfo) { + *pInfo = info; + } + return IsValidPictInfo(info); } + bool SkPicture_StreamIsSKP(SkStream* stream, SkPictInfo* pInfo) { return SkPicture::StreamIsSKP(stream, pInfo); } diff --git a/tools/skpinfo.cpp b/tools/skpinfo.cpp index 2fa2831734..79dbaf34d0 100644 --- a/tools/skpinfo.cpp +++ b/tools/skpinfo.cpp @@ -54,6 +54,7 @@ int main(int argc, char** argv) { SkPictInfo info; if (!SkPicture_StreamIsSKP(&stream, &info)) { + SkDebugf("Unsupported version %d\n", info.getVersion()); return kNotAnSKP; }