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

Unified Diff: Source/core/platform/graphics/GraphicsContext.cpp

Issue 23947005: Implement CSS luminance masking using skia SkLumaMaskXfermode class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
Index: Source/core/platform/graphics/GraphicsContext.cpp
diff --git a/Source/core/platform/graphics/GraphicsContext.cpp b/Source/core/platform/graphics/GraphicsContext.cpp
index adfe54e6b9a95fbdaa1b493ff94fe557d7cfaf95..e845bbd456b6a120e4f2460b6b901f4b4104891d 100644
--- a/Source/core/platform/graphics/GraphicsContext.cpp
+++ b/Source/core/platform/graphics/GraphicsContext.cpp
@@ -1725,6 +1725,8 @@ void GraphicsContext::setupPaintCommon(SkPaint* paint) const
if (!SkXfermode::IsMode(m_state->m_xferMode.get(), SkXfermode::kSrcOver_Mode))
paint->setXfermode(m_state->m_xferMode.get());
+ if (this->drawLuminanceMask())
+ paint->setXfermode(SkLumaMaskXfermode::Create(SkXfermode::kSrcOver_Mode));
if (m_state->m_looper)
paint->setLooper(m_state->m_looper.get());
« no previous file with comments | « Source/core/platform/graphics/GraphicsContext.h ('k') | Source/core/platform/graphics/GraphicsContextState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698