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

Side by Side Diff: Source/WebCore/platform/graphics/filters/FilterEffect.h

Issue 6949013: Merge 85926 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> 2 * Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com>
3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 14 matching lines...) Expand all
25 #if ENABLE(FILTERS) 25 #if ENABLE(FILTERS)
26 #include "FloatRect.h" 26 #include "FloatRect.h"
27 #include "IntRect.h" 27 #include "IntRect.h"
28 28
29 #include <wtf/ByteArray.h> 29 #include <wtf/ByteArray.h>
30 #include <wtf/PassOwnPtr.h> 30 #include <wtf/PassOwnPtr.h>
31 #include <wtf/RefCounted.h> 31 #include <wtf/RefCounted.h>
32 #include <wtf/RefPtr.h> 32 #include <wtf/RefPtr.h>
33 #include <wtf/Vector.h> 33 #include <wtf/Vector.h>
34 34
35 static const float kMaxFilterSize = 5000.0f;
36
35 namespace WebCore { 37 namespace WebCore {
36 38
37 class Filter; 39 class Filter;
38 class FilterEffect; 40 class FilterEffect;
39 class ImageBuffer; 41 class ImageBuffer;
40 class TextStream; 42 class TextStream;
41 43
42 typedef Vector<RefPtr<FilterEffect> > FilterEffectVector; 44 typedef Vector<RefPtr<FilterEffect> > FilterEffectVector;
43 45
44 enum FilterEffectType { 46 enum FilterEffectType {
(...skipping 22 matching lines...) Expand all
67 IntRect drawingRegionOfInputImage(const IntRect&) const; 69 IntRect drawingRegionOfInputImage(const IntRect&) const;
68 IntRect requestedRegionOfInputImageData(const IntRect&) const; 70 IntRect requestedRegionOfInputImageData(const IntRect&) const;
69 71
70 // Solid black image with different alpha values. 72 // Solid black image with different alpha values.
71 bool isAlphaImage() const { return m_alphaImage; } 73 bool isAlphaImage() const { return m_alphaImage; }
72 void setIsAlphaImage(bool alphaImage) { m_alphaImage = alphaImage; } 74 void setIsAlphaImage(bool alphaImage) { m_alphaImage = alphaImage; }
73 75
74 IntRect absolutePaintRect() const { return m_absolutePaintRect; } 76 IntRect absolutePaintRect() const { return m_absolutePaintRect; }
75 void setAbsolutePaintRect(const IntRect& absolutePaintRect) { m_absolutePain tRect = absolutePaintRect; } 77 void setAbsolutePaintRect(const IntRect& absolutePaintRect) { m_absolutePain tRect = absolutePaintRect; }
76 78
77 IntRect maxEffectRect() const { return m_maxEffectRect; } 79 FloatRect maxEffectRect() const { return m_maxEffectRect; }
78 void setMaxEffectRect(const IntRect& maxEffectRect) { m_maxEffectRect = maxE ffectRect; } 80 void setMaxEffectRect(const FloatRect& maxEffectRect) { m_maxEffectRect = ma xEffectRect; }
79 81
80 virtual void apply() = 0; 82 virtual void apply() = 0;
81 virtual void dump() = 0; 83 virtual void dump() = 0;
82 84
83 virtual void determineAbsolutePaintRect(); 85 virtual void determineAbsolutePaintRect();
84 86
85 virtual FilterEffectType filterEffectType() const { return FilterEffectTypeU nknown; } 87 virtual FilterEffectType filterEffectType() const { return FilterEffectTypeU nknown; }
86 88
87 virtual TextStream& externalRepresentation(TextStream&, int indention = 0) c onst; 89 virtual TextStream& externalRepresentation(TextStream&, int indention = 0) c onst;
88 90
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 RefPtr<ByteArray> m_unmultipliedImageResult; 123 RefPtr<ByteArray> m_unmultipliedImageResult;
122 RefPtr<ByteArray> m_premultipliedImageResult; 124 RefPtr<ByteArray> m_premultipliedImageResult;
123 FilterEffectVector m_inputEffects; 125 FilterEffectVector m_inputEffects;
124 126
125 bool m_alphaImage; 127 bool m_alphaImage;
126 128
127 IntRect m_absolutePaintRect; 129 IntRect m_absolutePaintRect;
128 130
129 // The maximum size of a filter primitive. In SVG this is the primitive subr egion in absolute coordinate space. 131 // The maximum size of a filter primitive. In SVG this is the primitive subr egion in absolute coordinate space.
130 // The absolute paint rect should never be bigger than m_maxEffectRect. 132 // The absolute paint rect should never be bigger than m_maxEffectRect.
131 IntRect m_maxEffectRect; 133 FloatRect m_maxEffectRect;
132 Filter* m_filter; 134 Filter* m_filter;
133 135
134 private: 136 private:
135 inline void copyImageBytes(ByteArray* source, ByteArray* destination, const IntRect&); 137 inline void copyImageBytes(ByteArray* source, ByteArray* destination, const IntRect&);
136 138
137 // The following member variables are SVG specific and will move to RenderSV GResourceFilterPrimitive. 139 // The following member variables are SVG specific and will move to RenderSV GResourceFilterPrimitive.
138 // See bug https://bugs.webkit.org/show_bug.cgi?id=45614. 140 // See bug https://bugs.webkit.org/show_bug.cgi?id=45614.
139 141
140 // The subregion of a filter primitive according to the SVG Filter specifica tion in local coordinates. 142 // The subregion of a filter primitive according to the SVG Filter specifica tion in local coordinates.
141 // This is SVG specific and needs to move to RenderSVGResourceFilterPrimitiv e. 143 // This is SVG specific and needs to move to RenderSVGResourceFilterPrimitiv e.
142 FloatRect m_filterPrimitiveSubregion; 144 FloatRect m_filterPrimitiveSubregion;
143 145
144 // x, y, width and height of the actual SVGFE*Element. Is needed to determin e the subregion of the 146 // x, y, width and height of the actual SVGFE*Element. Is needed to determin e the subregion of the
145 // filter primitive on a later step. 147 // filter primitive on a later step.
146 FloatRect m_effectBoundaries; 148 FloatRect m_effectBoundaries;
147 bool m_hasX; 149 bool m_hasX;
148 bool m_hasY; 150 bool m_hasY;
149 bool m_hasWidth; 151 bool m_hasWidth;
150 bool m_hasHeight; 152 bool m_hasHeight;
151 }; 153 };
152 154
153 } // namespace WebCore 155 } // namespace WebCore
154 156
155 #endif // ENABLE(FILTERS) 157 #endif // ENABLE(FILTERS)
156 158
157 #endif // FilterEffect_h 159 #endif // FilterEffect_h
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/filters/FETurbulence.h ('k') | Source/WebCore/platform/graphics/filters/FilterEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698