| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
| 9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
| 10 * disclaimer. | 10 * disclaimer. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
| 25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF | 25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF |
| 26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 26 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 27 * SUCH DAMAGE. | 27 * SUCH DAMAGE. |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #ifndef RenderLayerFilterInfo_h | 30 #ifndef RenderLayerFilterInfo_h |
| 31 #define RenderLayerFilterInfo_h | 31 #define RenderLayerFilterInfo_h |
| 32 | 32 |
| 33 #include "core/dom/Element.h" | 33 #include "core/dom/Element.h" |
| 34 #include "core/loader/cache/CachedSVGDocument.h" | 34 #include "core/loader/cache/CachedDocument.h" |
| 35 #include "core/platform/graphics/LayoutRect.h" | 35 #include "core/platform/graphics/LayoutRect.h" |
| 36 #include "core/platform/graphics/filters/FilterOperation.h" | 36 #include "core/platform/graphics/filters/FilterOperation.h" |
| 37 #include "core/platform/graphics/filters/custom/CustomFilterProgramClient.h" | 37 #include "core/platform/graphics/filters/custom/CustomFilterProgramClient.h" |
| 38 #include <wtf/HashMap.h> | 38 #include <wtf/HashMap.h> |
| 39 #include <wtf/PassRefPtr.h> | 39 #include <wtf/PassRefPtr.h> |
| 40 #include <wtf/RefPtr.h> | 40 #include <wtf/RefPtr.h> |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 | 43 |
| 44 class FilterEffectRenderer; | 44 class FilterEffectRenderer; |
| 45 class FilterOperations; | 45 class FilterOperations; |
| 46 class RenderLayer; | 46 class RenderLayer; |
| 47 class RenderLayerFilterInfo; | 47 class RenderLayerFilterInfo; |
| 48 | 48 |
| 49 typedef HashMap<const RenderLayer*, RenderLayerFilterInfo*> RenderLayerFilterInf
oMap; | 49 typedef HashMap<const RenderLayer*, RenderLayerFilterInfo*> RenderLayerFilterInf
oMap; |
| 50 | 50 |
| 51 class RenderLayerFilterInfo : public CustomFilterProgramClient, public CachedSVG
DocumentClient { | 51 class RenderLayerFilterInfo : public CustomFilterProgramClient, public CachedDoc
umentClient { |
| 52 public: | 52 public: |
| 53 static RenderLayerFilterInfo* filterInfoForRenderLayer(const RenderLayer*); | 53 static RenderLayerFilterInfo* filterInfoForRenderLayer(const RenderLayer*); |
| 54 static RenderLayerFilterInfo* createFilterInfoForRenderLayerIfNeeded(RenderL
ayer*); | 54 static RenderLayerFilterInfo* createFilterInfoForRenderLayerIfNeeded(RenderL
ayer*); |
| 55 static void removeFilterInfoForRenderLayer(RenderLayer*); | 55 static void removeFilterInfoForRenderLayer(RenderLayer*); |
| 56 | 56 |
| 57 const LayoutRect& dirtySourceRect() const { return m_dirtySourceRect; } | 57 const LayoutRect& dirtySourceRect() const { return m_dirtySourceRect; } |
| 58 void expandDirtySourceRect(const LayoutRect& rect) { m_dirtySourceRect.unite
(rect); } | 58 void expandDirtySourceRect(const LayoutRect& rect) { m_dirtySourceRect.unite
(rect); } |
| 59 void resetDirtySourceRect() { m_dirtySourceRect = LayoutRect(); } | 59 void resetDirtySourceRect() { m_dirtySourceRect = LayoutRect(); } |
| 60 | 60 |
| 61 FilterEffectRenderer* renderer() const { return m_renderer.get(); } | 61 FilterEffectRenderer* renderer() const { return m_renderer.get(); } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 78 RenderLayer* m_layer; | 78 RenderLayer* m_layer; |
| 79 | 79 |
| 80 RefPtr<FilterEffectRenderer> m_renderer; | 80 RefPtr<FilterEffectRenderer> m_renderer; |
| 81 LayoutRect m_dirtySourceRect; | 81 LayoutRect m_dirtySourceRect; |
| 82 | 82 |
| 83 typedef Vector<RefPtr<CustomFilterProgram> > CustomFilterProgramList; | 83 typedef Vector<RefPtr<CustomFilterProgram> > CustomFilterProgramList; |
| 84 CustomFilterProgramList m_cachedCustomFilterPrograms; | 84 CustomFilterProgramList m_cachedCustomFilterPrograms; |
| 85 | 85 |
| 86 static RenderLayerFilterInfoMap* s_filterMap; | 86 static RenderLayerFilterInfoMap* s_filterMap; |
| 87 Vector<RefPtr<Element> > m_internalSVGReferences; | 87 Vector<RefPtr<Element> > m_internalSVGReferences; |
| 88 Vector<CachedResourceHandle<CachedSVGDocument> > m_externalSVGReferences; | 88 Vector<CachedResourceHandle<CachedDocument> > m_externalSVGReferences; |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 } // namespace WebCore | 91 } // namespace WebCore |
| 92 | 92 |
| 93 | 93 |
| 94 #endif // RenderLayerFilterInfo_h | 94 #endif // RenderLayerFilterInfo_h |
| OLD | NEW |