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

Unified Diff: Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp

Issue 6913001: Merge 85264 - 2011-04-28 Mike Reed <reed@google.com> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 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 | « Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
===================================================================
--- Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (revision 85512)
+++ Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (working copy)
@@ -1047,6 +1047,7 @@
double blur = blurFloat;
uint32_t mfFlags = SkBlurMaskFilter::kHighQuality_BlurFlag;
+ SkXfermode::Mode colorMode = SkXfermode::kSrc_Mode;
if (m_state.shadowsIgnoreTransforms) {
// Currently only the GraphicsContext associated with the
@@ -1055,6 +1056,12 @@
// with a CanvasRenderingContext.
mfFlags |= SkBlurMaskFilter::kIgnoreTransform_BlurFlag;
+ // CSS wants us to ignore the original's alpha, but Canvas wants us to
+ // modulate with it. Using shadowsIgnoreTransforms to tell us that we're
+ // in a Canvas, we change the colormode to kDst_Mode, so we don't overwrite
+ // it with our layer's (default opaque-black) color.
+ colorMode = SkXfermode::kDst_Mode;
+
// CG uses natural orientation for Y axis, but the HTML5 canvas spec
// does not.
// So we now flip the height since it was flipped in
@@ -1082,7 +1089,7 @@
info.fPaintBits |= SkLayerDrawLooper::kMaskFilter_Bit; // our blur
info.fPaintBits |= SkLayerDrawLooper::kColorFilter_Bit;
- info.fColorMode = SkXfermode::kDst_Mode;
+ info.fColorMode = colorMode;
info.fOffset.set(width, height);
info.fPostTranslate = m_state.shadowsIgnoreTransforms;
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/FontChromiumWin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698