OLD | NEW |
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 * Copyright (C) 2013 Google Inc. All rights reserved. | 5 * Copyright (C) 2013 Google Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 bool clipsToBounds() const { return m_clipsToBounds; } | 97 bool clipsToBounds() const { return m_clipsToBounds; } |
98 void setClipsToBounds(bool value) { m_clipsToBounds = value; } | 98 void setClipsToBounds(bool value) { m_clipsToBounds = value; } |
99 | 99 |
100 ColorSpace operatingColorSpace() const { return m_operatingColorSpace; } | 100 ColorSpace operatingColorSpace() const { return m_operatingColorSpace; } |
101 virtual void setOperatingColorSpace(ColorSpace colorSpace) { | 101 virtual void setOperatingColorSpace(ColorSpace colorSpace) { |
102 m_operatingColorSpace = colorSpace; | 102 m_operatingColorSpace = colorSpace; |
103 } | 103 } |
104 | 104 |
105 virtual bool affectsTransparentPixels() const { return false; } | 105 virtual bool affectsTransparentPixels() const { return false; } |
106 | 106 |
107 // Return false if the filter will only operate correctly on valid RGBA values
, with | 107 // Return false if the filter will only operate correctly on valid RGBA |
108 // alpha in [0,255] and each color component in [0, alpha]. | 108 // values, with alpha in [0,255] and each color component in [0, alpha]. |
109 virtual bool mayProduceInvalidPreMultipliedPixels() { return false; } | 109 virtual bool mayProduceInvalidPreMultipliedPixels() { return false; } |
110 | 110 |
111 SkImageFilter* getImageFilter(ColorSpace, | 111 SkImageFilter* getImageFilter(ColorSpace, |
112 bool requiresPMColorValidation) const; | 112 bool requiresPMColorValidation) const; |
113 void setImageFilter(ColorSpace, | 113 void setImageFilter(ColorSpace, |
114 bool requiresPMColorValidation, | 114 bool requiresPMColorValidation, |
115 sk_sp<SkImageFilter>); | 115 sk_sp<SkImageFilter>); |
116 | 116 |
117 bool originTainted() const { return m_originTainted; } | 117 bool originTainted() const { return m_originTainted; } |
118 void setOriginTainted() { m_originTainted = true; } | 118 void setOriginTainted() { m_originTainted = true; } |
(...skipping 18 matching lines...) Expand all Loading... |
137 | 137 |
138 Color adaptColorToOperatingColorSpace(const Color& deviceColor); | 138 Color adaptColorToOperatingColorSpace(const Color& deviceColor); |
139 | 139 |
140 SkImageFilter::CropRect getCropRect() const; | 140 SkImageFilter::CropRect getCropRect() const; |
141 | 141 |
142 private: | 142 private: |
143 FilterEffectVector m_inputEffects; | 143 FilterEffectVector m_inputEffects; |
144 | 144 |
145 Member<Filter> m_filter; | 145 Member<Filter> m_filter; |
146 | 146 |
147 // The following member variables are SVG specific and will move to LayoutSVGR
esourceFilterPrimitive. | 147 // The following member variables are SVG specific and will move to |
| 148 // LayoutSVGResourceFilterPrimitive. |
148 // See bug https://bugs.webkit.org/show_bug.cgi?id=45614. | 149 // See bug https://bugs.webkit.org/show_bug.cgi?id=45614. |
149 | 150 |
150 // The subregion of a filter primitive according to the SVG Filter specificati
on in local coordinates. | 151 // The subregion of a filter primitive according to the SVG Filter |
151 // This is SVG specific and needs to move to LayoutSVGResourceFilterPrimitive. | 152 // specification in local coordinates. |
152 FloatRect m_filterPrimitiveSubregion; | 153 FloatRect m_filterPrimitiveSubregion; |
153 | 154 |
154 // Should the effect clip to its primitive region, or expand to use the combin
ed region of its inputs. | 155 // Whether the effect should clip to its primitive region, or expand to use |
| 156 // the combined region of its inputs. |
155 bool m_clipsToBounds; | 157 bool m_clipsToBounds; |
156 | 158 |
157 bool m_originTainted; | 159 bool m_originTainted; |
158 | 160 |
159 ColorSpace m_operatingColorSpace; | 161 ColorSpace m_operatingColorSpace; |
160 | 162 |
161 sk_sp<SkImageFilter> m_imageFilters[4]; | 163 sk_sp<SkImageFilter> m_imageFilters[4]; |
162 }; | 164 }; |
163 | 165 |
164 } // namespace blink | 166 } // namespace blink |
165 | 167 |
166 #endif // FilterEffect_h | 168 #endif // FilterEffect_h |
OLD | NEW |