Always create an instance when testing GrEffects for SkXfermode and SkArithmeticMode
Previously the TestCreate methods of the effects would create a static
instance and return that for all invocations. This is probably a
copy-paste error going back to initial TestCreate method in r8449. At
that time, the effect was always the same and thus static usage made
sense.
R=bsalomon@google.com, senorblanco@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/39393002
git-svn-id: http://skia.googlecode.com/svn/trunk@11939 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index 3c445ab..2cec153 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -402,7 +402,7 @@
float k3 = rand->nextF();
float k4 = rand->nextF();
- static AutoEffectUnref gEffect(SkNEW_ARGS(GrArithmeticEffect, (k1, k2, k3, k4, NULL)));
+ AutoEffectUnref gEffect(SkNEW_ARGS(GrArithmeticEffect, (k1, k2, k3, k4, NULL)));
return CreateEffectRef(gEffect);
}