summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2011-11-17 13:03:41 -0500
committerDerek Sollenberger <djsollen@google.com>2011-11-17 13:03:41 -0500
commit13d5898c0b431f802bb519a31ecd6b8ab2644143 (patch)
treee132245cfd717124edf45af8e88b37ac800622e4 /Source
parenta46b07e21bfb048a70a3aa8173adf7ad67c3caf8 (diff)
downloadexternal_webkit-13d5898c0b431f802bb519a31ecd6b8ab2644143.zip
external_webkit-13d5898c0b431f802bb519a31ecd6b8ab2644143.tar.gz
external_webkit-13d5898c0b431f802bb519a31ecd6b8ab2644143.tar.bz2
Fix over-allocation of memory on text with shadows.
bug: 5607514 Change-Id: I6bf0ee814a3819f1dfb79484143f88dd6c95ca71
Diffstat (limited to 'Source')
-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 e100955..8fe27a8 100644
--- a/Source/WebCore/platform/graphics/android/FontAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
@@ -99,6 +99,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;