From e83221c547cf2038752e5378e72e49a62cfd9954 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 24 Sep 2012 16:01:35 -0700 Subject: Fix alpha channel computation with ColorMatrixColorFilter Bug #7222476 There were two issues: - Blending was ignored with color filters - The addition vector of a color filter was treated as integer values instead of float values Change-Id: Id94065704a30ee8aaaa5724a9f3a3cff7c50ced7 --- libs/hwui/OpenGLRenderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/hwui/OpenGLRenderer.cpp') diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 35cc7160fc31..d0d1d93489df 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -1398,8 +1398,8 @@ void OpenGLRenderer::setupDrawBlending(bool blend, SkXfermode::Mode mode, bool s // When the blending mode is kClear_Mode, we need to use a modulate color // argb=1,0,0,0 accountForClear(mode); - chooseBlending(blend || (mColorSet && mColorA < 1.0f) || (mShader && mShader->blend()), mode, - mDescription, swapSrcDst); + chooseBlending(blend || (mColorSet && mColorA < 1.0f) || (mShader && mShader->blend()) || + (mColorFilter && mColorFilter->blend()), mode, mDescription, swapSrcDst); } void OpenGLRenderer::setupDrawProgram() { -- cgit v1.2.3-59-g8ed1b