Index: Source/core/paint/LayerPainter.cpp |
diff --git a/Source/core/paint/LayerPainter.cpp b/Source/core/paint/LayerPainter.cpp |
index 1ca2e32ed7f073085436266a76309bb76974c354..db8f36832f689e4ad64d16192361933d3b6981b0 100644 |
--- a/Source/core/paint/LayerPainter.cpp |
+++ b/Source/core/paint/LayerPainter.cpp |
@@ -7,6 +7,7 @@ |
#include "core/frame/Settings.h" |
#include "core/page/Page.h" |
+#include "core/paint/FilterPainter.h" |
#include "core/rendering/ClipPathOperation.h" |
#include "core/rendering/FilterEffectRenderer.h" |
#include "core/rendering/PaintInfo.h" |
@@ -276,6 +277,7 @@ void LayerPainter::paintLayerContents(GraphicsContext* context, const LayerPaint |
{ // Begin block for the lifetime of any filter clip. |
OwnPtr<ClipRecorder> clipRecorder; |
+ FilterPainter filterPainter(m_renderLayer); |
if (haveFilterEffect) { |
ASSERT(m_renderLayer.filterInfo()); |
@@ -301,7 +303,7 @@ void LayerPainter::paintLayerContents(GraphicsContext* context, const LayerPaint |
// Subsequent code should not clip to the dirty rect, since we've already |
// done it above, and doing it later will defeat the outsets. |
localPaintingInfo.clipToDirtyRect = false; |
- haveFilterEffect = m_renderLayer.filterRenderer()->beginFilterEffect(context, rootRelativeBounds); |
+ haveFilterEffect = filterPainter.beginFilterEffect(context, rootRelativeBounds); |
if (!haveFilterEffect) { |
// If the the filter failed to start, undo the clip immediately |
clipRecorder.clear(); |
@@ -347,7 +349,7 @@ void LayerPainter::paintLayerContents(GraphicsContext* context, const LayerPaint |
if (haveFilterEffect) { |
// Apply the correct clipping (ie. overflow: hidden). |
// FIXME: It is incorrect to just clip to the damageRect here once multiple fragments are involved. |
- m_renderLayer.filterRenderer()->endFilterEffect(context); |
+ filterPainter.endFilterEffect(context); |
mstensho (USE GERRIT)
2014/11/11 08:15:29
Can't you just have ~FilterPainter() do this job,
|
} |
} // Filter clip block |