Index: src/gpu/GrFontAtlasSizes.h |
diff --git a/src/gpu/GrFontAtlasSizes.h b/src/gpu/GrFontAtlasSizes.h |
index 8722ca1a60cf949545757a9c309f192c0bc26fcf..8a3091c6c7448170465f34dd26363ae94d22ba15 100644 |
--- a/src/gpu/GrFontAtlasSizes.h |
+++ b/src/gpu/GrFontAtlasSizes.h |
@@ -23,6 +23,15 @@ |
#define GR_FONT_ATLAS_NUM_PLOTS_X (GR_FONT_ATLAS_TEXTURE_WIDTH / GR_FONT_ATLAS_PLOT_WIDTH) |
#define GR_FONT_ATLAS_A8_NUM_PLOTS_X (GR_FONT_ATLAS_A8_TEXTURE_WIDTH / GR_FONT_ATLAS_A8_PLOT_WIDTH) |
#define GR_FONT_ATLAS_NUM_PLOTS_Y (GR_FONT_ATLAS_TEXTURE_HEIGHT / GR_FONT_ATLAS_PLOT_HEIGHT) |
+ |
+// one over width and height |
+#define GR_FONT_ATLAS_RECIP_WIDTH "0.00390625"//"0.0009765625" |
+#define GR_FONT_ATLAS_A8_RECIP_WIDTH "0.00390625"//"0.00048828125" |
+#define GR_FONT_ATLAS_RECIP_HEIGHT "0.00390625"//"0.00048828125" |
+ |
+// 1/(3*width) |
+// only used for distance fields, which are A8 |
+#define GR_FONT_ATLAS_LCD_DELTA "0.001302083"//"0.000162760417" |
#else |
#define GR_FONT_ATLAS_TEXTURE_WIDTH 1024 |
#define GR_FONT_ATLAS_A8_TEXTURE_WIDTH 2048 |
@@ -35,5 +44,14 @@ |
#define GR_FONT_ATLAS_NUM_PLOTS_X (GR_FONT_ATLAS_TEXTURE_WIDTH / GR_FONT_ATLAS_PLOT_WIDTH) |
#define GR_FONT_ATLAS_A8_NUM_PLOTS_X (GR_FONT_ATLAS_A8_TEXTURE_WIDTH / GR_FONT_ATLAS_A8_PLOT_WIDTH) |
#define GR_FONT_ATLAS_NUM_PLOTS_Y (GR_FONT_ATLAS_TEXTURE_HEIGHT / GR_FONT_ATLAS_PLOT_HEIGHT) |
+ |
+// one over width and height |
+#define GR_FONT_ATLAS_RECIP_WIDTH "0.0009765625" |
+#define GR_FONT_ATLAS_A8_RECIP_WIDTH "0.00048828125" |
+#define GR_FONT_ATLAS_RECIP_HEIGHT "0.00048828125" |
+ |
+// 1/(3*width) |
+// only used for distance fields, which are A8 |
+#define GR_FONT_ATLAS_LCD_DELTA "0.000162760417" |
#endif |
#endif |