OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 University of Szeged | 2 * Copyright (C) 2010 University of Szeged |
3 * Copyright (C) 2010 Zoltan Herczeg | 3 * Copyright (C) 2010 Zoltan Herczeg |
4 * Copyright (C) 2011 Renata Hodovan (reni@webkit.org) | 4 * Copyright (C) 2011 Renata Hodovan (reni@webkit.org) |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // FEImage needs the unclipped subregion in absolute coordinates to determin
e the correct | 121 // FEImage needs the unclipped subregion in absolute coordinates to determin
e the correct |
122 // destination rect in combination with preserveAspectRatio. | 122 // destination rect in combination with preserveAspectRatio. |
123 if (effect->filterEffectType() == FilterEffectTypeImage) | 123 if (effect->filterEffectType() == FilterEffectTypeImage) |
124 static_cast<FEImage*>(effect)->setAbsoluteSubregion(absoluteSubregion); | 124 static_cast<FEImage*>(effect)->setAbsoluteSubregion(absoluteSubregion); |
125 | 125 |
126 // Clip every filter effect to the filter region. | 126 // Clip every filter effect to the filter region. |
127 FloatRect absoluteScaledFilterRegion = filter->filterRegion(); | 127 FloatRect absoluteScaledFilterRegion = filter->filterRegion(); |
128 absoluteScaledFilterRegion.scale(filterResolution.width(), filterResolution.
height()); | 128 absoluteScaledFilterRegion.scale(filterResolution.width(), filterResolution.
height()); |
129 absoluteSubregion.intersect(absoluteScaledFilterRegion); | 129 absoluteSubregion.intersect(absoluteScaledFilterRegion); |
130 | 130 |
131 effect->setMaxEffectRect(enclosingIntRect(absoluteSubregion)); | 131 effect->setMaxEffectRect(absoluteSubregion); |
132 return subregion; | 132 return subregion; |
133 } | 133 } |
134 | 134 |
135 } // namespace WebCore | 135 } // namespace WebCore |
136 | 136 |
137 #endif // ENABLE(SVG) && ENABLE(FILTERS) | 137 #endif // ENABLE(SVG) && ENABLE(FILTERS) |
OLD | NEW |