#include "core/svg/graphics/filters/SVGFilter.h"
#include "core/svg/graphics/filters/SVGFilterBuilder.h"
-namespace WebCore {
+namespace blink {
struct FilterData {
WTF_MAKE_FAST_ALLOCATED;
public:
- enum FilterDataState { PaintingSource, Applying, Built, CycleDetected, MarkedForRemoval };
+ enum FilterDataState { PaintingSource, Applying, Built, CycleDetected };
FilterData()
- : savedContext(0)
- , state(PaintingSource)
+ : state(PaintingSource)
{
}
RefPtr<SVGFilter> filter;
RefPtr<SVGFilterBuilder> builder;
- OwnPtr<ImageBuffer> sourceGraphicBuffer;
- GraphicsContext* savedContext;
- AffineTransform shearFreeAbsoluteTransform;
FloatRect boundaries;
FloatRect drawingRegion;
- FloatSize scale;
FilterDataState state;
};
public:
explicit RenderSVGResourceFilter(SVGFilterElement*);
virtual ~RenderSVGResourceFilter();
+ virtual void destroy() OVERRIDE;
- virtual const char* renderName() const { return "RenderSVGResourceFilter"; }
+ virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE;
+
+ virtual const char* renderName() const OVERRIDE { return "RenderSVGResourceFilter"; }
virtual bool isSVGResourceFilter() const OVERRIDE { return true; }
- virtual void removeAllClientsFromCache(bool markForInvalidation = true);
- virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true);
+ virtual void removeAllClientsFromCache(bool markForInvalidation = true) OVERRIDE;
+ virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true) OVERRIDE;
- virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
- virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short resourceMode, const Path*, const RenderSVGShape*);
+ virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode) OVERRIDE;
+ virtual void postApplyResource(RenderObject*, GraphicsContext*&) OVERRIDE;
- FloatRect resourceBoundingBox(RenderObject*);
+ FloatRect resourceBoundingBox(const RenderObject*);
PassRefPtr<SVGFilterBuilder> buildPrimitives(SVGFilter*);
- SVGUnitTypes::SVGUnitType filterUnits() const { return toSVGFilterElement(element())->filterUnitsCurrentValue(); }
- SVGUnitTypes::SVGUnitType primitiveUnits() const { return toSVGFilterElement(element())->primitiveUnitsCurrentValue(); }
+ SVGUnitTypes::SVGUnitType filterUnits() const { return toSVGFilterElement(element())->filterUnits()->currentValue()->enumValue(); }
+ SVGUnitTypes::SVGUnitType primitiveUnits() const { return toSVGFilterElement(element())->primitiveUnits()->currentValue()->enumValue(); }
void primitiveAttributeChanged(RenderObject*, const QualifiedName&);
- virtual RenderSVGResourceType resourceType() const { return s_resourceType; }
+ virtual RenderSVGResourceType resourceType() const OVERRIDE { return s_resourceType; }
static const RenderSVGResourceType s_resourceType;
FloatRect drawingRegion(RenderObject*) const;
private:
- bool fitsInMaximumImageSize(const FloatSize&, FloatSize&);
-
typedef HashMap<RenderObject*, OwnPtr<FilterData> > FilterMap;
FilterMap m_filter;
};