| Index: Source/core/platform/graphics/skia/NativeImageSkia.cpp
|
| diff --git a/Source/core/platform/graphics/skia/NativeImageSkia.cpp b/Source/core/platform/graphics/skia/NativeImageSkia.cpp
|
| index f43c4833b9eaef96689084b5619bda1d67bd30f7..9f774f1ec916ac34131d01dd9217fcea9c0313e5 100644
|
| --- a/Source/core/platform/graphics/skia/NativeImageSkia.cpp
|
| +++ b/Source/core/platform/graphics/skia/NativeImageSkia.cpp
|
| @@ -45,6 +45,7 @@
|
| #include "third_party/skia/include/core/SkPaint.h"
|
| #include "third_party/skia/include/core/SkScalar.h"
|
| #include "third_party/skia/include/core/SkShader.h"
|
| +#include "third_party/skia/include/effects/SkLumaXfermode.h"
|
|
|
| #include <limits>
|
| #include <math.h>
|
| @@ -324,7 +325,11 @@ void NativeImageSkia::draw(GraphicsContext* context, const SkRect& srcRect, cons
|
| {
|
| TRACE_EVENT0("skia", "NativeImageSkia::draw");
|
| SkPaint paint;
|
| - paint.setXfermode(compOp.get());
|
| + if (context->drawLuminanceMask()) {
|
| + paint.setXfermode(SkLumaMaskXfermode::Create(SkXfermode::kSrcOver_Mode));
|
| + } else {
|
| + paint.setXfermode(compOp.get());
|
| + }
|
| paint.setAlpha(context->getNormalizedAlpha());
|
| paint.setLooper(context->drawLooper());
|
| // only antialias if we're rotated or skewed
|
| @@ -461,7 +466,11 @@ void NativeImageSkia::drawPattern(
|
|
|
| SkPaint paint;
|
| paint.setShader(shader.get());
|
| - paint.setXfermode(WebCoreCompositeToSkiaComposite(compositeOp, blendMode).get());
|
| + if (context->drawLuminanceMask()) {
|
| + paint.setXfermode(SkLumaMaskXfermode::Create(SkXfermode::kSrcOver_Mode));
|
| + } else {
|
| + paint.setXfermode(WebCoreCompositeToSkiaComposite(compositeOp, blendMode).get());
|
| + }
|
|
|
| paint.setFilterBitmap(resampling == LinearResampling);
|
| if (useBicubicFilter)
|
|
|