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

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

Issue 979883002: [S.P.] Move clip painting to SVGClipPainter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: codereview fixes Created 5 years, 9 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/LayoutSVGResourceClipper.cpp ('k') | Source/core/paint/SVGClipPainter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/LayerPainter.cpp
diff --git a/Source/core/paint/LayerPainter.cpp b/Source/core/paint/LayerPainter.cpp
index 80da3d5d156e35e0624b561eb964185d527b3640..f64312c535f6b2f44716dddb0ba07766e6aad0fe 100644
--- a/Source/core/paint/LayerPainter.cpp
+++ b/Source/core/paint/LayerPainter.cpp
@@ -17,6 +17,7 @@
#include "core/paint/CompositingRecorder.h"
#include "core/paint/FilterPainter.h"
#include "core/paint/LayerClipRecorder.h"
+#include "core/paint/SVGClipPainter.h"
#include "core/paint/ScopeRecorder.h"
#include "core/paint/ScrollableAreaPainter.h"
#include "core/paint/Transform3DRecorder.h"
@@ -116,7 +117,7 @@ public:
if (!renderLayer.renderer()->hasClipPath() || (renderLayer.needsCompositedScrolling() && !(paintFlags & PaintLayerPaintingChildClippingMaskPhase)))
return;
- m_clipperState = LayoutSVGResourceClipper::ClipperNotApplied;
+ m_clipperState = SVGClipPainter::ClipperNotApplied;
ASSERT(style.clipPath());
if (style.clipPath()->type() == ClipPathOperation::SHAPE) {
@@ -141,7 +142,7 @@ public:
}
m_resourceClipper = toLayoutSVGResourceClipper(toLayoutSVGResourceContainer(element->renderer()));
- if (!m_resourceClipper->applyClippingToContext(renderLayer.renderer(), rootRelativeBounds,
+ if (!SVGClipPainter(*m_resourceClipper).applyClippingToContext(renderLayer.renderer(), rootRelativeBounds,
paintingInfo.paintDirtyRect, context, m_clipperState)) {
// No need to post-apply the clipper if this failed.
m_resourceClipper = 0;
@@ -153,12 +154,12 @@ public:
~ClipPathHelper()
{
if (m_resourceClipper)
- m_resourceClipper->postApplyStatefulResource(m_renderLayer.renderer(), m_context, m_clipperState);
+ SVGClipPainter(*m_resourceClipper).postApplyStatefulResource(m_renderLayer.renderer(), m_context, m_clipperState);
}
private:
LayoutSVGResourceClipper* m_resourceClipper;
OwnPtr<ClipPathRecorder> m_clipPathRecorder;
- LayoutSVGResourceClipper::ClipperState m_clipperState;
+ SVGClipPainter::ClipperState m_clipperState;
const Layer& m_renderLayer;
GraphicsContext* m_context;
};
« no previous file with comments | « Source/core/layout/svg/LayoutSVGResourceClipper.cpp ('k') | Source/core/paint/SVGClipPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698