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

Unified Diff: src/core/SkBlitter.cpp

Issue 248033003: Remove support for inheriting the paint color from SkColorShader (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fColor -> color Created 6 years, 8 months 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 | « include/core/SkPicture.h ('k') | src/core/SkShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitter.cpp
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp
index 7243f521613905cf164ecbff723d246ff5276917..41f37e659aee2c50394a25df29146a055d8e7b65 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -928,8 +928,9 @@ SkBlitter* SkBlitter::Choose(const SkBitmap& device,
if (NULL == shader) {
if (mode) {
// xfermodes (and filters) require shaders for our current blitters
- shader = SkNEW(SkColorShader);
+ shader = SkNEW_ARGS(SkColorShader, (paint->getColor()));
paint.writable()->setShader(shader)->unref();
+ paint.writable()->setAlpha(0xFF);
} else if (cf) {
// if no shader && no xfermode, we just apply the colorfilter to
// our color and move on.
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698