summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2011-03-17 12:06:52 -0700
committerRussell Brenner <russellbrenner@google.com>2011-03-17 14:20:18 -0700
commit72b824a5bbed3afbd719564c8d603c8055ad3dfd (patch)
tree9221632ba4d5ed75fc629cc67cbcacca6cd262db /WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
parent49fff159362adc0289fe593ac113a8d0a0671edf (diff)
downloadexternal_webkit-72b824a5bbed3afbd719564c8d603c8055ad3dfd.zip
external_webkit-72b824a5bbed3afbd719564c8d603c8055ad3dfd.tar.gz
external_webkit-72b824a5bbed3afbd719564c8d603c8055ad3dfd.tar.bz2
Enabled shadow drawing
Reworked the logic of setupForText() and setupShadowPaint() to render correctly, as exhibited by http://acid3.acidtests.org. Bug: 4075135 Change-Id: I595456b658d0872183dedcbc726be44783440f89
Diffstat (limited to 'WebCore/platform/graphics/android/GraphicsContextAndroid.cpp')
-rw-r--r--WebCore/platform/graphics/android/GraphicsContextAndroid.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
index dce7b27..2f5a4b9 100644
--- a/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsContextAndroid.cpp
@@ -149,17 +149,16 @@ public:
bool setupShadowPaint(SkPaint* paint, SkPoint* offset)
{
+ paint->setAntiAlias(true);
+ paint->setDither(true);
+ paint->setXfermodeMode(mode);
+ paint->setColor(shadow.color);
+ offset->set(shadow.dx, shadow.dy);
if (shadow.blur > 0) {
- paint->setAntiAlias(true);
- paint->setDither(true);
- paint->setXfermodeMode(mode);
- paint->setColor(shadow.color);
paint->setMaskFilter(SkBlurMaskFilter::Create(shadow.blur,
SkBlurMaskFilter::kNormal_BlurStyle))->unref();
- offset->set(shadow.dx, shadow.dy);
- return true;
}
- return false;
+ return SkColorGetA(shadow.color) && (shadow.blur || shadow.dx || shadow.dy);
}
SkColor applyAlpha(SkColor c) const