#ifndef FEBlend_h
#define FEBlend_h
#include "platform/graphics/filters/Filter.h"
#include "platform/graphics/filters/FilterEffect.h"
namespace WebCore {
enum BlendModeType {
FEBLEND_MODE_UNKNOWN = 0,
FEBLEND_MODE_NORMAL = 1,
FEBLEND_MODE_MULTIPLY = 2,
FEBLEND_MODE_SCREEN = 3,
FEBLEND_MODE_DARKEN = 4,
FEBLEND_MODE_LIGHTEN = 5
};
class PLATFORM_EXPORT FEBlend : public FilterEffect {
public:
static PassRefPtr<FEBlend> create(Filter*, BlendModeType);
BlendModeType blendMode() const;
bool setBlendMode(BlendModeType);
void platformApplyGeneric(unsigned char* srcPixelArrayA, unsigned char* srcPixelArrayB, unsigned char* dstPixelArray,
unsigned colorArrayLength);
void platformApplyNEON(unsigned char* srcPixelArrayA, unsigned char* srcPixelArrayB, unsigned char* dstPixelArray,
unsigned colorArrayLength);
virtual PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder*) OVERRIDE;
virtual TextStream& externalRepresentation(TextStream&, int indention) const OVERRIDE;
private:
FEBlend(Filter*, BlendModeType);
virtual void applySoftware() OVERRIDE;
BlendModeType m_mode;
};
}
#endif