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

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 7454a1fdf5ec597502036e6542f071810468484a..0149b71c1d78aed450a516facc5130d741ee7865 100644
--- a/Source/core/platform/graphics/GraphicsContext.cpp
+++ b/Source/core/platform/graphics/GraphicsContext.cpp
@@ -1713,6 +1713,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());

Powered by Google App Engine
This is Rietveld 408576698