webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
WebCore::FELighting Class Reference

#include <FELighting.h>

Inheritance diagram for WebCore::FELighting:
WebCore::FilterEffect WTF::RefCounted< FilterEffect > WTF::RefCounted< FilterEffect > WTF::RefCountedBase WTF::RefCountedBase WTF::RefCountedBase WTF::RefCountedBase WTF::RefCountedBase WTF::RefCountedBase WebCore::FEDiffuseLighting WebCore::FESpecularLighting

Classes

struct  LightingData
 
struct  PlatformApplyGenericParameters
 

Public Member Functions

void platformApplySoftware () override
 
void determineAbsolutePaintRect () override
 
- Public Member Functions inherited from WebCore::FilterEffect
virtual ~FilterEffect ()
 
void clearResult ()
 
void clearResultsRecursive ()
 
ImageBufferasImageBuffer ()
 
PassRefPtr< Uint8ClampedArrayasUnmultipliedImage (const IntRect &)
 
PassRefPtr< Uint8ClampedArrayasPremultipliedImage (const IntRect &)
 
void copyUnmultipliedImage (Uint8ClampedArray *destination, const IntRect &)
 
void copyPremultipliedImage (Uint8ClampedArray *destination, const IntRect &)
 
FilterEffectVectorinputEffects ()
 
FilterEffectinputEffect (unsigned) const
 
unsigned numberOfEffectInputs () const
 
unsigned totalNumberOfEffectInputs () const
 
bool hasResult () const
 
FloatRect drawingRegionOfInputImage (const IntRect &) const
 
IntRect requestedRegionOfInputImageData (const IntRect &) const
 
bool isAlphaImage () const
 
void setIsAlphaImage (bool alphaImage)
 
IntRect absolutePaintRect () const
 
void setAbsolutePaintRect (const IntRect &absolutePaintRect)
 
FloatRect maxEffectRect () const
 
void setMaxEffectRect (const FloatRect &maxEffectRect)
 
void apply ()
 
void applyAll ()
 
virtual void correctFilterResultIfNeeded ()
 
virtual void dump ()=0
 
virtual FilterEffectType filterEffectType () const
 
virtual TextStreamexternalRepresentation (TextStream &, int indention=0) const
 
bool hasX () const
 
void setHasX (bool value)
 
bool hasY () const
 
void setHasY (bool value)
 
bool hasWidth () const
 
void setHasWidth (bool value)
 
bool hasHeight () const
 
void setHasHeight (bool value)
 
FloatRect filterPrimitiveSubregion () const
 
void setFilterPrimitiveSubregion (const FloatRect &filterPrimitiveSubregion)
 
FloatRect effectBoundaries () const
 
void setEffectBoundaries (const FloatRect &effectBoundaries)
 
Filterfilter ()
 
bool clipsToBounds () const
 
void setClipsToBounds (bool value)
 
ColorSpace operatingColorSpace () const
 
virtual void setOperatingColorSpace (ColorSpace colorSpace)
 
ColorSpace resultColorSpace () const
 
virtual void setResultColorSpace (ColorSpace colorSpace)
 
virtual void transformResultColorSpace (FilterEffect *in, const int)
 
void transformResultColorSpace (ColorSpace)
 
virtual ~FilterEffect ()
 
void clearResult ()
 
void clearResultsRecursive ()
 
ImageBufferasImageBuffer ()
 
PassRefPtr< Uint8ClampedArrayasUnmultipliedImage (const IntRect &)
 
PassRefPtr< Uint8ClampedArrayasPremultipliedImage (const IntRect &)
 
void copyUnmultipliedImage (Uint8ClampedArray *destination, const IntRect &)
 
void copyPremultipliedImage (Uint8ClampedArray *destination, const IntRect &)
 
FilterEffectVectorinputEffects ()
 
FilterEffectinputEffect (unsigned) const
 
unsigned numberOfEffectInputs () const
 
unsigned totalNumberOfEffectInputs () const
 
bool hasResult () const
 
FloatRect drawingRegionOfInputImage (const IntRect &) const
 
IntRect requestedRegionOfInputImageData (const IntRect &) const
 
bool isAlphaImage () const
 
void setIsAlphaImage (bool alphaImage)
 
IntRect absolutePaintRect () const
 
void setAbsolutePaintRect (const IntRect &absolutePaintRect)
 
FloatRect maxEffectRect () const
 
void setMaxEffectRect (const FloatRect &maxEffectRect)
 
