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

Unified Diff: Source/core/rendering/svg/SVGRenderSupport.cpp

Issue 721073003: Pass PaintBehaviorRenderingClipPathAsMask in PaintInfo (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Constify; Add ASSERT. Created 6 years, 1 month 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/rendering/svg/SVGRenderSupport.h ('k') | Source/core/rendering/svg/SVGRenderingContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGRenderSupport.cpp
diff --git a/Source/core/rendering/svg/SVGRenderSupport.cpp b/Source/core/rendering/svg/SVGRenderSupport.cpp
index 55f55042ff99d18079310602f844b41024978bb7..e9bd6c5d8d6d1a2a1d223494d23d04c746d2e009 100644
--- a/Source/core/rendering/svg/SVGRenderSupport.cpp
+++ b/Source/core/rendering/svg/SVGRenderSupport.cpp
@@ -25,8 +25,6 @@
#include "config.h"
#include "core/rendering/svg/SVGRenderSupport.h"
-#include "core/frame/FrameView.h"
-#include "core/frame/LocalFrame.h"
#include "core/rendering/PaintInfo.h"
#include "core/rendering/RenderGeometryMap.h"
#include "core/rendering/RenderLayer.h"
@@ -275,11 +273,6 @@ bool SVGRenderSupport::isOverflowHidden(const RenderObject* object)
return object->style()->overflowX() == OHIDDEN || object->style()->overflowX() == OSCROLL;
}
-bool SVGRenderSupport::isRenderingClipPathAsMaskImage(const RenderObject& object)
-{
- return object.frame() && object.frame()->view() && object.frame()->view()->paintBehavior() & PaintBehaviorRenderingClipPathAsMask;
-}
-
void SVGRenderSupport::intersectPaintInvalidationRectWithResources(const RenderObject* renderer, FloatRect& paintInvalidationRect)
{
ASSERT(renderer);
@@ -393,12 +386,13 @@ void SVGRenderSupport::applyStrokeStyleToStrokeData(StrokeData* strokeData, cons
strokeData->setLineDash(dashArray, svgStyle.strokeDashOffset()->value(lengthContext));
}
-bool SVGRenderSupport::updateGraphicsContext(GraphicsContextStateSaver& stateSaver, RenderStyle* style, RenderObject& renderer, RenderSVGResourceMode resourceMode, const AffineTransform* additionalPaintServerTransform)
+bool SVGRenderSupport::updateGraphicsContext(const PaintInfo& paintInfo, GraphicsContextStateSaver& stateSaver, RenderStyle* style, RenderObject& renderer, RenderSVGResourceMode resourceMode, const AffineTransform* additionalPaintServerTransform)
{
ASSERT(style);
+ ASSERT(paintInfo.context == stateSaver.context());
- GraphicsContext* context = stateSaver.context();
- if (isRenderingClipPathAsMaskImage(renderer)) {
+ GraphicsContext* context = paintInfo.context;
+ if (paintInfo.isRenderingClipPathAsMaskImage()) {
if (resourceMode == ApplyToStrokeMode)
return false;
context->setAlphaAsFloat(1);
« no previous file with comments | « Source/core/rendering/svg/SVGRenderSupport.h ('k') | Source/core/rendering/svg/SVGRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698