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

Unified Diff: Source/core/rendering/svg/RenderSVGResourceClipper.h

Issue 547723003: Change RenderSVGResourceClipper's ClipperContext class into an enum (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Variables have to be initialized?!? Created 6 years, 3 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/rendering/RenderLayer.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceClipper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/RenderSVGResourceClipper.h
diff --git a/Source/core/rendering/svg/RenderSVGResourceClipper.h b/Source/core/rendering/svg/RenderSVGResourceClipper.h
index ac4723f5863db1b409b906e7a3c5ad47ba72f53e..08cadf82c7aec2c7eabdcabde2ea221d2d61a4f6 100644
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.h
+++ b/Source/core/rendering/svg/RenderSVGResourceClipper.h
@@ -27,21 +27,14 @@ namespace blink {
class DisplayList;
-struct ClipperContext {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- enum ClipperState { NotAppliedState, AppliedPathState, AppliedMaskState };
-
- ClipperContext()
- : state(NotAppliedState)
- {
- }
-
- ClipperState state;
-};
-
class RenderSVGResourceClipper FINAL : public RenderSVGResourceContainer {
public:
+ enum ClipperState {
+ ClipperNotApplied,
+ ClipperAppliedPath,
+ ClipperAppliedMask
+ };
+
explicit RenderSVGResourceClipper(SVGClipPathElement*);
virtual ~RenderSVGResourceClipper();
@@ -56,13 +49,13 @@ public:
// FIXME: Filters are also stateful resources that could benefit from having their state managed
// on the caller stack instead of the current hashmap. We should look at refactoring these
// into a general interface that can be shared.
- bool applyStatefulResource(RenderObject*, GraphicsContext*&, ClipperContext&);
- void postApplyStatefulResource(RenderObject*, GraphicsContext*&, ClipperContext&);
+ bool applyStatefulResource(RenderObject*, GraphicsContext*&, ClipperState&);
+ void postApplyStatefulResource(RenderObject*, GraphicsContext*&, ClipperState&);
// clipPath can be clipped too, but don't have a boundingBox or paintInvalidationRect. So we can't call
// applyResource directly and use the rects from the object, since they are empty for RenderSVGResources
// FIXME: We made applyClippingToContext public because we cannot call applyResource on HTML elements (it asserts on RenderObject::objectBoundingBox)
- bool applyClippingToContext(RenderObject*, const FloatRect&, const FloatRect&, GraphicsContext*, ClipperContext&);
+ bool applyClippingToContext(RenderObject*, const FloatRect&, const FloatRect&, GraphicsContext*, ClipperState&);
FloatRect resourceBoundingBox(const RenderObject*);
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698