OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 #include "core/svg/SVGAnimatedBoolean.h" | 23 #include "core/svg/SVGAnimatedBoolean.h" |
24 #include "core/svg/SVGAnimatedEnumeration.h" | 24 #include "core/svg/SVGAnimatedEnumeration.h" |
25 #include "core/svg/SVGAnimatedInteger.h" | 25 #include "core/svg/SVGAnimatedInteger.h" |
26 #include "core/svg/SVGAnimatedIntegerOptionalInteger.h" | 26 #include "core/svg/SVGAnimatedIntegerOptionalInteger.h" |
27 #include "core/svg/SVGAnimatedNumber.h" | 27 #include "core/svg/SVGAnimatedNumber.h" |
28 #include "core/svg/SVGAnimatedNumberList.h" | 28 #include "core/svg/SVGAnimatedNumberList.h" |
29 #include "core/svg/SVGAnimatedNumberOptionalNumber.h" | 29 #include "core/svg/SVGAnimatedNumberOptionalNumber.h" |
30 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" | 30 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" |
31 #include "platform/graphics/filters/FEConvolveMatrix.h" | 31 #include "platform/graphics/filters/FEConvolveMatrix.h" |
| 32 #include "platform/heap/Handle.h" |
32 | 33 |
33 namespace blink { | 34 namespace blink { |
34 | 35 |
35 template<> const SVGEnumerationStringEntries& getStaticStringEntries<EdgeModeTyp
e>(); | 36 template<> const SVGEnumerationStringEntries& getStaticStringEntries<EdgeModeTyp
e>(); |
36 | 37 |
37 class SVGFEConvolveMatrixElement final : public SVGFilterPrimitiveStandardAttrib
utes { | 38 class SVGFEConvolveMatrixElement final : public SVGFilterPrimitiveStandardAttrib
utes { |
38 DEFINE_WRAPPERTYPEINFO(); | 39 DEFINE_WRAPPERTYPEINFO(); |
39 public: | 40 public: |
40 DECLARE_NODE_FACTORY(SVGFEConvolveMatrixElement); | 41 DECLARE_NODE_FACTORY(SVGFEConvolveMatrixElement); |
41 | 42 |
42 SVGAnimatedBoolean* preserveAlpha() { return m_preserveAlpha.get(); } | 43 SVGAnimatedBoolean* preserveAlpha() { return m_preserveAlpha.get(); } |
43 SVGAnimatedNumber* divisor() { return m_divisor.get(); } | 44 SVGAnimatedNumber* divisor() { return m_divisor.get(); } |
44 SVGAnimatedNumber* bias() { return m_bias.get(); } | 45 SVGAnimatedNumber* bias() { return m_bias.get(); } |
45 SVGAnimatedNumber* kernelUnitLengthX() { return m_kernelUnitLength->firstNum
ber(); } | 46 SVGAnimatedNumber* kernelUnitLengthX() { return m_kernelUnitLength->firstNum
ber(); } |
46 SVGAnimatedNumber* kernelUnitLengthY() { return m_kernelUnitLength->secondNu
mber(); } | 47 SVGAnimatedNumber* kernelUnitLengthY() { return m_kernelUnitLength->secondNu
mber(); } |
47 SVGAnimatedNumberList* kernelMatrix() { return m_kernelMatrix.get(); } | 48 SVGAnimatedNumberList* kernelMatrix() { return m_kernelMatrix.get(); } |
48 SVGAnimatedString* in1() { return m_in1.get(); } | 49 SVGAnimatedString* in1() { return m_in1.get(); } |
49 SVGAnimatedEnumeration<EdgeModeType>* edgeMode() { return m_edgeMode.get();
} | 50 SVGAnimatedEnumeration<EdgeModeType>* edgeMode() { return m_edgeMode.get();
} |
50 SVGAnimatedInteger* orderX() { return m_order->firstInteger(); } | 51 SVGAnimatedInteger* orderX() { return m_order->firstInteger(); } |
51 SVGAnimatedInteger* orderY() { return m_order->secondInteger(); } | 52 SVGAnimatedInteger* orderY() { return m_order->secondInteger(); } |
52 SVGAnimatedInteger* targetX() { return m_targetX.get(); } | 53 SVGAnimatedInteger* targetX() { return m_targetX.get(); } |
53 SVGAnimatedInteger* targetY() { return m_targetY.get(); } | 54 SVGAnimatedInteger* targetY() { return m_targetY.get(); } |
54 | 55 |
| 56 virtual void trace(Visitor*) override; |
| 57 |
55 private: | 58 private: |
56 explicit SVGFEConvolveMatrixElement(Document&); | 59 explicit SVGFEConvolveMatrixElement(Document&); |
57 | 60 |
58 bool isSupportedAttribute(const QualifiedName&); | 61 bool isSupportedAttribute(const QualifiedName&); |
59 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; | 62 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
60 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) o
verride; | 63 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) o
verride; |
61 virtual void svgAttributeChanged(const QualifiedName&) override; | 64 virtual void svgAttributeChanged(const QualifiedName&) override; |
62 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) override; | 65 virtual PassRefPtrWillBeRawPtr<FilterEffect> build(SVGFilterBuilder*, Filter
*) override; |
63 | 66 |
64 RefPtr<SVGAnimatedNumber> m_bias; | 67 RefPtrWillBeMember<SVGAnimatedNumber> m_bias; |
65 RefPtr<SVGAnimatedNumber> m_divisor; | 68 RefPtrWillBeMember<SVGAnimatedNumber> m_divisor; |
66 RefPtr<SVGAnimatedString> m_in1; | 69 RefPtrWillBeMember<SVGAnimatedString> m_in1; |
67 RefPtr<SVGAnimatedEnumeration<EdgeModeType> > m_edgeMode; | 70 RefPtrWillBeMember<SVGAnimatedEnumeration<EdgeModeType> > m_edgeMode; |
68 RefPtr<SVGAnimatedNumberList> m_kernelMatrix; | 71 RefPtrWillBeMember<SVGAnimatedNumberList> m_kernelMatrix; |
69 RefPtr<SVGAnimatedNumberOptionalNumber> m_kernelUnitLength; | 72 RefPtrWillBeMember<SVGAnimatedNumberOptionalNumber> m_kernelUnitLength; |
70 RefPtr<SVGAnimatedIntegerOptionalInteger> m_order; | 73 RefPtrWillBeMember<SVGAnimatedIntegerOptionalInteger> m_order; |
71 RefPtr<SVGAnimatedBoolean> m_preserveAlpha; | 74 RefPtrWillBeMember<SVGAnimatedBoolean> m_preserveAlpha; |
72 RefPtr<SVGAnimatedInteger> m_targetX; | 75 RefPtrWillBeMember<SVGAnimatedInteger> m_targetX; |
73 RefPtr<SVGAnimatedInteger> m_targetY; | 76 RefPtrWillBeMember<SVGAnimatedInteger> m_targetY; |
74 }; | 77 }; |
75 | 78 |
76 } // namespace blink | 79 } // namespace blink |
77 | 80 |
78 #endif // SVGFEConvolveMatrixElement_h | 81 #endif // SVGFEConvolveMatrixElement_h |
OLD | NEW |