| Index: src/core/SkPaint.cpp
|
| diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
|
| index 89a8cd0872658b2b5ba03b34c9d2c179f792977e..954680b8dcb8a5eed5fb1eabac8139a8b1b1d6d8 100644
|
| --- a/src/core/SkPaint.cpp
|
| +++ b/src/core/SkPaint.cpp
|
| @@ -1497,10 +1497,12 @@ static SkPaint::Hinting computeHinting(const SkPaint& paint) {
|
| // return true if the paint is just a single color (i.e. not a shader). If its
|
| // a shader, then we can't compute a const luminance for it :(
|
| static bool justAColor(const SkPaint& paint, SkColor* color) {
|
| - if (paint.getShader()) {
|
| + SkColor c = paint.getColor();
|
| +
|
| + SkShader* shader = paint.getShader();
|
| + if (shader && !shader->asLuminanceColor(&c)) {
|
| return false;
|
| }
|
| - SkColor c = paint.getColor();
|
| if (paint.getColorFilter()) {
|
| c = paint.getColorFilter()->filterColor(c);
|
| }
|
|
|