Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: src/gpu/GrFontAtlasSizes.h

Issue 1011403004: BitmapTextBatch and BitmapTextBlob (Closed) Base URL: https://skia.googlesource.com/skia.git@dfpr_take_2
Patch Set: feedback inc Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrFontAtlasSizes.h
diff --git a/src/gpu/GrFontAtlasSizes.h b/src/gpu/GrFontAtlasSizes.h
index d5c5e287e184e30bda772f74a4daf41dd5ee7639..68c926366a31735a13354e3d1403c6fcfb230bdf 100644
--- a/src/gpu/GrFontAtlasSizes.h
+++ b/src/gpu/GrFontAtlasSizes.h
@@ -9,6 +9,29 @@
#ifndef GrFontAtlasSizes_DEFINED
#define GrFontAtlasSizes_DEFINED
+// For debugging atlas which evict all of the time
+# if 0
Jvsquare 2015/03/27 15:07:29 Assign this a #define with a real name, like DEBUG
joshualitt 2015/03/30 14:56:44 Acknowledged.
+#define GR_FONT_ATLAS_TEXTURE_WIDTH 256//1024
+#define GR_FONT_ATLAS_A8_TEXTURE_WIDTH 256//2048
+#define GR_FONT_ATLAS_TEXTURE_HEIGHT 256//2048
+
+#define GR_FONT_ATLAS_PLOT_WIDTH 256
+#define GR_FONT_ATLAS_A8_PLOT_WIDTH 256//512
+#define GR_FONT_ATLAS_PLOT_HEIGHT 256
+
+#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
#define GR_FONT_ATLAS_TEXTURE_HEIGHT 2048
@@ -29,5 +52,5 @@
// 1/(3*width)
// only used for distance fields, which are A8
#define GR_FONT_ATLAS_LCD_DELTA "0.000162760417"
-
+#endif
#endif

Powered by Google App Engine
This is Rietveld 408576698