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

Unified Diff: Source/core/paint/SVGPaintContext.cpp

Issue 1220053003: Disentangle filter content recording state from FilterData (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added test. Created 5 years, 6 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 | « Source/core/paint/SVGPaintContext.h ('k') | Source/core/svg/SVGImageElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGPaintContext.cpp
diff --git a/Source/core/paint/SVGPaintContext.cpp b/Source/core/paint/SVGPaintContext.cpp
index d24da49e632b673ac2e57b87902c8dc55b01a2d5..b3f1ccab7e8bf27d8e01831b5e6b68abf81b6bd4 100644
--- a/Source/core/paint/SVGPaintContext.cpp
+++ b/Source/core/paint/SVGPaintContext.cpp
@@ -31,7 +31,6 @@
#include "core/layout/svg/SVGLayoutSupport.h"
#include "core/layout/svg/SVGResources.h"
#include "core/layout/svg/SVGResourcesCache.h"
-#include "core/paint/SVGFilterPainter.h"
#include "core/paint/SVGMaskPainter.h"
#include "platform/FloatConversion.h"
@@ -42,7 +41,8 @@ SVGPaintContext::~SVGPaintContext()
if (m_filter) {
ASSERT(SVGResourcesCache::cachedResourcesForLayoutObject(m_object));
ASSERT(SVGResourcesCache::cachedResourcesForLayoutObject(m_object)->filter() == m_filter);
- SVGFilterPainter(*m_filter).finishEffect(*m_object, m_originalPaintInfo->context);
+ ASSERT(m_filterRecordingContext);
+ SVGFilterPainter(*m_filter).finishEffect(*m_object, *m_filterRecordingContext);
// Reset the paint info after the filter effect has been completed.
// This isn't strictly required (e.g., m_paintInfo.rect is not used
@@ -154,8 +154,9 @@ bool SVGPaintContext::applyFilterIfNecessary(SVGResources* resources)
if (m_object->style()->svgStyle().hasFilter())
return false;
} else if (LayoutSVGResourceFilter* filter = resources->filter()) {
+ m_filterRecordingContext = adoptPtr(new SVGFilterRecordingContext(m_paintInfo.context));
m_filter = filter;
- GraphicsContext* filterContext = SVGFilterPainter(*filter).prepareEffect(*m_object, m_paintInfo.context);
+ GraphicsContext* filterContext = SVGFilterPainter(*filter).prepareEffect(*m_object, *m_filterRecordingContext);
if (!filterContext)
return false;
« no previous file with comments | « Source/core/paint/SVGPaintContext.h ('k') | Source/core/svg/SVGImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698