| Index: src/core/SkBitmapProcShader.cpp
|
| diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
|
| index 2e42ef1b9a2e3e76d41ee59982600d92b2ccbdd4..2cfde655b8792791f150a78b210e071524a7f065 100644
|
| --- a/src/core/SkBitmapProcShader.cpp
|
| +++ b/src/core/SkBitmapProcShader.cpp
|
| @@ -84,28 +84,7 @@ bool SkBitmapProcShader::isOpaque() const {
|
| return fRawBitmap.isOpaque();
|
| }
|
|
|
| -static bool valid_for_drawing(const SkBitmap& bm) {
|
| - if (0 == bm.width() || 0 == bm.height()) {
|
| - return false; // nothing to draw
|
| - }
|
| - if (NULL == bm.pixelRef()) {
|
| - return false; // no pixels to read
|
| - }
|
| - if (kIndex_8_SkColorType == bm.colorType()) {
|
| - SkBitmap copy(bm); // Locking and unlocking pixels is not thread safe,
|
| - SkAutoLockPixels alp(copy); // but we need to call it before getColorTable() is safe.
|
| - if (!copy.getColorTable()) {
|
| - return false;
|
| - }
|
| - }
|
| - return true;
|
| -}
|
| -
|
| SkShader::Context* SkBitmapProcShader::onCreateContext(const ContextRec& rec, void* storage) const {
|
| - if (!fRawBitmap.getTexture() && !valid_for_drawing(fRawBitmap)) {
|
| - return NULL;
|
| - }
|
| -
|
| SkMatrix totalInverse;
|
| // Do this first, so we know the matrix can be inverted.
|
| if (!this->computeTotalInverse(rec, &totalInverse)) {
|
|
|