Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1412)

Unified Diff: third_party/WebKit/Source/platform/graphics/filters/FilterEffect.cpp

Issue 2846593008: Proactively dispose image filters for SVG filter chains (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/filters/FilterEffect.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698