Bug 755869 - [5] Re-apply bug 688366 - Fix Skia marking radial gradients with the same radius as invalid. r=mattwoodrow
authorGeorge Wright <gwright@mozilla.com>
Fri, 18 May 2012 14:11:32 -0400
changeset 99200 73e33e3e48cc2b725ef4fff0b3f5fa5c22b1c11a
parent 99199 b4eef6c71672cd89de7b3f022e5a482cec32adeb
child 99201 66e29180f635d99d319467ba9271492148f6b7e6
push idunknown
push userunknown
push dateunknown
reviewersmattwoodrow
bugs755869, 688366
milestone15.0a1
Bug 755869 - [5] Re-apply bug 688366 - Fix Skia marking radial gradients with the same radius as invalid. r=mattwoodrow
gfx/skia/src/effects/SkGradientShader.cpp
--- a/gfx/skia/src/effects/SkGradientShader.cpp
+++ b/gfx/skia/src/effects/SkGradientShader.cpp
@@ -1906,17 +1906,20 @@ public:
 
     virtual void shadeSpan(int x, int y, SkPMColor* dstCParam,
                            int count) SK_OVERRIDE {
         SkASSERT(count > 0);
 
         SkPMColor* SK_RESTRICT dstC = dstCParam;
 
         // Zero difference between radii:  fill with transparent black.
-        if (fDiffRadius == 0) {
+        // TODO: Is removing this actually correct? Two circles with the 
+        // same radius, but different centers doesn't sound like it
+        // should be cleared
+        if (fDiffRadius == 0 && fCenter1 == fCenter2) {
           sk_bzero(dstC, count * sizeof(*dstC));
           return;
         }
         SkMatrix::MapXYProc dstProc = fDstToIndexProc;
         TileProc            proc = fTileProc;
         const SkPMColor* SK_RESTRICT cache = this->getCache32();
 
         SkScalar foura = fA * 4;