Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: src/core/SkComposeShader.cpp

Issue 1518933002: Use SK_BUILD_FOR_ANDROID_FRAMEWORK in compose (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update comment - Android ignores the paint's alpha Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkComposeShader.cpp
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp
index 0dc0da68ef9b8dfabae11b0b561d9b5c6dd2b41f..287702ec66fbb76e0ddeb8355e5dae74f969b4cc 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];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698