Reject transparent draws more conservatively

bug:17600162

Transparent draws are not safe to reject for all xfermodes other than
clear. Now, to be safe, only perform the rejection for SrcOver draws
since other modes are fairly uncommon.

We could specifically determine whether the xfermode could change the
output given a transparent input, but there's little to be gained from
the additional complexity.

Change-Id: Ia699ac4bdc4da3353955840b53f1922d3cb1d85d
diff --git a/libs/hwui/Renderer.h b/libs/hwui/Renderer.h
index 3681637..9cedd5a 100644
--- a/libs/hwui/Renderer.h
+++ b/libs/hwui/Renderer.h
@@ -71,7 +71,7 @@
     static inline bool paintWillNotDraw(const SkPaint& paint) {
         return paint.getAlpha() == 0
                 && !paint.getColorFilter()
-                && getXfermode(paint.getXfermode()) != SkXfermode::kClear_Mode;
+                && getXfermode(paint.getXfermode()) == SkXfermode::kSrcOver_Mode;
     }
 
     // TODO: move to a method on android:Paint