Allow blending if there is a color filter.
authorScroggo <Scroggo@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 11 May 2011 20:25:01 +0000 (20:25 +0000)
committerScroggo <Scroggo@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 11 May 2011 20:25:01 +0000 (20:25 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@1309 2bbb7eff-a529-9590-31e7-b0007b416f81

gpu/src/GrDrawTarget.cpp

index 695a2ab..668dc3a 100644 (file)
@@ -514,6 +514,13 @@ bool GrDrawTarget::canDisableBlend() const {
         }
     }
 
+    // ...and there isn't an interesting color filter...
+    // TODO: Consider being more aggressive with regards to disabling
+    // blending when a color filter is used.
+    if (SkXfermode::kDst_Mode != fCurrDrawState.fColorFilterXfermode) {
+        return false;
+    }
+
     // ...then we disable blend.
     return true;
 }