diff options
author | Steve Block <steveblock@google.com> | 2011-06-10 16:52:27 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-06-14 01:14:02 +0100 |
commit | 54cdeeebc7adcbcd900e8b6a141a8cae27d9a631 (patch) | |
tree | 845b0d338b204a48560eca3b51b34cf92ed96840 /Source/WebCore/platform/graphics/skia | |
parent | d2c5226a647dc21d0c15267e09a3d19cf3e0d593 (diff) | |
download | external_webkit-54cdeeebc7adcbcd900e8b6a141a8cae27d9a631.zip external_webkit-54cdeeebc7adcbcd900e8b6a141a8cae27d9a631.tar.gz external_webkit-54cdeeebc7adcbcd900e8b6a141a8cae27d9a631.tar.bz2 |
Merge WebKit at branches/chromium/742 r88085: Initial merge by git.
Change-Id: I0501b484b9528e31b0026e5ad64416dd6541cdde
Diffstat (limited to 'Source/WebCore/platform/graphics/skia')
-rw-r--r-- | Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp index f285c9b..d967791 100644 --- a/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp +++ b/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp @@ -1047,6 +1047,7 @@ void GraphicsContext::setPlatformShadow(const FloatSize& size, 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 @@ void GraphicsContext::setPlatformShadow(const FloatSize& size, // 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 @@ void GraphicsContext::setPlatformShadow(const FloatSize& size, 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; |