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

Side by Side Diff: Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp

Issue 9839023: Revert 102385 - Use Skia's implementation of Gaussian blur when accelerated filters (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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) 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
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
283 FilterEffect* in = inputEffect(0); 276 FilterEffect* in = inputEffect(0);
284 277
285 ByteArray* srcPixelArray = createPremultipliedImageResult(); 278 ByteArray* srcPixelArray = createPremultipliedImageResult();
286 if (!srcPixelArray) 279 if (!srcPixelArray)
287 return; 280 return;
288 281
289 setIsAlphaImage(in->isAlphaImage()); 282 setIsAlphaImage(in->isAlphaImage());
290 283
291 IntRect effectDrawingRect = requestedRegionOfInputImageData(in->absolutePain tRect()); 284 IntRect effectDrawingRect = requestedRegionOfInputImageData(in->absolutePain tRect());
292 in->copyPremultipliedImage(srcPixelArray, effectDrawingRect); 285 in->copyPremultipliedImage(srcPixelArray, effectDrawingRect);
(...skipping 28 matching lines...) Expand all
321 314
322 float FEGaussianBlur::calculateStdDeviation(float radius) 315 float FEGaussianBlur::calculateStdDeviation(float radius)
323 { 316 {
324 // Blur radius represents 2/3 times the kernel size, the dest pixel is half of the radius applied 3 times 317 // Blur radius represents 2/3 times the kernel size, the dest pixel is half of the radius applied 3 times
325 return max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f); 318 return max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f);
326 } 319 }
327 320
328 } // namespace WebCore 321 } // namespace WebCore
329 322
330 #endif // ENABLE(FILTERS) 323 #endif // ENABLE(FILTERS)
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/filters/FEGaussianBlur.h ('k') | Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698