temporary:
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 5 Jun 2012 17:15:30 +0000 (17:15 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 5 Jun 2012 17:15:30 +0000 (17:15 +0000)
- suppress PDF for twopointradial GM until we fix its assert/failure (vandebo)
- detect divide-by-zero and abort for now (reed)

git-svn-id: http://skia.googlecode.com/svn/trunk@4165 2bbb7eff-a529-9590-31e7-b0007b416f81

gm/twopointradial.cpp
src/effects/SkGradientShader.cpp

index e2b06ec..b87f896 100644 (file)
@@ -50,6 +50,9 @@ protected:
 
     SkISize onISize() { return skiagm::make_isize(480, 725); }
 
+    // BUG: PDF code (at least on mac) fails when we run this
+    virtual uint32_t onGetFlags() const SK_OVERRIDE { return kSkipPDF_Flag; }
+
     virtual void onDraw(SkCanvas* canvas) {
         if (false) {
             SkPaint paint;
index 6de820b..9945ca1 100644 (file)
@@ -1981,6 +1981,11 @@ public:
             return false;
         }
 
+        // For now, we might have divided by zero, so detect that
+        if (0 == fDiffRadius) {
+            return false;
+        }
+
         // we don't have a span16 proc
         fFlags &= ~kHasSpan16_Flag;
         return true;