Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: Source/core/rendering/RenderLayerFilterInfo.h

Issue 15556002: Refactoring: Generalize CachedSVGDocument for non-SVG use. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Resolved the conflict. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/FilterEffectRenderer.cpp ('k') | Source/core/rendering/RenderLayerFilterInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698