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

Unified Diff: Source/core/paint/SVGFilterPainter.h

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/layout/svg/SVGLayoutSupport.cpp ('k') | Source/core/paint/SVGFilterPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGFilterPainter.h
diff --git a/Source/core/paint/SVGFilterPainter.h b/Source/core/paint/SVGFilterPainter.h
index 1d6768d714da552014f4c87b286507cf456b9299..94a968e5975f74410b6fa9fd414e5a3dbc0a1bbc 100644
--- a/Source/core/paint/SVGFilterPainter.h
+++ b/Source/core/paint/SVGFilterPainter.h
@@ -5,20 +5,39 @@
#ifndef SVGFilterPainter_h
#define SVGFilterPainter_h
+#include "platform/graphics/GraphicsContext.h"
+#include "platform/graphics/paint/DisplayItemList.h"
+#include "wtf/OwnPtr.h"
+
namespace blink {
-class GraphicsContext;
+class FilterData;
class LayoutObject;
class LayoutSVGResourceFilter;
+class SVGFilterRecordingContext {
+public:
+ explicit SVGFilterRecordingContext(GraphicsContext* initialContext) : m_initialContext(initialContext) { }
+
+ GraphicsContext* beginContent(FilterData*);
+ void endContent(FilterData*);
+
+ GraphicsContext* paintingContext() const { return m_initialContext; }
+
+private:
+ OwnPtr<DisplayItemList> m_displayItemList;
+ OwnPtr<GraphicsContext> m_context;
+ GraphicsContext* m_initialContext;
+};
+
class SVGFilterPainter {
public:
SVGFilterPainter(LayoutSVGResourceFilter& filter) : m_filter(filter) { }
// Returns the context that should be used to paint the filter contents, or
// null if the content should not be recorded.
- GraphicsContext* prepareEffect(LayoutObject&, GraphicsContext*);
- void finishEffect(LayoutObject&, GraphicsContext*);
+ GraphicsContext* prepareEffect(LayoutObject&, SVGFilterRecordingContext&);
+ void finishEffect(LayoutObject&, SVGFilterRecordingContext&);
private:
LayoutSVGResourceFilter& m_filter;
« no previous file with comments | « Source/core/layout/svg/SVGLayoutSupport.cpp ('k') | Source/core/paint/SVGFilterPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698