summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-09-22 18:17:39 -0700
committerChris Craik <ccraik@google.com>2014-09-23 01:22:00 +0000
commitbc341912b124ea52d1a383bb8cc0a12d0671eaa2 (patch)
tree8b5be4e85cc1d7b8241703a08a04698e9505ea45 /libs
parent81d9304bdae3a9282572fd361accfdb034651b45 (diff)
downloadframeworks_base-bc341912b124ea52d1a383bb8cc0a12d0671eaa2.zip
frameworks_base-bc341912b124ea52d1a383bb8cc0a12d0671eaa2.tar.gz
frameworks_base-bc341912b124ea52d1a383bb8cc0a12d0671eaa2.tar.bz2
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
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/Renderer.h2
1 files changed, 1 insertions, 1 deletions
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 @@ 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