Commit 14fcc6d8 authored by mitz@apple.com's avatar mitz@apple.com

LLVM Compiler build fix.

* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::blurLayerImage): Eliminated a file static that generated
a global initializer since the compiler does not evaluate sqrtf at compile time.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 14b7f57b
2011-02-19 Dan Bernstein <mitz@apple.com>
LLVM Compiler build fix.
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::blurLayerImage): Eliminated a file static that generated
a global initializer since the compiler does not evaluate sqrtf at compile time.
2011-02-19 Brian Ryner <bryner@chromium.org>
Reviewed by Adam Barth.
......
......@@ -144,7 +144,6 @@ ShadowBlur::ShadowBlur(float radius, const FloatSize& offset, const Color& color
// Instead of integer division, we use 17.15 for fixed-point division.
static const int blurSumShift = 15;
static const float gaussianKernelFactor = 3 / 4.f * sqrtf(2 * piFloat);
void ShadowBlur::blurLayerImage(unsigned char* imageData, const IntSize& size, int rowStride)
{
......@@ -167,6 +166,7 @@ void ShadowBlur::blurLayerImage(unsigned char* imageData, const IntSize& size, i
// However, shadows rendered according to that spec will extend a little further than m_blurRadius,
// so we apply a fudge factor to bring the radius down slightly.
float stdDev = m_blurRadius / 2;
const float gaussianKernelFactor = 3 / 4.f * sqrtf(2 * piFloat);
const float fudgeFactor = 0.88f;
diameter = max(2, static_cast<int>(floorf(stdDev * gaussianKernelFactor * fudgeFactor + 0.5f)));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment