Print out picture version even if its unsupported

Change-Id: I1dd61924f7b72cdae1cc0cf530e39b052ae19add
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430216
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2021-07-19 16:46:11 -04:00
parent 8aec124cf0
commit 08d206be46
2 changed files with 6 additions and 4 deletions

View File

@ -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);
}

View File

@ -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;
}