Chromium Code Reviews| 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])); |