#ifndef FEGaussianBlur_h
#define FEGaussianBlur_h
#include "platform/graphics/filters/Filter.h"
#include "platform/graphics/filters/FilterEffect.h"
namespace WebCore {
class PLATFORM_EXPORT FEGaussianBlur : public FilterEffect {
public:
static PassRefPtr<FEGaussianBlur> create(Filter*, float, float);
float stdDeviationX() const;
void setStdDeviationX(float);
float stdDeviationY() const;
void setStdDeviationY(float);
virtual FloatRect mapRect(const FloatRect&, bool forward = true) OVERRIDE FINAL;
virtual FloatRect determineAbsolutePaintRect(const FloatRect& requestedRect) OVERRIDE;
static IntSize calculateKernelSize(Filter*, const FloatPoint& std);
static IntSize calculateUnscaledKernelSize(const FloatPoint& std);
virtual TextStream& externalRepresentation(TextStream&, int indention) const OVERRIDE;
private:
static const int s_minimalRectDimension = 100 * 100;
template<typename Type>
friend class ParallelJobs;
struct PlatformApplyParameters {
FEGaussianBlur* filter;
RefPtr<Uint8ClampedArray> srcPixelArray;
RefPtr<Uint8ClampedArray> dstPixelArray;
int width;
int height;
unsigned kernelSizeX;
unsigned kernelSizeY;
};
FEGaussianBlur(Filter*, float, float);
virtual void applySoftware() OVERRIDE;
virtual PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder*) OVERRIDE;
float m_stdX;
float m_stdY;
};
}
#endif