setHinting modifies fFlags in places, so call it last (after initializing fFlags)
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 18 May 2011 21:14:39 +0000 (21:14 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 18 May 2011 21:14:39 +0000 (21:14 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@1372 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkPaint.cpp

index 311ec7d1188115939b01f59ba0011ba30ec71e74..c023dbf206b97b86879812ac9992959d08882790 100644 (file)
@@ -1292,7 +1292,6 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
         rec->fStrokeJoin = 0;
     }
 
-    rec->setHinting(computeHinting(paint));
     rec->fMaskFormat = SkToU8(computeMaskFormat(paint));
 
     if (SkMask::kLCD16_Format == rec->fMaskFormat) {
@@ -1322,6 +1321,9 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
     }
     rec->fFlags = SkToU16(flags);
 
+    // setHinting modifies fFlags, so do this last
+    rec->setHinting(computeHinting(paint));
+
     /*  Allow the fonthost to modify our rec before we use it as a key into the
         cache. This way if we're asking for something that they will ignore,
         they can modify our rec up front, so we don't create duplicate cache