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 * Copyright (C) 2013 Google Inc. All rights reserved. | 8 * Copyright (C) 2013 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 | 27 |
28 #include "core/platform/graphics/filters/FEGaussianBlur.h" | 28 #include "core/platform/graphics/filters/FEGaussianBlur.h" |
29 | 29 |
30 #include "core/platform/graphics/GraphicsContext.h" | 30 #include "core/platform/graphics/GraphicsContext.h" |
31 #include "core/platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h" | 31 #include "core/platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h" |
32 #include "core/platform/graphics/filters/Filter.h" | 32 #include "core/platform/graphics/filters/Filter.h" |
33 #include "core/platform/graphics/filters/SkiaImageFilterBuilder.h" | 33 #include "core/platform/graphics/filters/SkiaImageFilterBuilder.h" |
34 #include "core/rendering/RenderTreeAsText.h" | |
35 #include "platform/text/TextStream.h" | 34 #include "platform/text/TextStream.h" |
36 #include "wtf/MathExtras.h" | 35 #include "wtf/MathExtras.h" |
37 #include "wtf/ParallelJobs.h" | 36 #include "wtf/ParallelJobs.h" |
38 #include "wtf/Uint8ClampedArray.h" | 37 #include "wtf/Uint8ClampedArray.h" |
39 | 38 |
40 #include "SkBlurImageFilter.h" | 39 #include "SkBlurImageFilter.h" |
41 | 40 |
42 using namespace std; | 41 using namespace std; |
43 | 42 |
44 static inline float gaussianKernelFactor() | 43 static inline float gaussianKernelFactor() |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 return ts; | 355 return ts; |
357 } | 356 } |
358 | 357 |
359 float FEGaussianBlur::calculateStdDeviation(float radius) | 358 float FEGaussianBlur::calculateStdDeviation(float radius) |
360 { | 359 { |
361 // Blur radius represents 2/3 times the kernel size, the dest pixel is half
of the radius applied 3 times | 360 // Blur radius represents 2/3 times the kernel size, the dest pixel is half
of the radius applied 3 times |
362 return max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f); | 361 return max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f); |
363 } | 362 } |
364 | 363 |
365 } // namespace WebCore | 364 } // namespace WebCore |
OLD | NEW |