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
This commit is contained in:
@@ -71,7 +71,7 @@ public:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user