| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef FilterEffectBuilder_h | 26 #ifndef FilterEffectBuilder_h |
| 27 #define FilterEffectBuilder_h | 27 #define FilterEffectBuilder_h |
| 28 | 28 |
| 29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
| 30 #include "platform/graphics/filters/FilterEffect.h" | 30 #include "platform/graphics/filters/FilterEffect.h" |
| 31 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
| 32 #include "wtf/Vector.h" | |
| 33 | 32 |
| 34 class SkPaint; | 33 class SkPaint; |
| 35 | 34 |
| 36 namespace blink { | 35 namespace blink { |
| 37 | 36 |
| 38 class Filter; | |
| 39 class FilterOperations; | 37 class FilterOperations; |
| 40 class Element; | 38 class Element; |
| 41 | 39 |
| 42 class CORE_EXPORT FilterEffectBuilder final : public GarbageCollectedFinalized<F
ilterEffectBuilder> { | 40 class CORE_EXPORT FilterEffectBuilder final : public GarbageCollectedFinalized<F
ilterEffectBuilder> { |
| 43 public: | 41 public: |
| 44 static FilterEffectBuilder* create() | 42 static FilterEffectBuilder* create() |
| 45 { | 43 { |
| 46 return new FilterEffectBuilder(); | 44 return new FilterEffectBuilder(); |
| 47 } | 45 } |
| 48 | 46 |
| 49 virtual ~FilterEffectBuilder(); | 47 virtual ~FilterEffectBuilder(); |
| 50 DECLARE_TRACE(); | 48 DECLARE_TRACE(); |
| 51 | 49 |
| 52 bool build(Element*, const FilterOperations&, float zoom, const FloatSize* r
eferenceBoxSize = nullptr, const SkPaint* fillPaint = nullptr, const SkPaint* st
rokePaint = nullptr); | 50 bool build(Element*, const FilterOperations&, float zoom, const FloatSize* r
eferenceBoxSize = nullptr, const SkPaint* fillPaint = nullptr, const SkPaint* st
rokePaint = nullptr); |
| 53 | 51 |
| 54 FilterEffect* lastEffect() const | 52 FilterEffect* lastEffect() const |
| 55 { | 53 { |
| 56 return m_lastEffect; | 54 return m_lastEffect; |
| 57 } | 55 } |
| 58 | 56 |
| 59 private: | 57 private: |
| 60 FilterEffectBuilder(); | 58 FilterEffectBuilder(); |
| 61 | 59 |
| 62 Member<FilterEffect> m_lastEffect; | 60 Member<FilterEffect> m_lastEffect; |
| 63 HeapVector<Member<Filter>> m_referenceFilters; | |
| 64 }; | 61 }; |
| 65 | 62 |
| 66 } // namespace blink | 63 } // namespace blink |
| 67 | 64 |
| 68 #endif // FilterEffectBuilder_h | 65 #endif // FilterEffectBuilder_h |
| OLD | NEW |