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 36ef9c7b47b5830f33bdc605082515b065687a0c..8dcb7eef2fd38c19a9fa6b358316c81898a56072 100644 |
--- a/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp |
@@ -88,11 +88,19 @@ FilterEffect* FilterEffect::InputEffect(unsigned number) const { |
return input_effects_.at(number).Get(); |
} |
-void FilterEffect::ClearResult() { |
+void FilterEffect::DisposeImageFilters() { |
for (int i = 0; i < 4; i++) |
image_filters_[i] = nullptr; |
} |
+void FilterEffect::DisposeImageFiltersRecursive() { |
+ if (!HasImageFilter()) |
+ return; |
+ DisposeImageFilters(); |
+ for (auto& effect : input_effects_) |
+ effect->DisposeImageFiltersRecursive(); |
+} |
+ |
Color FilterEffect::AdaptColorToOperatingColorSpace(const Color& device_color) { |
// |deviceColor| is assumed to be DeviceRGB. |
return ColorSpaceUtilities::ConvertColor(device_color, OperatingColorSpace()); |