Index: third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp |
index 7e8987bff31f2127e214b4a4c52e805c1ddcc8b4..9f5cda4118057b3d867019237fa97cce101ce7e6 100644 |
--- a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp |
@@ -25,6 +25,9 @@ |
#include "platform/graphics/filters/FilterEffect.h" |
#include "platform/graphics/filters/Filter.h" |
+#include "platform/graphics/filters/SkiaImageFilterBuilder.h" |
+#include "third_party/skia/include/core/SkColorFilter.h" |
+#include "third_party/skia/include/effects/SkColorFilterImageFilter.h" |
#include "third_party/skia/include/effects/SkPictureImageFilter.h" |
namespace blink { |
@@ -190,9 +193,11 @@ PassRefPtr<SkImageFilter> FilterEffect::createImageFilterWithoutValidation(SkiaI |
return createImageFilter(builder); |
} |
-PassRefPtr<SkImageFilter> FilterEffect::createTransparentBlack() const |
+PassRefPtr<SkImageFilter> FilterEffect::createTransparentBlack(SkiaImageFilterBuilder* builder) const |
{ |
- return adoptRef(SkPictureImageFilter::Create(nullptr, filterPrimitiveSubregion())); |
+ SkAutoTUnref<SkColorFilter> filter(SkColorFilter::CreateModeFilter(0, SkXfermode::kClear_Mode)); |
+ SkImageFilter::CropRect rect = getCropRect(builder->cropOffset()); |
+ return adoptRef(SkColorFilterImageFilter::Create(filter, nullptr, &rect)); |
} |
bool FilterEffect::hasConnectedInput() const |