Compare scalars to scalars (fixes fixed point).
authorbungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 2 Apr 2012 14:51:54 +0000 (14:51 +0000)
committerbungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 2 Apr 2012 14:51:54 +0000 (14:51 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@3570 2bbb7eff-a529-9590-31e7-b0007b416f81

src/ports/SkFontHost_FreeType.cpp

index 31c8a8f..514a041 100644 (file)
@@ -634,8 +634,8 @@ void SkFontHost::FilterRec(SkScalerContext::Rec* rec) {
     //BOGUS: http://code.google.com/p/chromium/issues/detail?id=121119
     //Cap the requested size as larger sizes give bogus values.
     //Remove when http://code.google.com/p/skia/issues/detail?id=554 is fixed.
-    if (rec->fTextSize > (1 << 14)) {
-      rec->fTextSize = (1 << 14);
+    if (rec->fTextSize > SkIntToScalar(1 << 14)) {
+      rec->fTextSize = SkIntToScalar(1 << 14);
     }
     
     if (!gLCDSupportValid) {