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) 2010 Igalia, S.L. | 6 * Copyright (C) 2010 Igalia, S.L. |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 calculateKernelSize(filter(), kernelSizeX, kernelSizeY, m_stdX, m_stdY); | 266 calculateKernelSize(filter(), kernelSizeX, kernelSizeY, m_stdX, m_stdY); |
267 | 267 |
268 // We take the half kernel size and multiply it with three, because we run b
ox blur three times. | 268 // We take the half kernel size and multiply it with three, because we run b
ox blur three times. |
269 absolutePaintRect.inflateX(3 * kernelSizeX * 0.5f); | 269 absolutePaintRect.inflateX(3 * kernelSizeX * 0.5f); |
270 absolutePaintRect.inflateY(3 * kernelSizeY * 0.5f); | 270 absolutePaintRect.inflateY(3 * kernelSizeY * 0.5f); |
271 setAbsolutePaintRect(enclosingIntRect(absolutePaintRect)); | 271 setAbsolutePaintRect(enclosingIntRect(absolutePaintRect)); |
272 } | 272 } |
273 | 273 |
274 void FEGaussianBlur::platformApplySoftware() | 274 void FEGaussianBlur::platformApplySoftware() |
275 { | 275 { |
| 276 #if USE(SKIA) |
| 277 if (filter()->renderingMode() == Accelerated) { |
| 278 platformApplySkia(); |
| 279 return; |
| 280 } |
| 281 #endif |
| 282 |
276 FilterEffect* in = inputEffect(0); | 283 FilterEffect* in = inputEffect(0); |
277 | 284 |
278 ByteArray* srcPixelArray = createPremultipliedImageResult(); | 285 ByteArray* srcPixelArray = createPremultipliedImageResult(); |
279 if (!srcPixelArray) | 286 if (!srcPixelArray) |
280 return; | 287 return; |
281 | 288 |
282 setIsAlphaImage(in->isAlphaImage()); | 289 setIsAlphaImage(in->isAlphaImage()); |
283 | 290 |
284 IntRect effectDrawingRect = requestedRegionOfInputImageData(in->absolutePain
tRect()); | 291 IntRect effectDrawingRect = requestedRegionOfInputImageData(in->absolutePain
tRect()); |
285 in->copyPremultipliedImage(srcPixelArray, effectDrawingRect); | 292 in->copyPremultipliedImage(srcPixelArray, effectDrawingRect); |
(...skipping 28 matching lines...) Expand all Loading... |
314 | 321 |
315 float FEGaussianBlur::calculateStdDeviation(float radius) | 322 float FEGaussianBlur::calculateStdDeviation(float radius) |
316 { | 323 { |
317 // Blur radius represents 2/3 times the kernel size, the dest pixel is half
of the radius applied 3 times | 324 // Blur radius represents 2/3 times the kernel size, the dest pixel is half
of the radius applied 3 times |
318 return max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f); | 325 return max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f); |
319 } | 326 } |
320 | 327 |
321 } // namespace WebCore | 328 } // namespace WebCore |
322 | 329 |
323 #endif // ENABLE(FILTERS) | 330 #endif // ENABLE(FILTERS) |
OLD | NEW |