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

Unified Diff: src/gpu/GrTextStrike.cpp

Issue 217423014: Minor changes to GrFontCache system (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 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/GrTextStrike.cpp
===================================================================
--- src/gpu/GrTextStrike.cpp (revision 14005)
+++ src/gpu/GrTextStrike.cpp (working copy)
@@ -16,6 +16,28 @@
///////////////////////////////////////////////////////////////////////////////
+#if 0
+#define GR_NUM_PLOTS_X 4
+#define GR_NUM_PLOTS_Y 8
+#define GR_ATLAS_WIDTH 256
+#define GR_ATLAS_HEIGHT 256
+
+#define GR_ATLAS_TEXTURE_WIDTH (GR_PLOT_WIDTH * GR_ATLAS_WIDTH)
jvanverth1 2014/04/01 15:32:43 This won't compile. I'm not sure we need this sect
robertphillips 2014/04/01 15:45:54 Done.
+#define GR_ATLAS_TEXTURE_HEIGHT (GR_PLOT_HEIGHT * GR_ATLAS_HEIGHT)
+
+#else
+
+#define GR_ATLAS_TEXTURE_WIDTH 1024
+#define GR_ATLAS_TEXTURE_HEIGHT 2048
+
+#define GR_ATLAS_WIDTH 256
jvanverth1 2014/04/01 15:32:43 Since you're changing stuff, this should be GR_PLO
robertphillips 2014/04/01 15:45:54 Done.
+#define GR_ATLAS_HEIGHT 256
+
+#define GR_NUM_PLOTS_X (GR_ATLAS_TEXTURE_WIDTH / GR_ATLAS_WIDTH)
+#define GR_NUM_PLOTS_Y (GR_ATLAS_TEXTURE_HEIGHT / GR_ATLAS_HEIGHT)
+
+#endif
+
#define FONT_CACHE_STATS 0
#if FONT_CACHE_STATS
static int g_PurgeCount = 0;
@@ -72,7 +94,11 @@
GrPixelConfig config = mask_format_to_pixel_config(format);
int atlasIndex = mask_format_to_atlas_index(format);
if (NULL == fAtlasMgr[atlasIndex]) {
- fAtlasMgr[atlasIndex] = SkNEW_ARGS(GrAtlasMgr, (fGpu, config));
+ fAtlasMgr[atlasIndex] = SkNEW_ARGS(GrAtlasMgr, (fGpu, config,
+ GR_ATLAS_TEXTURE_WIDTH,
+ GR_ATLAS_TEXTURE_HEIGHT,
+ GR_NUM_PLOTS_X,
+ GR_NUM_PLOTS_Y));
}
GrTextStrike* strike = SkNEW_ARGS(GrTextStrike,
(this, scaler->getKey(), format, fAtlasMgr[atlasIndex]));

Powered by Google App Engine
This is Rietveld 408576698