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

Unified Diff: src/gpu/GrTextStrike.cpp

Issue 217423014: Minor changes to GrFontCache system (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed code review comments 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
« no previous file with comments | « src/gpu/GrRectanizer_skyline.cpp ('k') | src/gpu/GrTextStrike_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextStrike.cpp
===================================================================
--- src/gpu/GrTextStrike.cpp (revision 14007)
+++ src/gpu/GrTextStrike.cpp (working copy)
@@ -16,6 +16,15 @@
///////////////////////////////////////////////////////////////////////////////
+#define GR_ATLAS_TEXTURE_WIDTH 1024
+#define GR_ATLAS_TEXTURE_HEIGHT 2048
+
+#define GR_PLOT_WIDTH 256
+#define GR_PLOT_HEIGHT 256
+
+#define GR_NUM_PLOTS_X (GR_ATLAS_TEXTURE_WIDTH / GR_PLOT_WIDTH)
+#define GR_NUM_PLOTS_Y (GR_ATLAS_TEXTURE_HEIGHT / GR_PLOT_HEIGHT)
+
#define FONT_CACHE_STATS 0
#if FONT_CACHE_STATS
static int g_PurgeCount = 0;
@@ -72,7 +81,12 @@
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));
+ SkISize textureSize = SkISize::Make(GR_ATLAS_TEXTURE_WIDTH,
+ GR_ATLAS_TEXTURE_HEIGHT);
+ fAtlasMgr[atlasIndex] = SkNEW_ARGS(GrAtlasMgr, (fGpu, config,
+ textureSize,
+ GR_NUM_PLOTS_X,
+ GR_NUM_PLOTS_Y));
}
GrTextStrike* strike = SkNEW_ARGS(GrTextStrike,
(this, scaler->getKey(), format, fAtlasMgr[atlasIndex]));
« no previous file with comments | « src/gpu/GrRectanizer_skyline.cpp ('k') | src/gpu/GrTextStrike_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698