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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp

Issue 1382163003: Split SVGFilterbuilder into "builder" and "node map" parts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: No SVGFilterBuilder::m_filter; Reverse order of args to addPrimitive. Created 5 years, 2 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
Index: third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp b/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
index 87c93ac48dd594150746a88520377a84dd817d9c..033d2c5292040e9c2dab4c96ef379cea1d174522 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
@@ -63,8 +63,10 @@
#include "core/svg/SVGRadialGradientElement.h"
#include "core/svg/SVGRectElement.h"
#include "core/svg/SVGStopElement.h"
+#include "core/svg/graphics/filters/SVGFilterBuilder.h"
#include "platform/graphics/DashArray.h"
#include "platform/graphics/GraphicsTypes.h"
+#include "platform/graphics/filters/SourceGraphic.h"
#include <math.h>
#include <memory>
@@ -511,10 +513,10 @@ void writeSVGResourceContainer(TextStream& ts, const LayoutObject& object, int i
// Creating a placeholder filter which is passed to the builder.
FloatRect dummyRect;
RefPtrWillBeRawPtr<Filter> dummyFilter = Filter::create(dummyRect, dummyRect, 1, Filter::BoundingBox);
- if (RefPtrWillBeRawPtr<SVGFilterBuilder> builder = filter->buildPrimitives(dummyFilter.get())) {
- if (FilterEffect* lastEffect = builder->lastEffect())
- lastEffect->externalRepresentation(ts, indent + 1);
- }
+ SVGFilterBuilder builder(dummyFilter->sourceGraphic());
+ builder.buildGraph(dummyFilter.get(), toSVGFilterElement(*filter->element()), dummyRect);
+ if (FilterEffect* lastEffect = builder.lastEffect())
+ lastEffect->externalRepresentation(ts, indent + 1);
} else if (resource->resourceType() == ClipperResourceType) {
writeNameValuePair(ts, "clipPathUnits", toLayoutSVGResourceClipper(resource)->clipPathUnits());
ts << "\n";

Powered by Google App Engine
This is Rietveld 408576698