call readyToDraw() instead of just checking for null pixels, since we could

have a bitmap with pixels, but no (required) colortable. readyToDraw() knows
to check for this.



git-svn-id: http://skia.googlecode.com/svn/trunk@599 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@android.com 2010-09-10 17:26:24 +00:00
parent 8b17ac3a43
commit 3ce77e4d13

View File

@ -82,7 +82,7 @@ bool SkBitmapProcShader::setContext(const SkBitmap& device,
fState.fOrigBitmap = fRawBitmap;
fState.fOrigBitmap.lockPixels();
if (fState.fOrigBitmap.getPixels() == NULL) {
if (!fState.fOrigBitmap.readyToDraw()) {
fState.fOrigBitmap.unlockPixels();
return false;
}