summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2011-11-30 09:08:11 -0500
committerDerek Sollenberger <djsollen@google.com>2011-11-30 15:51:46 -0500
commit1c8a30e3171074faf014d543d71d004cde419d53 (patch)
treeda39eed65daaf80c1d864ef40d41f53897af7516
parent32f189562f7180e69a4d92f57cd6d24d8ef21b65 (diff)
downloadexternal_webkit-1c8a30e3171074faf014d543d71d004cde419d53.zip
external_webkit-1c8a30e3171074faf014d543d71d004cde419d53.tar.gz
external_webkit-1c8a30e3171074faf014d543d71d004cde419d53.tar.bz2
Ensure font encoding is correct for drawing loopers.
This is particularly important for drawing shadowed text. bug: 5571685 Change-Id: Id90e4524faf086fc96cc1d59883f7a420c8c3ff5
-rw-r--r--Source/WebCore/platform/graphics/android/FontAndroid.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/FontAndroid.cpp b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
index 81dbdae..0a8c0c1 100644
--- a/Source/WebCore/platform/graphics/android/FontAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
@@ -98,6 +98,10 @@ static bool setupForText(SkPaint* paint, GraphicsContext* gc,
SkLayerDrawLooper* looper = new SkLayerDrawLooper;
paint->setLooper(looper)->unref();
+ // The layerDrawLooper uses at the root paint to determine the text
+ // encoding so we need to make sure it is properly configured.
+ updateForFont(paint, font);
+
// Specify the behavior of the looper
SkLayerDrawLooper::LayerInfo info;
info.fPaintBits = SkLayerDrawLooper::kEntirePaint_Bits;