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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 AffineTransform shearAndRotate = scaleAndTranslate.inverse(); | 176 AffineTransform shearAndRotate = scaleAndTranslate.inverse(); |
177 shearAndRotate.multiply(ctm); | 177 shearAndRotate.multiply(ctm); |
178 context->setCTM(scaleAndTranslate); | 178 context->setCTM(scaleAndTranslate); |
179 imageFilter = builder.buildTransform(shearAndRotate, imageFilter.get()); | 179 imageFilter = builder.buildTransform(shearAndRotate, imageFilter.get()); |
180 } | 180 } |
181 context->beginLayer(1, CompositeSourceOver, &boundaries, ColorFilterNone, im
ageFilter.get()); | 181 context->beginLayer(1, CompositeSourceOver, &boundaries, ColorFilterNone, im
ageFilter.get()); |
182 context->endLayer(); | 182 context->endLayer(); |
183 context->restore(); | 183 context->restore(); |
184 } | 184 } |
185 | 185 |
186 bool RenderSVGResourceFilter::applyResource(RenderObject* object, RenderStyle*,
GraphicsContext*& context, unsigned short resourceMode) | 186 bool RenderSVGResourceFilter::prepareEffect(RenderObject* object, RenderStyle*,
GraphicsContext*& context) |
187 { | 187 { |
188 ASSERT(object); | 188 ASSERT(object); |
189 ASSERT(context); | 189 ASSERT(context); |
190 ASSERT_UNUSED(resourceMode, resourceMode == ApplyToDefaultMode); | |
191 | 190 |
192 clearInvalidationMask(); | 191 clearInvalidationMask(); |
193 | 192 |
194 if (m_filter.contains(object)) { | 193 if (m_filter.contains(object)) { |
195 FilterData* filterData = m_filter.get(object); | 194 FilterData* filterData = m_filter.get(object); |
196 if (filterData->state == FilterData::PaintingSource) | 195 if (filterData->state == FilterData::PaintingSource) |
197 filterData->state = FilterData::CycleDetected; | 196 filterData->state = FilterData::CycleDetected; |
198 return false; // Already built, or we're in a cycle. Regardless, just do
nothing more now. | 197 return false; // Already built, or we're in a cycle. Regardless, just do
nothing more now. |
199 } | 198 } |
200 | 199 |
(...skipping 23 matching lines...) Expand all Loading... |
224 return false; | 223 return false; |
225 | 224 |
226 lastEffect->determineFilterPrimitiveSubregion(ClipToFilterRegion); | 225 lastEffect->determineFilterPrimitiveSubregion(ClipToFilterRegion); |
227 | 226 |
228 FilterData* data = filterData.get(); | 227 FilterData* data = filterData.get(); |
229 m_filter.set(object, filterData.release()); | 228 m_filter.set(object, filterData.release()); |
230 beginDeferredFilter(context, data); | 229 beginDeferredFilter(context, data); |
231 return true; | 230 return true; |
232 } | 231 } |
233 | 232 |
234 void RenderSVGResourceFilter::postApplyResource(RenderObject* object, GraphicsCo
ntext*& context) | 233 void RenderSVGResourceFilter::finishEffect(RenderObject* object, GraphicsContext
*& context) |
235 { | 234 { |
236 ASSERT(object); | 235 ASSERT(object); |
237 ASSERT(context); | 236 ASSERT(context); |
238 | 237 |
239 FilterData* filterData = m_filter.get(object); | 238 FilterData* filterData = m_filter.get(object); |
240 if (!filterData) | 239 if (!filterData) |
241 return; | 240 return; |
242 | 241 |
243 switch (filterData->state) { | 242 switch (filterData->state) { |
244 case FilterData::CycleDetected: | 243 case FilterData::CycleDetected: |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 markAllClientLayersForInvalidation(); | 294 markAllClientLayersForInvalidation(); |
296 } | 295 } |
297 | 296 |
298 FloatRect RenderSVGResourceFilter::drawingRegion(RenderObject* object) const | 297 FloatRect RenderSVGResourceFilter::drawingRegion(RenderObject* object) const |
299 { | 298 { |
300 FilterData* filterData = m_filter.get(object); | 299 FilterData* filterData = m_filter.get(object); |
301 return filterData ? filterData->drawingRegion : FloatRect(); | 300 return filterData ? filterData->drawingRegion : FloatRect(); |
302 } | 301 } |
303 | 302 |
304 } | 303 } |
OLD | NEW |