OSDN Git Service

Ensure font encoding is correct for drawing loopers.
authorDerek Sollenberger <djsollen@google.com>
Wed, 30 Nov 2011 14:08:11 +0000 (09:08 -0500)
committerDerek Sollenberger <djsollen@google.com>
Wed, 30 Nov 2011 20:51:46 +0000 (15:51 -0500)
This is particularly important for drawing shadowed text.

bug: 5571685
Change-Id: Id90e4524faf086fc96cc1d59883f7a420c8c3ff5

Source/WebCore/platform/graphics/android/FontAndroid.cpp

index 81dbdae..0a8c0c1 100644 (file)
@@ -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;