catch the other case where we need to see if fScaledBitmap.lockPixels() might have failed

2nd-half clone of https://codereview.chromium.org/26273006/

BUG=chromium:295895

Review URL: https://codereview.chromium.org/26973006

git-svn-id: http://skia.googlecode.com/svn/trunk@11825 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-10-16 19:13:29 +00:00
parent 34150b451d
commit 4cc18156c2

View File

@ -299,6 +299,11 @@ bool SkBitmapProcState::lockBaseBitmap() {
}
}
fScaledBitmap.lockPixels(); // just 'cause the cache made a copy :(
if (!fScaledBitmap.getPixels()) {
// TODO: find out how this can happen, and add a unittest to exercise
// inspired by BUG=chromium:295895
return false;
}
fBitmap = &fScaledBitmap;
return true;
}