diff options
Diffstat (limited to 'src/core/SkBitmapProcShader.cpp')
-rw-r--r-- | src/core/SkBitmapProcShader.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp index c3fd7d0..1eaa46d 100644 --- a/src/core/SkBitmapProcShader.cpp +++ b/src/core/SkBitmapProcShader.cpp @@ -44,8 +44,10 @@ void SkBitmapProcShader::endSession() { this->INHERITED::endSession(); } -bool SkBitmapProcShader::asABitmap(SkBitmap* texture, SkMatrix* texM, - TileMode xy[]) { +SkShader::BitmapType SkBitmapProcShader::asABitmap(SkBitmap* texture, + SkMatrix* texM, + TileMode xy[], + SkScalar* twoPointRadialParams) { if (texture) { *texture = fRawBitmap; } @@ -56,7 +58,7 @@ bool SkBitmapProcShader::asABitmap(SkBitmap* texture, SkMatrix* texM, xy[0] = (TileMode)fState.fTileModeX; xy[1] = (TileMode)fState.fTileModeY; } - return true; + return kDefault_BitmapType; } void SkBitmapProcShader::flatten(SkFlattenableWriteBuffer& buffer) { @@ -82,7 +84,7 @@ bool SkBitmapProcShader::setContext(const SkBitmap& device, fState.fOrigBitmap = fRawBitmap; fState.fOrigBitmap.lockPixels(); - if (fState.fOrigBitmap.getPixels() == NULL) { + if (!fState.fOrigBitmap.getTexture() && !fState.fOrigBitmap.readyToDraw()) { fState.fOrigBitmap.unlockPixels(); return false; } |