OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above | 9 * 1. Redistributions of source code must retain the above |
10 * copyright notice, this list of conditions and the following | 10 * copyright notice, this list of conditions and the following |
(...skipping 15 matching lines...) Expand all Loading... |
26 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | 26 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
27 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 27 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
28 * SUCH DAMAGE. | 28 * SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef ReferenceFilter_h | 31 #ifndef ReferenceFilter_h |
32 #define ReferenceFilter_h | 32 #define ReferenceFilter_h |
33 | 33 |
34 #include "platform/geometry/FloatRect.h" | 34 #include "platform/geometry/FloatRect.h" |
35 #include "platform/graphics/filters/Filter.h" | 35 #include "platform/graphics/filters/Filter.h" |
| 36 #include "platform/heap/Handle.h" |
36 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
37 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
38 | 39 |
39 namespace blink { | 40 namespace blink { |
40 | 41 |
41 class SourceGraphic; | 42 class SourceGraphic; |
42 class FilterEffect; | 43 class FilterEffect; |
43 | 44 |
44 class PLATFORM_EXPORT ReferenceFilter: public Filter { | 45 class PLATFORM_EXPORT ReferenceFilter: public Filter { |
45 public: | 46 public: |
46 static PassRefPtr<ReferenceFilter> create(float scale) | 47 static PassRefPtrWillBeRawPtr<ReferenceFilter> create(float scale) |
47 { | 48 { |
48 return adoptRef(new ReferenceFilter(scale)); | 49 return adoptRefWillBeNoop(new ReferenceFilter(scale)); |
49 } | 50 } |
50 | 51 |
| 52 virtual ~ReferenceFilter(); |
| 53 virtual void trace(Visitor*) override; |
| 54 |
51 virtual IntRect sourceImageRect() const override { return IntRect(); }; | 55 virtual IntRect sourceImageRect() const override { return IntRect(); }; |
52 | 56 |
53 void setLastEffect(PassRefPtr<FilterEffect>); | 57 void setLastEffect(PassRefPtrWillBeRawPtr<FilterEffect>); |
54 FilterEffect* lastEffect() const { return m_lastEffect.get(); } | 58 FilterEffect* lastEffect() const { return m_lastEffect.get(); } |
55 | 59 |
56 SourceGraphic* sourceGraphic() const { return m_sourceGraphic.get(); } | 60 SourceGraphic* sourceGraphic() const { return m_sourceGraphic.get(); } |
57 | 61 |
58 private: | 62 private: |
59 ReferenceFilter(float scale); | 63 explicit ReferenceFilter(float scale); |
60 virtual ~ReferenceFilter(); | |
61 | 64 |
62 RefPtr<SourceGraphic> m_sourceGraphic; | 65 RefPtrWillBeMember<SourceGraphic> m_sourceGraphic; |
63 RefPtr<FilterEffect> m_lastEffect; | 66 RefPtrWillBeMember<FilterEffect> m_lastEffect; |
64 }; | 67 }; |
65 | 68 |
66 } // namespace blink | 69 } // namespace blink |
67 | 70 |
68 #endif // ReferenceFilter_h | 71 #endif // ReferenceFilter_h |
OLD | NEW |