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

Unified Diff: src/gpu/GrFontAtlasSizes.h

Issue 917373002: Use uint16s for texture coordinates when rendering text. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use float uvs for distance field paths Created 5 years, 10 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
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrFontCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrFontAtlasSizes.h
diff --git a/src/gpu/GrFontAtlasSizes.h b/src/gpu/GrFontAtlasSizes.h
new file mode 100644
index 0000000000000000000000000000000000000000..24897e4a7ae2e0d4539767b8d0d60f990f49abe8
--- /dev/null
+++ b/src/gpu/GrFontAtlasSizes.h
@@ -0,0 +1,28 @@
+
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrFontAtlasSizes_DEFINED
+#define GrFontAtlasSizes_DEFINED
+
+#define GR_FONT_ATLAS_TEXTURE_WIDTH 1024
+#define GR_FONT_ATLAS_TEXTURE_HEIGHT 2048
+
+#define GR_FONT_ATLAS_PLOT_WIDTH 256
+#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_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_RECIP_HEIGHT "0.00048828125"
+
+// 1/(3*width)
+#define GR_FONT_ATLAS_LCD_DELTA "0.00032552083"
+
+#endif
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrFontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698