From 2cb6cd8eae9db20441b6a1bfbb1663a0af6e97ec Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Thu, 13 Feb 2014 12:09:11 +0100 Subject: [PATCH] Bug 960017 - Make the surfaces big enough. r=Bas --- gfx/2d/FilterNodeSoftware.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gfx/2d/FilterNodeSoftware.cpp b/gfx/2d/FilterNodeSoftware.cpp index 201f56d9b602..9d0551ef9472 100644 --- a/gfx/2d/FilterNodeSoftware.cpp +++ b/gfx/2d/FilterNodeSoftware.cpp @@ -2260,6 +2260,11 @@ FilterNodeConvolveMatrixSoftware::DoRender(const IntRect& aRect, } IntRect srcRect = InflatedSourceRect(aRect); + + // Inflate the source rect by another pixel because the bilinear filtering in + // ColorComponentAtPoint may want to access the margins. + srcRect.Inflate(1); + RefPtr input = GetInputDataSourceSurface(IN_CONVOLVE_MATRIX_IN, srcRect, NEED_COLOR_CHANNELS, mEdgeMode, &mSourceRect); @@ -3260,6 +3265,11 @@ FilterNodeLightingSoftware::DoRender(const IntRect& aRe IntSize size = aRect.Size(); srcRect.Inflate(ceil(float(aKernelUnitLengthX)), ceil(float(aKernelUnitLengthY))); + + // Inflate the source rect by another pixel because the bilinear filtering in + // ColorComponentAtPoint may want to access the margins. + srcRect.Inflate(1); + RefPtr input = GetInputDataSourceSurface(IN_LIGHTING_IN, srcRect, CAN_HANDLE_A8, EDGE_MODE_DUPLICATE);