*/
//#define SK_ALLOW_OVER_32K_BITMAPS
+/* Define this to set the upper limit for text to support LCD. Values that
+ are very large increase the cost in the font cache and draw slower, without
+ improving readability. If this is undefined, Skia will use its default
+ value (e.g. 48)
+ */
+//#define SK_MAX_SIZE_FOR_LCDTEXT 48
+
/* If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST
which will run additional self-tests at startup. These can take a long time,
so this flag is optional.
// Beyond this size, LCD doesn't appreciably improve quality, but it always
// cost more RAM and draws slower, so we set a cap.
-static const SkScalar SK_MAX_SIZE_FOR_LCDTEXT = SkIntToScalar(48);
+#ifndef SK_MAX_SIZE_FOR_LCDTEXT
+ #define SK_MAX_SIZE_FOR_LCDTEXT 48
+#endif
static bool tooBigForLCD(const SkScalerContext::Rec& rec) {
SkScalar area = SkScalarMul(rec.fPost2x2[0][0], rec.fPost2x2[1][1]) -
SkScalarMul(rec.fPost2x2[1][0], rec.fPost2x2[0][1]);
SkScalar size = SkScalarMul(area, rec.fTextSize);
- return SkScalarAbs(size) > SK_MAX_SIZE_FOR_LCDTEXT;
+ return SkScalarAbs(size) > SkIntToScalar(SK_MAX_SIZE_FOR_LCDTEXT);
}
/*