fix leak of Light object (in this private instance, the caller is transferring
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 27 Jun 2012 14:24:29 +0000 (14:24 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 27 Jun 2012 14:24:29 +0000 (14:24 +0000)
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

src/effects/SkLightingImageFilter.cpp

index 25c92b7..c4a6896 100644 (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(