void apply ()
 
void applyAll ()
 
virtual void correctFilterResultIfNeeded ()
 
virtual void dump ()=0
 
virtual FilterEffectType filterEffectType () const
 
virtual TextStreamexternalRepresentation (TextStream &, int indention=0) const
 
bool hasX () const
 
void setHasX (bool value)
 
bool hasY () const
 
void setHasY (bool value)
 
bool hasWidth () const
 
void setHasWidth (bool value)
 
bool hasHeight () const
 
void setHasHeight (bool value)
 
FloatRect filterPrimitiveSubregion () const
 
void setFilterPrimitiveSubregion (const FloatRect &filterPrimitiveSubregion)
 
FloatRect effectBoundaries () const
 
void setEffectBoundaries (const FloatRect &effectBoundaries)
 
Filterfilter ()
 
bool clipsToBounds () const
 
void setClipsToBounds (bool value)
 
ColorSpace operatingColorSpace () const
 
virtual void setOperatingColorSpace (ColorSpace colorSpace)
 
ColorSpace resultColorSpace () const
 
virtual void setResultColorSpace (ColorSpace colorSpace)
 
virtual void transformResultColorSpace (FilterEffect *in, const int)
 
void transformResultColorSpace (ColorSpace)
 
- Public Member Functions inherited from WTF::RefCounted< FilterEffect >
void deref () const
 
void deref () const
 
void deref () const
 
- Public Member Functions inherited from WTF::RefCountedBase
void ref () const
 
bool hasOneRef () const
 
unsigned refCount () const
 
void relaxAdoptionRequirement ()
 
void ref () const
 
bool hasOneRef () const
 
unsigned refCount () const
 
void relaxAdoptionRequirement ()
 
void ref () const
 
bool hasOneRef () const
 
unsigned refCount () const
 
void relaxAdoptionRequirement ()
 

Protected Types

enum  LightingType { DiffuseLighting, SpecularLighting }
 

Protected Member Functions

 FELighting (Filter &, LightingType, const Color &, float, float, float, float, float, float, PassRefPtr< LightSource >)
 
bool drawLighting (Uint8ClampedArray *, int, int)
 
void inlineSetPixel (int offset, LightingData &, LightSource::PaintingData &, int lightX, int lightY, float factorX, float factorY, IntPoint &normalVector)
 
void setPixel (int offset, LightingData &, LightSource::PaintingData &, int lightX, int lightY, float factorX, float factorY, IntPoint &normalVector)
 
void platformApply (LightingData &, LightSource::PaintingData &)
 
void platformApplyGenericPaint (LightingData &, LightSource::PaintingData &, int startX, int startY)
 
void platformApplyGeneric (LightingData &, LightSource::PaintingData &)
 
void platformApplyNeon (LightingData &, LightSource::PaintingData &)
 
- Protected Member Functions inherited from WebCore::FilterEffect
 FilterEffect (Filter &)
 
ImageBuffercreateImageBufferResult ()
 
Uint8ClampedArraycreateUnmultipliedImageResult ()
 
Uint8ClampedArraycreatePremultipliedImageResult ()
 
virtual bool requiresValidPreMultipliedPixels ()
 
void forceValidPreMultipliedPixels ()
 
void clipAbsolutePaintRect ()
 
 FilterEffect (Filter &)
 
ImageBuffercreateImageBufferResult ()
 
Uint8ClampedArraycreateUnmultipliedImageResult ()
 
Uint8ClampedArraycreatePremultipliedImageResult ()
 
virtual bool requiresValidPreMultipliedPixels ()
 
void forceValidPreMultipliedPixels ()
 
void clipAbsolutePaintRect ()
 
- Protected Member Functions inherited from WTF::RefCounted< FilterEffect >
 RefCounted ()
 
 RefCounted ()
 
 RefCounted ()
 
 ~RefCounted ()
 
 ~RefCounted ()
 
 ~RefCounted ()
 
- Protected Member Functions inherited from WTF::RefCountedBase
 RefCountedBase ()
 
 ~RefCountedBase ()
 
bool derefBase () const
 
bool deletionHasBegun () const
 
 RefCountedBase ()
 
 ~RefCountedBase ()
 
bool derefBase () const
 
bool deletionHasBegun () const
 
 RefCountedBase ()
 
 ~RefCountedBase ()
 
bool derefBase () const
 
bool deletionHasBegun () const
 

Static Protected Member Functions

static void platformApplyGenericWorker (PlatformApplyGenericParameters *)
 
