OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> | 2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> |
3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "wtf/PassRefPtr.h" | 28 #include "wtf/PassRefPtr.h" |
29 #include "wtf/text/AtomicStringHash.h" | 29 #include "wtf/text/AtomicStringHash.h" |
30 #include "wtf/text/WTFString.h" | 30 #include "wtf/text/WTFString.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class LayoutObject; | 34 class LayoutObject; |
35 | 35 |
36 class SVGFilterBuilder final : public RefCountedWillBeGarbageCollectedFinalized<
SVGFilterBuilder> { | 36 class SVGFilterBuilder final : public RefCountedWillBeGarbageCollectedFinalized<
SVGFilterBuilder> { |
37 public: | 37 public: |
38 typedef WillBeHeapHashSet<RawPtrWillBeMember<FilterEffect> > FilterEffectSet
; | 38 typedef WillBeHeapHashSet<RawPtrWillBeMember<FilterEffect>> FilterEffectSet; |
39 | 39 |
40 static PassRefPtrWillBeRawPtr<SVGFilterBuilder> create(PassRefPtrWillBeRawPt
r<FilterEffect> sourceGraphic, PassRefPtrWillBeRawPtr<FilterEffect> sourceAlpha) | 40 static PassRefPtrWillBeRawPtr<SVGFilterBuilder> create(PassRefPtrWillBeRawPt
r<FilterEffect> sourceGraphic, PassRefPtrWillBeRawPtr<FilterEffect> sourceAlpha) |
41 { | 41 { |
42 return adoptRefWillBeNoop(new SVGFilterBuilder(sourceGraphic, sourceAlph
a)); | 42 return adoptRefWillBeNoop(new SVGFilterBuilder(sourceGraphic, sourceAlph
a)); |
43 } | 43 } |
44 | 44 |
45 void add(const AtomicString& id, PassRefPtrWillBeRawPtr<FilterEffect>); | 45 void add(const AtomicString& id, PassRefPtrWillBeRawPtr<FilterEffect>); |
46 | 46 |
47 FilterEffect* getEffectById(const AtomicString& id) const; | 47 FilterEffect* getEffectById(const AtomicString& id) const; |
48 FilterEffect* lastEffect() const { return m_lastEffect.get(); } | 48 FilterEffect* lastEffect() const { return m_lastEffect.get(); } |
(...skipping 17 matching lines...) Expand all Loading... |
66 | 66 |
67 private: | 67 private: |
68 SVGFilterBuilder(PassRefPtrWillBeRawPtr<FilterEffect> sourceGraphic, PassRef
PtrWillBeRawPtr<FilterEffect> sourceAlpha); | 68 SVGFilterBuilder(PassRefPtrWillBeRawPtr<FilterEffect> sourceGraphic, PassRef
PtrWillBeRawPtr<FilterEffect> sourceAlpha); |
69 | 69 |
70 inline void addBuiltinEffects() | 70 inline void addBuiltinEffects() |
71 { | 71 { |
72 for (const auto& entry : m_builtinEffects) | 72 for (const auto& entry : m_builtinEffects) |
73 m_effectReferences.add(entry.value, FilterEffectSet()); | 73 m_effectReferences.add(entry.value, FilterEffectSet()); |
74 } | 74 } |
75 | 75 |
76 typedef WillBeHeapHashMap<AtomicString, RefPtrWillBeMember<FilterEffect> > N
amedFilterEffectMap; | 76 typedef WillBeHeapHashMap<AtomicString, RefPtrWillBeMember<FilterEffect>> Na
medFilterEffectMap; |
77 | 77 |
78 NamedFilterEffectMap m_builtinEffects; | 78 NamedFilterEffectMap m_builtinEffects; |
79 NamedFilterEffectMap m_namedEffects; | 79 NamedFilterEffectMap m_namedEffects; |
80 // The value is a list, which contains those filter effects, | 80 // The value is a list, which contains those filter effects, |
81 // which depends on the key filter effect. | 81 // which depends on the key filter effect. |
82 WillBeHeapHashMap<RefPtrWillBeMember<FilterEffect>, FilterEffectSet> m_effec
tReferences; | 82 WillBeHeapHashMap<RefPtrWillBeMember<FilterEffect>, FilterEffectSet> m_effec
tReferences; |
83 WillBeHeapHashMap<LayoutObject*, RawPtrWillBeMember<FilterEffect>> m_effectR
enderer; | 83 WillBeHeapHashMap<LayoutObject*, RawPtrWillBeMember<FilterEffect>> m_effectR
enderer; |
84 | 84 |
85 RefPtrWillBeMember<FilterEffect> m_lastEffect; | 85 RefPtrWillBeMember<FilterEffect> m_lastEffect; |
86 }; | 86 }; |
87 | 87 |
88 } // namespace blink | 88 } // namespace blink |
89 | 89 |
90 #endif // SVGFilterBuilder_h | 90 #endif // SVGFilterBuilder_h |
OLD | NEW |