Recommit r5350 with fix for image failures (which affected GLs that don't support ARB_texture_swizzle).



git-svn-id: http://skia.googlecode.com/svn/trunk@5353 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 408e702..8eb28bb 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -1160,7 +1160,7 @@
             SkString texCoords;
             texCoords.appendf("coord + vec2(%d, %d) * %s", dx, dy, imgInc);
             code->appendf("\t\tm[%d] = ", index++);
-            builder->emitTextureLookup(samplerName, texCoords.c_str());
+            builder->appendTextureLookup(code, samplerName, texCoords.c_str());
             code->appendf(".a;\n");
         }
     }
@@ -1168,11 +1168,12 @@
     SkString arg;
     arg.appendf("%s * m[4]", surfScale);
     fLight->emitSurfaceToLight(builder, code, arg.c_str());
-    code->appendf(";\n");
+    code->append(";\n");
     code->appendf("\t\t%s = %s(%s(m, %s), surfaceToLight, ",
                   outputColor, lightFunc.c_str(), interiorNormalName.c_str(), surfScale);
     fLight->emitLightColor(builder, "surfaceToLight");
-    code->appendf(")%s;\n", builder->fModulate.c_str());
+    code->append(");\n");
+    GrGLSLMulVarBy4f(code, 2, outputColor, inputColor);
 }
 
 GrGLProgramStage::StageKey GrGLLightingEffect::GenKey(const GrCustomStage& s,