static void platformApplyNeonWorker (FELightingPaintingDataForNeon *)
 
static int getPowerCoefficients (float exponent)
 

Protected Attributes

LightingType m_lightingType
 
RefPtr< LightSourcem_lightSource
 
Color m_lightingColor
 
float m_surfaceScale
 
float m_diffuseConstant
 
float m_specularConstant
 
float m_specularExponent
 
float m_kernelUnitLengthX
 
float m_kernelUnitLengthY
 

Static Protected Attributes

static const int s_minimalRectDimension = 100 * 100
 

Friends

template<typename Type >
class ParallelJobs
 

Member Enumeration Documentation

◆ LightingType

Enumerator
DiffuseLighting 
SpecularLighting 

Constructor & Destructor Documentation

◆ FELighting()

WebCore::FELighting::FELighting ( Filter filter,
LightingType  lightingType,
const Color lightingColor,
float  surfaceScale,
float  diffuseConstant,
float  specularConstant,
float  specularExponent,
float  kernelUnitLengthX,
float  kernelUnitLengthY,
PassRefPtr< LightSource lightSource 
)
protected

Member Function Documentation

◆ determineAbsolutePaintRect()

void WebCore::FELighting::determineAbsolutePaintRect ( )
inlineoverridevirtual

Reimplemented from WebCore::FilterEffect.

◆ drawLighting()

bool WebCore::FELighting::drawLighting ( Uint8ClampedArray pixels,
int  width,
int  height 
)
protected

◆ getPowerCoefficients()

static int WebCore::FELighting::getPowerCoefficients ( float  exponent)
staticprotected

◆ inlineSetPixel()

void WebCore::FELighting::inlineSetPixel ( int  offset,
LightingData data,
LightSource::PaintingData paintingData,
int  lightX,
int  lightY,
float  factorX,
float  factorY,
IntPoint normalVector 
)
inlineprotected

◆ platformApply()

void WebCore::FELighting::platformApply ( LightingData data,
LightSource::PaintingData paintingData 
)
inlineprotected

◆ platformApplyGeneric()

void WebCore::FELighting::platformApplyGeneric ( LightingData data,
LightSource::PaintingData paintingData 
)
inlineprotected

◆ platformApplyGenericPaint()

void WebCore::FELighting::platformApplyGenericPaint ( LightingData data,
LightSource::PaintingData paintingData,
int  startX,
int  startY 
)
inlineprotected

◆ platformApplyGenericWorker()

void WebCore::FELighting::platformApplyGenericWorker ( PlatformApplyGenericParameters parameters)
staticprotected

◆ platformApplyNeon()

void WebCore::FELighting::platformApplyNeon ( LightingData ,
LightSource::PaintingData  
)
inlineprotected

◆ platformApplyNeonWorker()

static void WebCore::FELighting::platformApplyNeonWorker ( FELightingPaintingDataForNeon *  )
staticprotected

◆ platformApplySoftware()

void WebCore::FELighting::platformApplySoftware ( )
overridevirtual

Implements WebCore::FilterEffect.

◆ setPixel()

void WebCore::FELighting::setPixel ( int  offset,
LightingData data,
LightSource::PaintingData paintingData,
int  lightX,
int  lightY,
float  factorX,
float  factorY,
IntPoint normalVector 
)
protected

Friends And Related Function Documentation

◆ ParallelJobs

template<typename Type >
friend class ParallelJobs
friend

Member Data Documentation

◆ m_diffuseConstant

float WebCore::FELighting::m_diffuseConstant
protected

◆ m_kernelUnitLengthX

float WebCore::FELighting::m_kernelUnitLengthX
protected

◆ m_kernelUnitLengthY

float WebCore::FELighting::m_kernelUnitLengthY
protected

◆ m_lightingColor

Color WebCore::FELighting::m_lightingColor
protected

◆ m_lightingType

LightingType WebCore::FELighting::m_lightingType
protected

◆ m_lightSource

RefPtr<LightSource> WebCore::FELighting::m_lightSource
protected

◆ m_specularConstant

float WebCore::FELighting::m_specularConstant
protected

◆ m_specularExponent

float WebCore::FELighting::m_specularExponent
protected

◆ m_surfaceScale

float WebCore::FELighting::m_surfaceScale
protected

◆ s_minimalRectDimension

const int WebCore::FELighting::s_minimalRectDimension = 100 * 100
staticprotected

The documentation for this class was generated from the following files: