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

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

Issue 908243002: Move rendering/svg/RenderSVGResource* to layout/svg. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/svg/RenderSVGPath.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
deleted file mode 100644
index 911ab35283f30cbb0d0acd3129e841344d7b22a2..0000000000000000000000000000000000000000
--- a/Source/core/rendering/svg/RenderSVGResourceClipper.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef RenderSVGResourceClipper_h
-#define RenderSVGResourceClipper_h
-
-#include "core/rendering/svg/RenderSVGResourceContainer.h"
-#include "core/svg/SVGClipPathElement.h"
-
-class SkPicture;
-
-namespace blink {
-
-class RenderSVGResourceClipper final : public RenderSVGResourceContainer {
-public:
- enum ClipperState {
- ClipperNotApplied,
- ClipperAppliedPath,
- ClipperAppliedMask
- };
-
- explicit RenderSVGResourceClipper(SVGClipPathElement*);
- virtual ~RenderSVGResourceClipper();
-
- virtual const char* renderName() const override { return "RenderSVGResourceClipper"; }
-
- virtual void removeAllClientsFromCache(bool markForInvalidation = true) override;
- virtual void removeClientFromCache(LayoutObject*, bool markForInvalidation = true) override;
-
- // 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(LayoutObject*, GraphicsContext*&, ClipperState&);
- void postApplyStatefulResource(LayoutObject*, 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 LayoutObject::objectBoundingBox)
- bool applyClippingToContext(LayoutObject*, const FloatRect&, const FloatRect&, GraphicsContext*, ClipperState&);
-
- FloatRect resourceBoundingBox(const LayoutObject*);
-
- static const RenderSVGResourceType s_resourceType = ClipperResourceType;
- virtual RenderSVGResourceType resourceType() const override { return s_resourceType; }
-
- bool hitTestClipContent(const FloatRect&, const FloatPoint&);
-
- SVGUnitTypes::SVGUnitType clipPathUnits() const { return toSVGClipPathElement(element())->clipPathUnits()->currentValue()->enumValue(); }
-
-private:
- bool tryPathOnlyClipping(DisplayItemClient, GraphicsContext*, const AffineTransform&, const FloatRect&);
- void drawClipMaskContent(GraphicsContext*, const FloatRect& targetBoundingBox);
- void createPicture(GraphicsContext*);
- void calculateClipContentPaintInvalidationRect();
-
- RefPtr<const SkPicture> m_clipContentPicture;
- FloatRect m_clipBoundaries;
-
- // Reference cycle detection.
- bool m_inClipExpansion;
-};
-
-DEFINE_RENDER_SVG_RESOURCE_TYPE_CASTS(RenderSVGResourceClipper, ClipperResourceType);
-
-}
-
-#endif
« no previous file with comments | « Source/core/rendering/svg/RenderSVGPath.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698