aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2015-12-16 07:34:21 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-16 07:34:21 -0800
commitce5ac45d39db3c7fe52acaa59117688aec53710e (patch)
tree7a72757624ed59f421c931ce5c02e7644f4987d3 /src/core
parent7354a4b193aaaeae43fb9ede90e1158fa46c372b (diff)
Use SK_BUILD_FOR_ANDROID_FRAMEWORK in compose
We are trying to support the behavior provided by the Android framework. Other developers do not necessarily need this behavior. BUG=skia:4296 Review URL: https://codereview.chromium.org/1518933002
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkComposeShader.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp
index 0dc0da68ef..287702ec66 100644
--- a/src/core/SkComposeShader.cpp
+++ b/src/core/SkComposeShader.cpp
@@ -137,8 +137,10 @@ void SkComposeShader::ComposeShaderContext::shadeSpan(int x, int y, SkPMColor re
SkXfermode* mode = static_cast<const SkComposeShader&>(fShader).fMode;
unsigned scale = SkAlpha255To256(this->getPaintAlpha());
-#ifdef SK_BUILD_FOR_ANDROID
- scale = 256; // ugh -- maintain old bug/behavior for now
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+ // In the Android framework, make compose shader ignore the paint's alpha.
+ // This matches the old behavior. FIXME: Can we remove this difference?
+ scale = 256;
#endif
SkPMColor tmp[TMP_COLOR_COUNT];