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

Side by Side Diff: Source/core/layout/svg/LayoutSVGResourceFilter.h

Issue 1220053003: Disentangle filter content recording state from FilterData (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added test. Created 5 years, 5 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) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 10 matching lines...) Expand all
21 * Boston, MA 02110-1301, USA. 21 * Boston, MA 02110-1301, USA.
22 */ 22 */
23 23
24 #ifndef LayoutSVGResourceFilter_h 24 #ifndef LayoutSVGResourceFilter_h
25 #define LayoutSVGResourceFilter_h 25 #define LayoutSVGResourceFilter_h
26 26
27 #include "core/layout/svg/LayoutSVGResourceContainer.h" 27 #include "core/layout/svg/LayoutSVGResourceContainer.h"
28 #include "core/svg/SVGFilterElement.h" 28 #include "core/svg/SVGFilterElement.h"
29 #include "core/svg/graphics/filters/SVGFilter.h" 29 #include "core/svg/graphics/filters/SVGFilter.h"
30 #include "core/svg/graphics/filters/SVGFilterBuilder.h" 30 #include "core/svg/graphics/filters/SVGFilterBuilder.h"
31 #include "platform/graphics/GraphicsContext.h"
32 #include "platform/graphics/paint/DisplayItemList.h"
33 31
34 namespace blink { 32 namespace blink {
35 33
36 class FilterData final : public NoBaseWillBeGarbageCollectedFinalized<FilterData > { 34 class FilterData final : public NoBaseWillBeGarbageCollectedFinalized<FilterData > {
37 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(FilterData); 35 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(FilterData);
38 public: 36 public:
39 /* 37 /*
40 * The state transitions should follow the following: 38 * The state transitions should follow the following:
41 * Initial -> RecordingContent -> ReadyToPaint -> PaintingFilter -> ReadyToP aint 39 * Initial -> RecordingContent -> ReadyToPaint -> PaintingFilter -> ReadyToP aint
42 * | ^ | ^ 40 * | ^ | ^
(...skipping 13 matching lines...) Expand all
56 { 54 {
57 return adoptPtrWillBeNoop(new FilterData()); 55 return adoptPtrWillBeNoop(new FilterData());
58 } 56 }
59 57
60 void dispose(); 58 void dispose();
61 59
62 DECLARE_TRACE(); 60 DECLARE_TRACE();
63 61
64 RefPtrWillBeMember<SVGFilter> filter; 62 RefPtrWillBeMember<SVGFilter> filter;
65 RefPtrWillBeMember<SVGFilterBuilder> builder; 63 RefPtrWillBeMember<SVGFilterBuilder> builder;
66 OwnPtr<DisplayItemList> m_displayItemList;
67 OwnPtr<GraphicsContext> m_context;
68 FilterDataState m_state; 64 FilterDataState m_state;
69 65
70 private: 66 private:
71 FilterData() : m_state(Initial) { } 67 FilterData() : m_state(Initial) { }
72 }; 68 };
73 69
74 class LayoutSVGResourceFilter final : public LayoutSVGResourceContainer { 70 class LayoutSVGResourceFilter final : public LayoutSVGResourceContainer {
75 public: 71 public:
76 explicit LayoutSVGResourceFilter(SVGFilterElement*); 72 explicit LayoutSVGResourceFilter(SVGFilterElement*);
77 73
(...skipping 30 matching lines...) Expand all
108 104
109 using FilterMap = WillBePersistentHeapHashMap<LayoutObject*, OwnPtrWillBeMem ber<FilterData>>; 105 using FilterMap = WillBePersistentHeapHashMap<LayoutObject*, OwnPtrWillBeMem ber<FilterData>>;
110 FilterMap m_filter; 106 FilterMap m_filter;
111 }; 107 };
112 108
113 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGResourceFilter, isSVGResourceFilter()); 109 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGResourceFilter, isSVGResourceFilter());
114 110
115 } 111 }
116 112
117 #endif 113 #endif
OLDNEW
« no previous file with comments | « LayoutTests/svg/filters/filtered-animated-image-crash-expected.txt ('k') | Source/core/layout/svg/LayoutSVGResourceFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698