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 9837019: Revert 104566 - Source/WebCore: [Skia] Switch FEColorMatrix to use a skia-based implementation when (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
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
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)
OLDNEW
« no previous file with comments | « Source/WebCore/platform/graphics/filters/FEGaussianBlur.h ('k') | Source/WebCore/platform/graphics/filters/FilterEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698