fix leak of Light object (in this private instance, the caller is transferring

ownership of the object, so the receive does not need to call ref).
Review URL: https://codereview.appspot.com/6348045

git-svn-id: http://skia.googlecode.com/svn/trunk@4360 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2012-06-27 14:24:29 +00:00
parent 0456e0b7b8
commit 51f3866995

View File

@ -430,7 +430,8 @@ SkLightingImageFilter::SkLightingImageFilter(SkLight* light, const SkColor& ligh
fSurfaceScale(SkScalarDiv(surfaceScale, SkIntToScalar(255)))
{
SkASSERT(fLight);
fLight->ref();
// our caller knows that we take ownership of the light, so we don't
// need to call ref() here.
}
SkImageFilter* SkLightingImageFilter::CreateDistantLitDiffuse(