Unreviewed. Fixing the Windows build, due to a non definition of M_PI.
git-svn-id: http://skia.googlecode.com/svn/trunk@2912 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
45cbfdd535
commit
73f3dedf59
@ -120,7 +120,8 @@ static void boxBlurY(const SkBitmap& src, SkBitmap* dst, int kernelSize,
|
|||||||
|
|
||||||
static void getBox3Params(SkScalar s, int *kernelSize, int* kernelSize3, int *lowOffset, int *highOffset)
|
static void getBox3Params(SkScalar s, int *kernelSize, int* kernelSize3, int *lowOffset, int *highOffset)
|
||||||
{
|
{
|
||||||
int d = static_cast<int>(floorf(SkScalarToFloat(s) * 3.0f * sqrtf(2.0f * M_PI) / 4.0f + 0.5f));
|
float pi = SkScalarToFloat(SK_ScalarPI);
|
||||||
|
int d = static_cast<int>(floorf(SkScalarToFloat(s) * 3.0f * sqrtf(2.0f * pi) / 4.0f + 0.5f));
|
||||||
*kernelSize = d;
|
*kernelSize = d;
|
||||||
if (d % 2 == 1) {
|
if (d % 2 == 1) {
|
||||||
*lowOffset = *highOffset = (d - 1) / 2;
|
*lowOffset = *highOffset = (d - 1) / 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user