| OLD | NEW |
| 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 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 #include <wtf/OwnPtr.h> | 36 #include <wtf/OwnPtr.h> |
| 37 #include <wtf/PassOwnPtr.h> | 37 #include <wtf/PassOwnPtr.h> |
| 38 #include <wtf/RefPtr.h> | 38 #include <wtf/RefPtr.h> |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 struct FilterData { | 42 struct FilterData { |
| 43 WTF_MAKE_FAST_ALLOCATED; | 43 WTF_MAKE_FAST_ALLOCATED; |
| 44 public: | 44 public: |
| 45 enum FilterDataState { PaintingSource, Applying, Built, CycleDetected, Marke
dForRemoval }; |
| 46 |
| 45 FilterData() | 47 FilterData() |
| 46 : savedContext(0) | 48 : savedContext(0) |
| 47 , isBuilt(false) | 49 , state(PaintingSource) |
| 48 , isApplying(false) | |
| 49 , markedForRemoval(false) | |
| 50 { | 50 { |
| 51 } | 51 } |
| 52 | 52 |
| 53 RefPtr<SVGFilter> filter; | 53 RefPtr<SVGFilter> filter; |
| 54 RefPtr<SVGFilterBuilder> builder; | 54 RefPtr<SVGFilterBuilder> builder; |
| 55 OwnPtr<ImageBuffer> sourceGraphicBuffer; | 55 OwnPtr<ImageBuffer> sourceGraphicBuffer; |
| 56 GraphicsContext* savedContext; | 56 GraphicsContext* savedContext; |
| 57 AffineTransform shearFreeAbsoluteTransform; | 57 AffineTransform shearFreeAbsoluteTransform; |
| 58 FloatRect boundaries; | 58 FloatRect boundaries; |
| 59 FloatSize scale; | 59 FloatSize scale; |
| 60 bool isBuilt : 1; | 60 FilterDataState state; |
| 61 bool isApplying : 1; | |
| 62 bool markedForRemoval : 1; | |
| 63 }; | 61 }; |
| 64 | 62 |
| 65 class GraphicsContext; | 63 class GraphicsContext; |
| 66 | 64 |
| 67 class RenderSVGResourceFilter : public RenderSVGResourceContainer { | 65 class RenderSVGResourceFilter : public RenderSVGResourceContainer { |
| 68 public: | 66 public: |
| 69 RenderSVGResourceFilter(SVGFilterElement*); | 67 RenderSVGResourceFilter(SVGFilterElement*); |
| 70 virtual ~RenderSVGResourceFilter(); | 68 virtual ~RenderSVGResourceFilter(); |
| 71 | 69 |
| 72 virtual const char* renderName() const { return "RenderSVGResourceFilter"; } | 70 virtual const char* renderName() const { return "RenderSVGResourceFilter"; } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 93 private: | 91 private: |
| 94 bool fitsInMaximumImageSize(const FloatSize&, FloatSize&); | 92 bool fitsInMaximumImageSize(const FloatSize&, FloatSize&); |
| 95 | 93 |
| 96 HashMap<RenderObject*, FilterData*> m_filter; | 94 HashMap<RenderObject*, FilterData*> m_filter; |
| 97 }; | 95 }; |
| 98 | 96 |
| 99 } | 97 } |
| 100 | 98 |
| 101 #endif | 99 #endif |
| 102 #endif | 100 #endif |
| OLD | NEW |