Changeset 34992 in webkit
- Timestamp:
- Jul 3, 2008 6:10:08 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r34989 r34992 1 2008-07-03 Alex Mathews <possessedpenguinbob@gmail.com> 2 3 Reviewed by Oliver Hunt. 4 5 Bug 19835: WebKit needs cross-platform filter system 6 <https://bugs.webkit.org/show_bug.cgi?id=19835> 7 8 More class refactoring in preparation for cross-platform filter 9 implementation. 10 11 * WebCore.xcodeproj/project.pbxproj: 12 * svg/FilterEffect.h: 13 * svg/SVGComponentTransferFunctionElement.cpp: 14 (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement): 15 (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute): 16 (WebCore::SVGComponentTransferFunctionElement::transferFunction): 17 * svg/SVGComponentTransferFunctionElement.h: 18 * svg/SVGFEColorMatrixElement.cpp: 19 (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement): 20 (WebCore::SVGFEColorMatrixElement::parseMappedAttribute): 21 (WebCore::SVGFEColorMatrixElement::filterEffect): 22 (WebCore::SVGFEColorMatrixElement::build): 23 * svg/SVGFEColorMatrixElement.h: 24 * svg/SVGFEComponentTransferElement.cpp: 25 (WebCore::SVGFEComponentTransferElement::filterEffect): 26 (WebCore::SVGFEComponentTransferElement::build): 27 * svg/SVGFEComponentTransferElement.h: 28 * svg/SVGFECompositeElement.cpp: 29 (WebCore::SVGFECompositeElement::SVGFECompositeElement): 30 (WebCore::SVGFECompositeElement::parseMappedAttribute): 31 (WebCore::SVGFECompositeElement::filterEffect): 32 (WebCore::SVGFECompositeElement::build): 33 * svg/SVGFECompositeElement.h: 34 * svg/graphics/filters/SVGFEBlend.cpp: 35 * svg/graphics/filters/SVGFEBlend.h: 36 * svg/graphics/filters/SVGFEColorMatrix.cpp: 37 (WebCore::FEColorMatrix::FEColorMatrix): 38 (WebCore::FEColorMatrix::create): 39 (WebCore::FEColorMatrix::type): 40 (WebCore::FEColorMatrix::setType): 41 (WebCore::FEColorMatrix::values): 42 (WebCore::FEColorMatrix::setValues): 43 (WebCore::FEColorMatrix::apply): 44 (WebCore::FEColorMatrix::dump): 45 * svg/graphics/filters/SVGFEColorMatrix.h: 46 (WebCore::): 47 * svg/graphics/filters/SVGFEComponentTransfer.cpp: 48 (WebCore::FEComponentTransfer::FEComponentTransfer): 49 (WebCore::FEComponentTransfer::create): 50 (WebCore::FEComponentTransfer::redFunction): 51 (WebCore::FEComponentTransfer::setRedFunction): 52 (WebCore::FEComponentTransfer::greenFunction): 53 (WebCore::FEComponentTransfer::setGreenFunction): 54 (WebCore::FEComponentTransfer::blueFunction): 55 (WebCore::FEComponentTransfer::setBlueFunction): 56 (WebCore::FEComponentTransfer::alphaFunction): 57 (WebCore::FEComponentTransfer::setAlphaFunction): 58 (WebCore::FEComponentTransfer::apply): 59 (WebCore::FEComponentTransfer::dump): 60 * svg/graphics/filters/SVGFEComponentTransfer.h: 61 (WebCore::): 62 (WebCore::ComponentTransferFunction::ComponentTransferFunction): 63 * svg/graphics/filters/SVGFEComposite.cpp: 64 (WebCore::FEComposite::FEComposite): 65 (WebCore::FEComposite::create): 66 (WebCore::FEComposite::operation): 67 (WebCore::FEComposite::setOperation): 68 (WebCore::FEComposite::k1): 69 (WebCore::FEComposite::setK1): 70 (WebCore::FEComposite::k2): 71 (WebCore::FEComposite::setK2): 72 (WebCore::FEComposite::k3): 73 (WebCore::FEComposite::setK3): 74 (WebCore::FEComposite::k4): 75 (WebCore::FEComposite::setK4): 76 (WebCore::FEComposite::apply): 77 (WebCore::FEComposite::dump): 78 * svg/graphics/filters/SVGFEComposite.h: 79 (WebCore::): 80 * svg/graphics/filters/cg/SVGFEColorMatrixCg.mm: Removed. 81 * svg/graphics/filters/cg/SVGFEComponentTransferCg.mm: Removed. 82 * svg/graphics/filters/cg/SVGFECompositeCg.mm: Removed. 83 1 84 2008-07-03 Dan Bernstein <mitz@apple.com> 2 85 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r34971 r34992 3002 3002 B25599350D00D8BA00BB825C /* SVGResourceFilterCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B25598990D00D8B800BB825C /* SVGResourceFilterCg.mm */; }; 3003 3003 B25599370D00D8BA00BB825C /* SVGResourceMaskerCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B255989B0D00D8B800BB825C /* SVGResourceMaskerCg.mm */; }; 3004 B25599390D00D8BA00BB825C /* SVGFEColorMatrixCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B255989F0D00D8B800BB825C /* SVGFEColorMatrixCg.mm */; };3005 B255993A0D00D8BA00BB825C /* SVGFEComponentTransferCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B25598A00D00D8B800BB825C /* SVGFEComponentTransferCg.mm */; };3006 B255993B0D00D8BA00BB825C /* SVGFECompositeCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B25598A10D00D8B800BB825C /* SVGFECompositeCg.mm */; };3007 3004 B255993C0D00D8BA00BB825C /* SVGFEDiffuseLightingCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B25598A20D00D8B800BB825C /* SVGFEDiffuseLightingCg.mm */; }; 3008 3005 B255993D0D00D8BA00BB825C /* SVGFEDisplacementMapCg.mm in Sources */ = {isa = PBXBuildFile; fileRef = B25598A30D00D8B800BB825C /* SVGFEDisplacementMapCg.mm */; }; … … 7353 7350 B25598990D00D8B800BB825C /* SVGResourceFilterCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGResourceFilterCg.mm; sourceTree = "<group>"; }; 7354 7351 B255989B0D00D8B800BB825C /* SVGResourceMaskerCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGResourceMaskerCg.mm; sourceTree = "<group>"; }; 7355 B255989F0D00D8B800BB825C /* SVGFEColorMatrixCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGFEColorMatrixCg.mm; sourceTree = "<group>"; };7356 B25598A00D00D8B800BB825C /* SVGFEComponentTransferCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGFEComponentTransferCg.mm; sourceTree = "<group>"; };7357 B25598A10D00D8B800BB825C /* SVGFECompositeCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGFECompositeCg.mm; sourceTree = "<group>"; };7358 7352 B25598A20D00D8B800BB825C /* SVGFEDiffuseLightingCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGFEDiffuseLightingCg.mm; sourceTree = "<group>"; }; 7359 7353 B25598A30D00D8B800BB825C /* SVGFEDisplacementMapCg.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = SVGFEDisplacementMapCg.mm; sourceTree = "<group>"; }; … … 11945 11939 isa = PBXGroup; 11946 11940 children = ( 11947 B255989F0D00D8B800BB825C /* SVGFEColorMatrixCg.mm */,11948 B25598A00D00D8B800BB825C /* SVGFEComponentTransferCg.mm */,11949 B25598A10D00D8B800BB825C /* SVGFECompositeCg.mm */,11950 11941 B25598A20D00D8B800BB825C /* SVGFEDiffuseLightingCg.mm */, 11951 11942 B25598A30D00D8B800BB825C /* SVGFEDisplacementMapCg.mm */, … … 16568 16559 B22279C70D00BF220071B782 /* SVGFEBlendElement.cpp in Sources */, 16569 16560 B25599740D00D8BA00BB825C /* SVGFEColorMatrix.cpp in Sources */, 16570 B25599390D00D8BA00BB825C /* SVGFEColorMatrixCg.mm in Sources */,16571 16561 B22279CA0D00BF220071B782 /* SVGFEColorMatrixElement.cpp in Sources */, 16572 16562 B25599760D00D8BA00BB825C /* SVGFEComponentTransfer.cpp in Sources */, 16573 B255993A0D00D8BA00BB825C /* SVGFEComponentTransferCg.mm in Sources */,16574 16563 B22279CD0D00BF220071B782 /* SVGFEComponentTransferElement.cpp in Sources */, 16575 16564 B25599780D00D8BA00BB825C /* SVGFEComposite.cpp in Sources */, 16576 B255993B0D00D8BA00BB825C /* SVGFECompositeCg.mm in Sources */,16577 16565 B22279D00D00BF220071B782 /* SVGFECompositeElement.cpp in Sources */, 16578 16566 B255997A0D00D8BA00BB825C /* SVGFEConvolveMatrix.cpp in Sources */, -
trunk/WebCore/svg/FilterEffect.h
r34942 r34992 22 22 23 23 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 24 #include <wtf/PassRefPtr.h> 24 25 #include <wtf/RefCounted.h> 26 #include <wtf/RefPtr.h> 25 27 26 28 namespace WebCore { -
trunk/WebCore/svg/SVGComponentTransferFunctionElement.cpp
r34925 r34992 34 34 SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const QualifiedName& tagName, Document* doc) 35 35 : SVGElement(tagName, doc) 36 , m_type( SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN)36 , m_type(FECOMPONENTTRANSFER_TYPE_UNKNOWN) 37 37 , m_tableValues(SVGNumberList::create(SVGNames::tableValuesAttr)) 38 38 , m_slope(1.0f) … … 62 62 { 63 63 if (value == "identity") 64 setTypeBaseValue( SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY);64 setTypeBaseValue(FECOMPONENTTRANSFER_TYPE_IDENTITY); 65 65 else if (value == "table") 66 setTypeBaseValue( SVG_FECOMPONENTTRANSFER_TYPE_TABLE);66 setTypeBaseValue(FECOMPONENTTRANSFER_TYPE_TABLE); 67 67 else if (value == "discrete") 68 setTypeBaseValue( SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE);68 setTypeBaseValue(FECOMPONENTTRANSFER_TYPE_DISCRETE); 69 69 else if (value == "linear") 70 setTypeBaseValue( SVG_FECOMPONENTTRANSFER_TYPE_LINEAR);70 setTypeBaseValue(FECOMPONENTTRANSFER_TYPE_LINEAR); 71 71 else if (value == "gamma") 72 setTypeBaseValue( SVG_FECOMPONENTTRANSFER_TYPE_GAMMA);72 setTypeBaseValue(FECOMPONENTTRANSFER_TYPE_GAMMA); 73 73 } 74 74 else if (attr->name() == SVGNames::tableValuesAttr) … … 88 88 } 89 89 90 SVGComponentTransferFunction SVGComponentTransferFunctionElement::transferFunction() const90 ComponentTransferFunction SVGComponentTransferFunctionElement::transferFunction() const 91 91 { 92 SVGComponentTransferFunction func;93 func.type = ( SVGComponentTransferType) type();92 ComponentTransferFunction func; 93 func.type = (ComponentTransferType) type(); 94 94 func.slope = slope(); 95 95 func.intercept = intercept(); -
trunk/WebCore/svg/SVGComponentTransferFunctionElement.h
r34925 r34992 42 42 virtual void parseMappedAttribute(MappedAttribute* attr); 43 43 44 SVGComponentTransferFunction transferFunction() const;44 ComponentTransferFunction transferFunction() const; 45 45 46 46 private: -
trunk/WebCore/svg/SVGFEColorMatrixElement.cpp
r34925 r34992 34 34 SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document* doc) 35 35 : SVGFilterPrimitiveStandardAttributes(tagName, doc) 36 , m_type( SVG_FECOLORMATRIX_TYPE_UNKNOWN)36 , m_type(FECOLORMATRIX_TYPE_UNKNOWN) 37 37 , m_values(SVGNumberList::create(SVGNames::valuesAttr)) 38 38 , m_filterEffect(0) … … 53 53 if (attr->name() == SVGNames::typeAttr) { 54 54 if (value == "matrix") 55 setTypeBaseValue( SVG_FECOLORMATRIX_TYPE_MATRIX);55 setTypeBaseValue(FECOLORMATRIX_TYPE_MATRIX); 56 56 else if (value == "saturate") 57 setTypeBaseValue( SVG_FECOLORMATRIX_TYPE_SATURATE);57 setTypeBaseValue(FECOLORMATRIX_TYPE_SATURATE); 58 58 else if (value == "hueRotate") 59 setTypeBaseValue( SVG_FECOLORMATRIX_TYPE_HUEROTATE);59 setTypeBaseValue(FECOLORMATRIX_TYPE_HUEROTATE); 60 60 else if (value == "luminanceToAlpha") 61 setTypeBaseValue( SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA);61 setTypeBaseValue(FECOLORMATRIX_TYPE_LUMINANCETOALPHA); 62 62 } 63 63 else if (attr->name() == SVGNames::inAttr) … … 69 69 } 70 70 71 SVGF EColorMatrix* SVGFEColorMatrixElement::filterEffect(SVGResourceFilter* filter) const71 SVGFilterEffect* SVGFEColorMatrixElement::filterEffect(SVGResourceFilter* filter) const 72 72 { 73 if (!m_filterEffect) 74 m_filterEffect = SVGFEColorMatrix::create(filter); 75 76 m_filterEffect->setIn(in1()); 77 setStandardAttributes(m_filterEffect.get()); 73 ASSERT_NOT_REACHED(); 74 return 0; 75 } 78 76 77 bool SVGFEColorMatrixElement::build(FilterBuilder* builder) 78 { 79 FilterEffect* input1 = builder->getEffectById(in1()); 80 81 if(!input1) 82 return false; 83 79 84 Vector<float> _values; 80 85 SVGNumberList* numbers = values(); … … 85 90 _values.append(numbers->getItem(i, ec)); 86 91 87 m_filterEffect->setValues(_values);88 m_filterEffect->setType((SVGColorMatrixType) type());92 RefPtr<FilterEffect> addedEffect = FEColorMatrix::create(input1, static_cast<ColorMatrixType> (type()), _values); 93 builder->add(result(), addedEffect.release()); 89 94 90 return m_filterEffect.get();95 return true; 91 96 } 92 97 93 } 98 } //namespace WebCore 94 99 95 100 #endif // ENABLE(SVG) -
trunk/WebCore/svg/SVGFEColorMatrixElement.h
r34925 r34992 25 25 26 26 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 27 #include "FilterBuilder.h" 27 28 #include "SVGFEColorMatrix.h" 28 29 #include "SVGFilterPrimitiveStandardAttributes.h" … … 39 40 40 41 virtual void parseMappedAttribute(MappedAttribute*); 41 virtual SVGFEColorMatrix* filterEffect(SVGResourceFilter*) const; 42 virtual SVGFilterEffect* filterEffect(SVGResourceFilter*) const; 43 bool build(FilterBuilder*); 42 44 43 45 protected: … … 49 51 ANIMATED_PROPERTY_DECLARATIONS(SVGFEColorMatrixElement, SVGNumberList*, RefPtr<SVGNumberList>, Values, values) 50 52 51 mutable RefPtr< SVGFEColorMatrix> m_filterEffect;53 mutable RefPtr<FEColorMatrix> m_filterEffect; 52 54 }; 53 55 -
trunk/WebCore/svg/SVGFEComponentTransferElement.cpp
r34656 r34992 58 58 } 59 59 60 SVGF EComponentTransfer* SVGFEComponentTransferElement::filterEffect(SVGResourceFilter* filter) const60 SVGFilterEffect* SVGFEComponentTransferElement::filterEffect(SVGResourceFilter* filter) const 61 61 { 62 if (!m_filterEffect) 63 m_filterEffect = SVGFEComponentTransfer::create(filter); 62 ASSERT_NOT_REACHED(); 63 return 0; 64 } 65 66 bool SVGFEComponentTransferElement::build(FilterBuilder* builder) 67 { 68 FilterEffect* input1 = builder->getEffectById(in1()); 64 69 65 m_filterEffect->setIn(in1()); 66 setStandardAttributes(m_filterEffect.get()); 70 if(!input1) 71 return false; 72 73 ComponentTransferFunction red; 74 ComponentTransferFunction green; 75 ComponentTransferFunction blue; 76 ComponentTransferFunction alpha; 67 77 68 78 for (Node* n = firstChild(); n != 0; n = n->nextSibling()) { 69 79 if (n->hasTagName(SVGNames::feFuncRTag)) 70 m_filterEffect->setRedFunction(static_cast<SVGFEFuncRElement*>(n)->transferFunction());80 red = static_cast<SVGFEFuncRElement*>(n)->transferFunction(); 71 81 else if (n->hasTagName(SVGNames::feFuncGTag)) 72 m_filterEffect->setGreenFunction(static_cast<SVGFEFuncGElement*>(n)->transferFunction());82 green = static_cast<SVGFEFuncGElement*>(n)->transferFunction(); 73 83 else if (n->hasTagName(SVGNames::feFuncBTag)) 74 m_filterEffect->setBlueFunction(static_cast<SVGFEFuncBElement*>(n)->transferFunction());84 blue = static_cast<SVGFEFuncBElement*>(n)->transferFunction(); 75 85 else if (n->hasTagName(SVGNames::feFuncATag)) 76 m_filterEffect->setAlphaFunction(static_cast<SVGFEFuncAElement*>(n)->transferFunction());86 alpha = static_cast<SVGFEFuncAElement*>(n)->transferFunction(); 77 87 } 78 79 return m_filterEffect.get(); 88 89 RefPtr<FilterEffect> addedEffect = FEComponentTransfer::create(input1, red, green, blue, alpha); 90 builder->add(result(), addedEffect.release()); 91 92 return true; 80 93 } 81 94 -
trunk/WebCore/svg/SVGFEComponentTransferElement.h
r34925 r34992 25 25 26 26 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 27 #include "FilterBuilder.h" 27 28 #include "SVGFilterPrimitiveStandardAttributes.h" 28 29 #include "SVGFEComponentTransfer.h" … … 38 39 39 40 virtual void parseMappedAttribute(MappedAttribute*); 40 virtual SVGFEComponentTransfer* filterEffect(SVGResourceFilter*) const; 41 virtual SVGFilterEffect* filterEffect(SVGResourceFilter*) const; 42 bool build(FilterBuilder*); 41 43 42 44 protected: … … 46 48 ANIMATED_PROPERTY_DECLARATIONS(SVGFEComponentTransferElement, String, String, In1, in1) 47 49 48 mutable RefPtr< SVGFEComponentTransfer> m_filterEffect;50 mutable RefPtr<FEComponentTransfer> m_filterEffect; 49 51 }; 50 52 -
trunk/WebCore/svg/SVGFECompositeElement.cpp
r34656 r34992 33 33 SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName, Document* doc) 34 34 : SVGFilterPrimitiveStandardAttributes(tagName, doc) 35 , m__operator( SVG_FECOMPOSITE_OPERATOR_OVER)35 , m__operator(FECOMPOSITE_OPERATOR_OVER) 36 36 , m_k1(0.0f) 37 37 , m_k2(0.0f) … … 59 59 if (attr->name() == SVGNames::operatorAttr) { 60 60 if (value == "over") 61 set_operatorBaseValue( SVG_FECOMPOSITE_OPERATOR_OVER);61 set_operatorBaseValue(FECOMPOSITE_OPERATOR_OVER); 62 62 else if (value == "in") 63 set_operatorBaseValue( SVG_FECOMPOSITE_OPERATOR_IN);63 set_operatorBaseValue(FECOMPOSITE_OPERATOR_IN); 64 64 else if (value == "out") 65 set_operatorBaseValue( SVG_FECOMPOSITE_OPERATOR_OUT);65 set_operatorBaseValue(FECOMPOSITE_OPERATOR_OUT); 66 66 else if (value == "atop") 67 set_operatorBaseValue( SVG_FECOMPOSITE_OPERATOR_ATOP);67 set_operatorBaseValue(FECOMPOSITE_OPERATOR_ATOP); 68 68 else if (value == "xor") 69 set_operatorBaseValue( SVG_FECOMPOSITE_OPERATOR_XOR);69 set_operatorBaseValue(FECOMPOSITE_OPERATOR_XOR); 70 70 else if (value == "arithmetic") 71 set_operatorBaseValue( SVG_FECOMPOSITE_OPERATOR_ARITHMETIC);71 set_operatorBaseValue(FECOMPOSITE_OPERATOR_ARITHMETIC); 72 72 } 73 73 else if (attr->name() == SVGNames::inAttr) … … 87 87 } 88 88 89 SVGF EComposite* SVGFECompositeElement::filterEffect(SVGResourceFilter* filter) const89 SVGFilterEffect* SVGFECompositeElement::filterEffect(SVGResourceFilter* filter) const 90 90 { 91 if (!m_filterEffect) 92 m_filterEffect = SVGFEComposite::create(filter); 91 ASSERT_NOT_REACHED(); 92 return 0; 93 } 94 95 bool SVGFECompositeElement::build(FilterBuilder* builder) 96 { 97 FilterEffect* input1 = builder->getEffectById(in1()); 98 FilterEffect* input2 = builder->getEffectById(in2()); 93 99 94 m_filterEffect->setOperation((SVGCompositeOperationType) _operator()); 95 m_filterEffect->setIn(in1()); 96 m_filterEffect->setIn2(in2()); 97 m_filterEffect->setK1(k1()); 98 m_filterEffect->setK2(k2()); 99 m_filterEffect->setK3(k3()); 100 m_filterEffect->setK4(k4()); 100 if(!input1 || !input2) 101 return false; 102 103 RefPtr<FilterEffect> addedEffect = FEComposite::create(input1, input2, static_cast<CompositeOperationType> (_operator()), 104 k1(), k2(), k3(), k4()); 105 builder->add(result(), addedEffect.release()); 101 106 102 setStandardAttributes(m_filterEffect.get()); 103 return m_filterEffect.get(); 107 return true; 104 108 } 105 109 -
trunk/WebCore/svg/SVGFECompositeElement.h
r34925 r34992 25 25 26 26 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 27 #include "FilterBuilder.h" 27 28 #include "SVGFEComposite.h" 28 29 #include "SVGFilterPrimitiveStandardAttributes.h" … … 38 39 39 40 virtual void parseMappedAttribute(MappedAttribute*); 40 virtual SVGFEComposite* filterEffect(SVGResourceFilter*) const; 41 virtual SVGFilterEffect* filterEffect(SVGResourceFilter*) const; 42 bool build(FilterBuilder*); 41 43 42 44 protected: … … 52 54 ANIMATED_PROPERTY_DECLARATIONS(SVGFECompositeElement, float, float, K4, k4) 53 55 54 mutable RefPtr< SVGFEComposite> m_filterEffect;56 mutable RefPtr<FEComposite> m_filterEffect; 55 57 }; 56 58 -
trunk/WebCore/svg/graphics/filters/SVGFEBlend.cpp
r34971 r34992 24 24 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 25 25 #include "SVGFEBlend.h" 26 #include "TextStream.h"27 26 28 27 namespace WebCore { -
trunk/WebCore/svg/graphics/filters/SVGFEBlend.h
r34971 r34992 25 25 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 26 26 #include "FilterEffect.h" 27 #include "SVGFilterEffect.h"28 27 29 28 namespace WebCore { -
trunk/WebCore/svg/graphics/filters/SVGFEColorMatrix.cpp
r34656 r34992 27 27 namespace WebCore { 28 28 29 SVGFEColorMatrix::SVGFEColorMatrix(SVGResourceFilter* filter) 30 : SVGFilterEffect(filter) 31 , m_type(SVG_FECOLORMATRIX_TYPE_UNKNOWN) 29 FEColorMatrix::FEColorMatrix(FilterEffect* in, ColorMatrixType type, const Vector<float>& values) 30 : FilterEffect() 31 , m_in(in) 32 , m_type(type) 33 , m_values(values) 32 34 { 33 35 } 34 36 35 PassRefPtr< SVGFEColorMatrix> SVGFEColorMatrix::create(SVGResourceFilter* filter)37 PassRefPtr<FEColorMatrix> FEColorMatrix::create(FilterEffect* in, ColorMatrixType type, const Vector<float>& values) 36 38 { 37 return adoptRef(new SVGFEColorMatrix(filter));39 return adoptRef(new FEColorMatrix(in, type, values)); 38 40 } 39 41 40 SVGColorMatrixType SVGFEColorMatrix::type() const42 ColorMatrixType FEColorMatrix::type() const 41 43 { 42 44 return m_type; 43 45 } 44 46 45 void SVGFEColorMatrix::setType(SVGColorMatrixType type)47 void FEColorMatrix::setType(ColorMatrixType type) 46 48 { 47 49 m_type = type; 48 50 } 49 51 50 const Vector<float>& SVGFEColorMatrix::values() const52 const Vector<float>& FEColorMatrix::values() const 51 53 { 52 54 return m_values; 53 55 } 54 56 55 void SVGFEColorMatrix::setValues(const Vector<float> &values)57 void FEColorMatrix::setValues(const Vector<float> &values) 56 58 { 57 59 m_values = values; 58 60 } 59 61 60 static TextStream& operator<<(TextStream& ts, SVGColorMatrixType t)62 void FEColorMatrix::apply() 61 63 { 62 switch (t)63 {64 case SVG_FECOLORMATRIX_TYPE_UNKNOWN:65 ts << "UNKNOWN"; break;66 case SVG_FECOLORMATRIX_TYPE_MATRIX:67 ts << "CMT_MATRIX"; break;68 case SVG_FECOLORMATRIX_TYPE_SATURATE:69 ts << "CMT_SATURATE"; break;70 case SVG_FECOLORMATRIX_TYPE_HUEROTATE:71 ts << "HUE-ROTATE"; break;72 case SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA:73 ts << "LUMINANCE-TO-ALPHA"; break;74 }75 return ts;76 64 } 77 65 78 TextStream& SVGFEColorMatrix::externalRepresentation(TextStream& ts) const 66 void FEColorMatrix::dump() 79 67 { 80 ts << "[type=COLOR-MATRIX] ";81 SVGFilterEffect::externalRepresentation(ts);82 ts << " [color matrix type=" << type() << "]"83 << " [values=" << values() << "]";84 return ts;85 68 } 86 69 -
trunk/WebCore/svg/graphics/filters/SVGFEColorMatrix.h
r34656 r34992 24 24 25 25 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 26 #include " SVGFilterEffect.h"27 #include "SVGRenderTreeAsText.h"26 #include "FilterEffect.h" 27 #include <wtf/Vector.h> 28 28 29 29 namespace WebCore { 30 30 31 enum SVGColorMatrixType {32 SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0,33 SVG_FECOLORMATRIX_TYPE_MATRIX = 1,34 SVG_FECOLORMATRIX_TYPE_SATURATE = 2,35 SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3,36 SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 437 };31 enum ColorMatrixType { 32 FECOLORMATRIX_TYPE_UNKNOWN = 0, 33 FECOLORMATRIX_TYPE_MATRIX = 1, 34 FECOLORMATRIX_TYPE_SATURATE = 2, 35 FECOLORMATRIX_TYPE_HUEROTATE = 3, 36 FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4 37 }; 38 38 39 class SVGFEColorMatrix : public SVGFilterEffect {40 public:41 static PassRefPtr<SVGFEColorMatrix> create(SVGResourceFilter*);39 class FEColorMatrix : public FilterEffect { 40 public: 41 static PassRefPtr<FEColorMatrix> create(FilterEffect*, ColorMatrixType, const Vector<float>&); 42 42 43 SVGColorMatrixType type() const;44 void setType(SVGColorMatrixType);43 ColorMatrixType type() const; 44 void setType(ColorMatrixType); 45 45 46 const Vector<float>& values() const; 47 void setValues(const Vector<float>&); 46 const Vector<float>& values() const; 47 void setValues(const Vector<float>&); 48 49 virtual void apply(); 50 virtual void dump(); 48 51 49 virtual TextStream& externalRepresentation(TextStream&) const; 52 private: 53 FEColorMatrix(FilterEffect*, ColorMatrixType, const Vector<float>&); 50 54 51 #if PLATFORM(CI) 52 virtual CIFilter* getCIFilter(const FloatRect& bbox) const; 53 #endif 54 55 private: 56 SVGFEColorMatrix(SVGResourceFilter*); 57 58 SVGColorMatrixType m_type; 59 Vector<float> m_values; 60 }; 55 RefPtr<FilterEffect> m_in; 56 ColorMatrixType m_type; 57 Vector<float> m_values; 58 }; 61 59 62 60 } // namespace WebCore -
trunk/WebCore/svg/graphics/filters/SVGFEComponentTransfer.cpp
r34656 r34992 24 24 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 25 25 #include "SVGFEComponentTransfer.h" 26 #include "TextStream.h"27 26 28 27 namespace WebCore { 29 28 30 SVGFEComponentTransfer::SVGFEComponentTransfer(SVGResourceFilter* filter) 31 : SVGFilterEffect(filter) 29 FEComponentTransfer::FEComponentTransfer(FilterEffect* in, const ComponentTransferFunction& redFunc, 30 const ComponentTransferFunction& greenFunc, const ComponentTransferFunction& blueFunc, const ComponentTransferFunction& alphaFunc) 31 : FilterEffect() 32 , m_in(in) 33 , m_redFunc(redFunc) 34 , m_greenFunc(greenFunc) 35 , m_blueFunc(blueFunc) 36 , m_alphaFunc(alphaFunc) 32 37 { 33 38 } 34 39 35 PassRefPtr<SVGFEComponentTransfer> SVGFEComponentTransfer::create(SVGResourceFilter* filter) 40 PassRefPtr<FEComponentTransfer> FEComponentTransfer::create(FilterEffect* in, const ComponentTransferFunction& redFunc, 41 const ComponentTransferFunction& greenFunc, const ComponentTransferFunction& blueFunc, const ComponentTransferFunction& alphaFunc) 36 42 { 37 return adoptRef(new SVGFEComponentTransfer(filter));43 return adoptRef(new FEComponentTransfer(in, redFunc, greenFunc, blueFunc, alphaFunc)); 38 44 } 39 45 40 SVGComponentTransferFunction SVGFEComponentTransfer::redFunction() const46 ComponentTransferFunction FEComponentTransfer::redFunction() const 41 47 { 42 48 return m_redFunc; 43 49 } 44 50 45 void SVGFEComponentTransfer::setRedFunction(const SVGComponentTransferFunction& func)51 void FEComponentTransfer::setRedFunction(const ComponentTransferFunction& func) 46 52 { 47 53 m_redFunc = func; 48 54 } 49 55 50 SVGComponentTransferFunction SVGFEComponentTransfer::greenFunction() const56 ComponentTransferFunction FEComponentTransfer::greenFunction() const 51 57 { 52 58 return m_greenFunc; 53 59 } 54 60 55 void SVGFEComponentTransfer::setGreenFunction(const SVGComponentTransferFunction& func)61 void FEComponentTransfer::setGreenFunction(const ComponentTransferFunction& func) 56 62 { 57 63 m_greenFunc = func; 58 64 } 59 65 60 SVGComponentTransferFunction SVGFEComponentTransfer::blueFunction() const66 ComponentTransferFunction FEComponentTransfer::blueFunction() const 61 67 { 62 68 return m_blueFunc; 63 69 } 64 70 65 void SVGFEComponentTransfer::setBlueFunction(const SVGComponentTransferFunction& func)71 void FEComponentTransfer::setBlueFunction(const ComponentTransferFunction& func) 66 72 { 67 73 m_blueFunc = func; 68 74 } 69 75 70 SVGComponentTransferFunction SVGFEComponentTransfer::alphaFunction() const76 ComponentTransferFunction FEComponentTransfer::alphaFunction() const 71 77 { 72 78 return m_alphaFunc; 73 79 } 74 80 75 void SVGFEComponentTransfer::setAlphaFunction(const SVGComponentTransferFunction& func)81 void FEComponentTransfer::setAlphaFunction(const ComponentTransferFunction& func) 76 82 { 77 83 m_alphaFunc = func; 78 84 } 79 85 80 static TextStream& operator<<(TextStream& ts, SVGComponentTransferType t)86 void FEComponentTransfer::apply() 81 87 { 82 switch (t)83 {84 case SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN:85 ts << "UNKNOWN"; break;86 case SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY:87 ts << "IDENTITY"; break;88 case SVG_FECOMPONENTTRANSFER_TYPE_TABLE:89 ts << "TABLE"; break;90 case SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE:91 ts << "DISCRETE"; break;92 case SVG_FECOMPONENTTRANSFER_TYPE_LINEAR:93 ts << "LINEAR"; break;94 case SVG_FECOMPONENTTRANSFER_TYPE_GAMMA:95 ts << "GAMMA"; break;96 }97 return ts;98 88 } 99 89 100 static TextStream& operator<<(TextStream& ts, const SVGComponentTransferFunction &func)90 void FEComponentTransfer::dump() 101 91 { 102 ts << "[type=" << func.type << "]";103 switch (func.type) {104 case SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN:105 case SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY:106 break;107 case SVG_FECOMPONENTTRANSFER_TYPE_TABLE:108 case SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE:109 {110 ts << " [table values=";111 Vector<float>::const_iterator itr=func.tableValues.begin();112 if (itr != func.tableValues.end()) {113 ts << *itr++;114 for (; itr!=func.tableValues.end(); itr++) {115 ts << " " << *itr;116 }117 }118 ts << "]";119 break;120 }121 case SVG_FECOMPONENTTRANSFER_TYPE_LINEAR:122 ts << " [slope=" << func.slope << "]"123 << " [intercept=" << func.intercept << "]";124 break;125 case SVG_FECOMPONENTTRANSFER_TYPE_GAMMA:126 ts << " [amplitude=" << func.amplitude << "]"127 << " [exponent=" << func.exponent << "]"128 << " [offset=" << func.offset << "]";129 break;130 }131 return ts;132 }133 134 TextStream& SVGFEComponentTransfer::externalRepresentation(TextStream& ts) const135 {136 ts << "[type=COMPONENT-TRANSFER] ";137 SVGFilterEffect::externalRepresentation(ts);138 ts << " [red func=" << redFunction() << "]"139 << " [green func=" << greenFunction() << "]"140 << " [blue func=" << blueFunction() << "]"141 << " [alpha func=" << alphaFunction() << "]";142 return ts;143 92 } 144 93 -
trunk/WebCore/svg/graphics/filters/SVGFEComponentTransfer.h
r34656 r34992 24 24 25 25 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 26 #include <wtf/Vector.h> 27 28 #include "SVGFilterEffect.h" 26 #include "FilterEffect.h" 29 27 #include "SVGFEDisplacementMap.h" 30 28 31 #if PLATFORM(CI) 32 #ifdef __OBJC__ 33 @class CIImage; 34 @class CIFilter; 35 #else 36 class CIImage; 37 class CIFilter; 38 #endif 39 #endif 29 #include <wtf/Vector.h> 40 30 41 31 namespace WebCore { 42 32 43 enum SVGComponentTransferType {44 SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0,45 SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1,46 SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2,47 SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3,48 SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4,49 SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 550 };33 enum ComponentTransferType { 34 FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0, 35 FECOMPONENTTRANSFER_TYPE_IDENTITY = 1, 36 FECOMPONENTTRANSFER_TYPE_TABLE = 2, 37 FECOMPONENTTRANSFER_TYPE_DISCRETE = 3, 38 FECOMPONENTTRANSFER_TYPE_LINEAR = 4, 39 FECOMPONENTTRANSFER_TYPE_GAMMA = 5 40 }; 51 41 52 struct SVGComponentTransferFunction {53 SVGComponentTransferFunction()54 : type(SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN)55 , slope(0.0f)56 , intercept(0.0f)57 , amplitude(0.0f)58 , exponent(0.0f)59 , offset(0.0f)60 {61 }42 struct ComponentTransferFunction { 43 ComponentTransferFunction() 44 : type(FECOMPONENTTRANSFER_TYPE_UNKNOWN) 45 , slope(0.0f) 46 , intercept(0.0f) 47 , amplitude(0.0f) 48 , exponent(0.0f) 49 , offset(0.0f) 50 { 51 } 62 52 63 SVGComponentTransferType type;53 ComponentTransferType type; 64 54 65 float slope;66 float intercept;67 float amplitude;68 float exponent;69 float offset;55 float slope; 56 float intercept; 57 float amplitude; 58 float exponent; 59 float offset; 70 60 71 Vector<float> tableValues;72 };61 Vector<float> tableValues; 62 }; 73 63 74 class SVGFEComponentTransfer : public SVGFilterEffect { 75 public: 76 static PassRefPtr<SVGFEComponentTransfer> create(SVGResourceFilter*); 64 class FEComponentTransfer : public FilterEffect { 65 public: 66 static PassRefPtr<FEComponentTransfer> create(FilterEffect*, const ComponentTransferFunction&, 67 const ComponentTransferFunction&, const ComponentTransferFunction&, const ComponentTransferFunction&); 77 68 78 SVGComponentTransferFunction redFunction() const;79 void setRedFunction(const SVGComponentTransferFunction&);69 ComponentTransferFunction redFunction() const; 70 void setRedFunction(const ComponentTransferFunction&); 80 71 81 SVGComponentTransferFunction greenFunction() const;82 void setGreenFunction(const SVGComponentTransferFunction&);72 ComponentTransferFunction greenFunction() const; 73 void setGreenFunction(const ComponentTransferFunction&); 83 74 84 SVGComponentTransferFunction blueFunction() const;85 void setBlueFunction(const SVGComponentTransferFunction&);75 ComponentTransferFunction blueFunction() const; 76 void setBlueFunction(const ComponentTransferFunction&); 86 77 87 SVGComponentTransferFunction alphaFunction() const; 88 void setAlphaFunction(const SVGComponentTransferFunction&); 78 ComponentTransferFunction alphaFunction() const; 79 void setAlphaFunction(const ComponentTransferFunction&); 80 81 virtual void apply(); 82 virtual void dump(); 89 83 90 virtual TextStream& externalRepresentation(TextStream&) const; 84 private: 85 FEComponentTransfer(FilterEffect*,const ComponentTransferFunction&, const ComponentTransferFunction&, 86 const ComponentTransferFunction&, const ComponentTransferFunction&); 91 87 92 #if PLATFORM(CI) 93 virtual CIFilter* getCIFilter(const FloatRect& bbox) const; 94 95 private: 96 CIFilter* getFunctionFilter(SVGChannelSelectorType, CIImage* inputImage) const; 97 #endif 98 99 private: 100 SVGFEComponentTransfer(SVGResourceFilter*); 101 102 SVGComponentTransferFunction m_redFunc; 103 SVGComponentTransferFunction m_greenFunc; 104 SVGComponentTransferFunction m_blueFunc; 105 SVGComponentTransferFunction m_alphaFunc; 106 }; 88 RefPtr<FilterEffect> m_in; 89 ComponentTransferFunction m_redFunc; 90 ComponentTransferFunction m_greenFunc; 91 ComponentTransferFunction m_blueFunc; 92 ComponentTransferFunction m_alphaFunc; 93 }; 107 94 108 95 } // namespace WebCore -
trunk/WebCore/svg/graphics/filters/SVGFEComposite.cpp
r34656 r34992 24 24 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 25 25 #include "SVGFEComposite.h" 26 #include "TextStream.h"27 26 28 27 namespace WebCore { 29 28 30 SVGFEComposite::SVGFEComposite(SVGResourceFilter* filter) 31 : SVGFilterEffect(filter) 32 , m_operation(SVG_FECOMPOSITE_OPERATOR_UNKNOWN) 33 , m_k1(0.0f) 34 , m_k2(0.0f) 35 , m_k3(0.0f) 36 , m_k4(0.0f) 29 FEComposite::FEComposite(FilterEffect* in, FilterEffect* in2, const CompositeOperationType& type, 30 const float& k1, const float& k2, const float& k3, const float& k4) 31 : FilterEffect() 32 , m_in(in) 33 , m_in2(in2) 34 , m_type(type) 35 , m_k1(k1) 36 , m_k2(k2) 37 , m_k3(k3) 38 , m_k4(k4) 37 39 { 38 40 } 39 41 40 PassRefPtr<SVGFEComposite> SVGFEComposite::create(SVGResourceFilter* filter) 42 PassRefPtr<FEComposite> FEComposite::create(FilterEffect* in, FilterEffect* in2, const CompositeOperationType& type, 43 const float& k1, const float& k2, const float& k3, const float& k4) 41 44 { 42 return adoptRef(new SVGFEComposite(filter));45 return adoptRef(new FEComposite(in, in2, type, k1, k2, k3, k4)); 43 46 } 44 47 45 String SVGFEComposite::in2() const48 CompositeOperationType FEComposite::operation() const 46 49 { 47 return m_ in2;50 return m_type; 48 51 } 49 52 50 void SVGFEComposite::setIn2(const String& in2)53 void FEComposite::setOperation(CompositeOperationType type) 51 54 { 52 m_ in2 = in2;55 m_type = type; 53 56 } 54 57 55 SVGCompositeOperationType SVGFEComposite::operation() const 56 { 57 return m_operation; 58 } 59 60 void SVGFEComposite::setOperation(SVGCompositeOperationType oper) 61 { 62 m_operation = oper; 63 } 64 65 float SVGFEComposite::k1() const 58 float FEComposite::k1() const 66 59 { 67 60 return m_k1; 68 61 } 69 62 70 void SVGFEComposite::setK1(float k1)63 void FEComposite::setK1(float k1) 71 64 { 72 65 m_k1 = k1; 73 66 } 74 67 75 float SVGFEComposite::k2() const68 float FEComposite::k2() const 76 69 { 77 70 return m_k2; 78 71 } 79 72 80 void SVGFEComposite::setK2(float k2)73 void FEComposite::setK2(float k2) 81 74 { 82 75 m_k2 = k2; 83 76 } 84 77 85 float SVGFEComposite::k3() const78 float FEComposite::k3() const 86 79 { 87 80 return m_k3; 88 81 } 89 82 90 void SVGFEComposite::setK3(float k3)83 void FEComposite::setK3(float k3) 91 84 { 92 85 m_k3 = k3; 93 86 } 94 87 95 float SVGFEComposite::k4() const88 float FEComposite::k4() const 96 89 { 97 90 return m_k4; 98 91 } 99 92 100 void SVGFEComposite::setK4(float k4)93 void FEComposite::setK4(float k4) 101 94 { 102 95 m_k4 = k4; 103 96 } 104 97 105 TextStream& SVGFEComposite::externalRepresentation(TextStream& ts) const 98 void FEComposite::apply() 106 99 { 107 ts << "[type=COMPOSITE] "; 108 SVGFilterEffect::externalRepresentation(ts); 109 if (!in2().isEmpty()) 110 ts << " [in2=\"" << in2() << "\"]"; 111 ts << " [k1=" << k1() << " k2=" << k2() << " k3=" << k3() << " k4=" << k4() << "]"; 112 return ts; 100 } 101 102 void FEComposite::dump() 103 { 113 104 } 114 105 -
trunk/WebCore/svg/graphics/filters/SVGFEComposite.h
r34656 r34992 24 24 25 25 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 26 #include "SVGFilterEffect.h" 26 #include "FilterEffect.h" 27 #include "PlatformString.h" 27 28 28 29 namespace WebCore { 29 30 30 enum SVGCompositeOperationType {31 SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0,32 SVG_FECOMPOSITE_OPERATOR_OVER = 1,33 SVG_FECOMPOSITE_OPERATOR_IN = 2,34 SVG_FECOMPOSITE_OPERATOR_OUT = 3,35 SVG_FECOMPOSITE_OPERATOR_ATOP = 4,36 SVG_FECOMPOSITE_OPERATOR_XOR = 5,37 SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 638 };31 enum CompositeOperationType { 32 FECOMPOSITE_OPERATOR_UNKNOWN = 0, 33 FECOMPOSITE_OPERATOR_OVER = 1, 34 FECOMPOSITE_OPERATOR_IN = 2, 35 FECOMPOSITE_OPERATOR_OUT = 3, 36 FECOMPOSITE_OPERATOR_ATOP = 4, 37 FECOMPOSITE_OPERATOR_XOR = 5, 38 FECOMPOSITE_OPERATOR_ARITHMETIC = 6 39 }; 39 40 40 class SVGFEComposite : public SVGFilterEffect { 41 public: 42 static PassRefPtr<SVGFEComposite> create(SVGResourceFilter*); 41 class FEComposite : public FilterEffect { 42 public: 43 static PassRefPtr<FEComposite> create(FilterEffect*, FilterEffect*, const CompositeOperationType&, 44 const float&, const float&, const float&, const float&); 43 45 44 String in2() const;45 void setIn2(const String&);46 CompositeOperationType operation() const; 47 void setOperation(CompositeOperationType); 46 48 47 SVGCompositeOperationType operation() const;48 void setOperation(SVGCompositeOperationType);49 float k1() const; 50 void setK1(float); 49 51 50 float k1() const;51 void setK1(float);52 float k2() const; 53 void setK2(float); 52 54 53 float k2() const;54 void setK2(float);55 float k3() const; 56 void setK3(float); 55 57 56 float k3() const; 57 void setK3(float); 58 float k4() const; 59 void setK4(float); 60 61 virtual void apply(); 62 virtual void dump(); 58 63 59 float k4() const; 60 void setK4(float); 64 private: 65 FEComposite(FilterEffect*, FilterEffect*, const CompositeOperationType&, 66 const float&, const float&, const float&, const float&); 61 67 62 virtual TextStream& externalRepresentation(TextStream&) const; 63 64 #if PLATFORM(CI) 65 virtual CIFilter* getCIFilter(const FloatRect& bbox) const; 66 #endif 67 68 private: 69 SVGFEComposite(SVGResourceFilter*); 70 71 SVGCompositeOperationType m_operation; 72 float m_k1; 73 float m_k2; 74 float m_k3; 75 float m_k4; 76 String m_in2; 77 }; 68 RefPtr<FilterEffect> m_in; 69 RefPtr<FilterEffect> m_in2; 70 CompositeOperationType m_type; 71 float m_k1; 72 float m_k2; 73 float m_k3; 74 float m_k4; 75 }; 78 76 79 77 } // namespace WebCore
Note: See TracChangeset
for help on using the changeset viewer.