| Index: skia/ext/pixel_ref_utils.cc
|
| diff --git a/skia/ext/pixel_ref_utils.cc b/skia/ext/pixel_ref_utils.cc
|
| index d7e2f7e62efa7f9cdc448a5d58a8b5b2c55a941a..cbd2ff26599eaa5eda8df9ab5f4bb1ed18984053 100644
|
| --- a/skia/ext/pixel_ref_utils.cc
|
| +++ b/skia/ext/pixel_ref_utils.cc
|
| @@ -362,13 +362,7 @@ class GatherPixelRefDevice : public SkBitmapDevice {
|
|
|
| bool GetBitmapFromPaint(const SkPaint& paint, SkBitmap* bm) {
|
| SkShader* shader = paint.getShader();
|
| - if (shader) {
|
| - // Check whether the shader is a gradient in order to prevent generation
|
| - // of bitmaps from gradient shaders, which implement asABitmap.
|
| - if (SkShader::kNone_GradientType == shader->asAGradient(NULL))
|
| - return shader->asABitmap(bm, NULL, NULL);
|
| - }
|
| - return false;
|
| + return shader && shader->isABitmap(bm, NULL, NULL);
|
| }
|
| };
|
|
|
|
|