#ifndef SVGFEImage_h
#define SVGFEImage_h
#include "platform/graphics/filters/FilterEffect.h"
#include "core/svg/SVGPreserveAspectRatio.h"
namespace WebCore {
class Document;
class Image;
class RenderObject;
class FEImage FINAL : public FilterEffect {
public:
static PassRefPtr<FEImage> createWithImage(Filter*, PassRefPtr<Image>, PassRefPtr<SVGPreserveAspectRatio>);
static PassRefPtr<FEImage> createWithIRIReference(Filter*, Document&, const String&, PassRefPtr<SVGPreserveAspectRatio>);
virtual FloatRect determineAbsolutePaintRect(const FloatRect& requestedRect) OVERRIDE;
virtual FilterEffectType filterEffectType() const OVERRIDE { return FilterEffectTypeImage; }
virtual TextStream& externalRepresentation(TextStream&, int indention) const OVERRIDE;
virtual PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder*) OVERRIDE;
private:
virtual ~FEImage() { }
FEImage(Filter*, PassRefPtr<Image>, PassRefPtr<SVGPreserveAspectRatio>);
FEImage(Filter*, Document&, const String&, PassRefPtr<SVGPreserveAspectRatio>);
RenderObject* referencedRenderer() const;
virtual void applySoftware() OVERRIDE;
PassRefPtr<SkImageFilter> createImageFilterForRenderer(RenderObject* rendererer, SkiaImageFilterBuilder*);
RefPtr<Image> m_image;
Document* m_document;
String m_href;
PassRefPtr<SVGPreserveAspectRatio> m_preserveAspectRatio;
};
}
#endif