| 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 16 matching lines...) Expand all Loading... |
| 27 #include "core/rendering/svg/RenderSVGResourceContainer.h" | 27 #include "core/rendering/svg/RenderSVGResourceContainer.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 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 struct FilterData { | 34 struct FilterData { |
| 35 WTF_MAKE_FAST_ALLOCATED; | 35 WTF_MAKE_FAST_ALLOCATED; |
| 36 public: | 36 public: |
| 37 enum FilterDataState { PaintingSource, Applying, Built, CycleDetected, Marke
dForRemoval }; | 37 enum FilterDataState { PaintingSource, Applying, Built, CycleDetected }; |
| 38 | 38 |
| 39 FilterData() | 39 FilterData() |
| 40 : savedContext(0) | 40 : state(PaintingSource) |
| 41 , state(PaintingSource) | |
| 42 { | 41 { |
| 43 } | 42 } |
| 44 | 43 |
| 45 RefPtr<SVGFilter> filter; | 44 RefPtr<SVGFilter> filter; |
| 46 RefPtr<SVGFilterBuilder> builder; | 45 RefPtr<SVGFilterBuilder> builder; |
| 47 OwnPtr<ImageBuffer> sourceGraphicBuffer; | |
| 48 GraphicsContext* savedContext; | |
| 49 AffineTransform shearFreeAbsoluteTransform; | |
| 50 FloatRect boundaries; | 46 FloatRect boundaries; |
| 51 FloatRect drawingRegion; | 47 FloatRect drawingRegion; |
| 52 FloatSize scale; | |
| 53 FilterDataState state; | 48 FilterDataState state; |
| 54 }; | 49 }; |
| 55 | 50 |
| 56 class GraphicsContext; | 51 class GraphicsContext; |
| 57 | 52 |
| 58 class RenderSVGResourceFilter FINAL : public RenderSVGResourceContainer { | 53 class RenderSVGResourceFilter FINAL : public RenderSVGResourceContainer { |
| 59 public: | 54 public: |
| 60 explicit RenderSVGResourceFilter(SVGFilterElement*); | 55 explicit RenderSVGResourceFilter(SVGFilterElement*); |
| 61 virtual ~RenderSVGResourceFilter(); | 56 virtual ~RenderSVGResourceFilter(); |
| 62 virtual void destroy() OVERRIDE; | 57 virtual void destroy() OVERRIDE; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 79 SVGUnitTypes::SVGUnitType filterUnits() const { return toSVGFilterElement(el
ement())->filterUnits()->currentValue()->enumValue(); } | 74 SVGUnitTypes::SVGUnitType filterUnits() const { return toSVGFilterElement(el
ement())->filterUnits()->currentValue()->enumValue(); } |
| 80 SVGUnitTypes::SVGUnitType primitiveUnits() const { return toSVGFilterElement
(element())->primitiveUnits()->currentValue()->enumValue(); } | 75 SVGUnitTypes::SVGUnitType primitiveUnits() const { return toSVGFilterElement
(element())->primitiveUnits()->currentValue()->enumValue(); } |
| 81 | 76 |
| 82 void primitiveAttributeChanged(RenderObject*, const QualifiedName&); | 77 void primitiveAttributeChanged(RenderObject*, const QualifiedName&); |
| 83 | 78 |
| 84 virtual RenderSVGResourceType resourceType() const OVERRIDE { return s_resou
rceType; } | 79 virtual RenderSVGResourceType resourceType() const OVERRIDE { return s_resou
rceType; } |
| 85 static const RenderSVGResourceType s_resourceType; | 80 static const RenderSVGResourceType s_resourceType; |
| 86 | 81 |
| 87 FloatRect drawingRegion(RenderObject*) const; | 82 FloatRect drawingRegion(RenderObject*) const; |
| 88 private: | 83 private: |
| 89 void adjustScaleForMaximumImageSize(const FloatSize&, FloatSize&); | |
| 90 | |
| 91 typedef HashMap<RenderObject*, OwnPtr<FilterData> > FilterMap; | 84 typedef HashMap<RenderObject*, OwnPtr<FilterData> > FilterMap; |
| 92 FilterMap m_filter; | 85 FilterMap m_filter; |
| 93 }; | 86 }; |
| 94 | 87 |
| 95 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceFilter, isSVGResourceFilter()); | 88 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceFilter, isSVGResourceFilter()); |
| 96 | 89 |
| 97 } | 90 } |
| 98 | 91 |
| 99 #endif | 92 #endif |
| OLD | NEW |