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

Side by Side 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, 8 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 unified diff | Download patch
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrFontAtlasSizes_DEFINED 9 #ifndef GrFontAtlasSizes_DEFINED
10 #define GrFontAtlasSizes_DEFINED 10 #define GrFontAtlasSizes_DEFINED
11 11
12 // For debugging atlas which evict all of the time
13 # 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.
14 #define GR_FONT_ATLAS_TEXTURE_WIDTH 256//1024
15 #define GR_FONT_ATLAS_A8_TEXTURE_WIDTH 256//2048
16 #define GR_FONT_ATLAS_TEXTURE_HEIGHT 256//2048
17
18 #define GR_FONT_ATLAS_PLOT_WIDTH 256
19 #define GR_FONT_ATLAS_A8_PLOT_WIDTH 256//512
20 #define GR_FONT_ATLAS_PLOT_HEIGHT 256
21
22 #define GR_FONT_ATLAS_NUM_PLOTS_X (GR_FONT_ATLAS_TEXTURE_WIDTH / GR_FONT_ATL AS_PLOT_WIDTH)
23 #define GR_FONT_ATLAS_A8_NUM_PLOTS_X (GR_FONT_ATLAS_A8_TEXTURE_WIDTH / GR_FONT_ ATLAS_A8_PLOT_WIDTH)
24 #define GR_FONT_ATLAS_NUM_PLOTS_Y (GR_FONT_ATLAS_TEXTURE_HEIGHT / GR_FONT_AT LAS_PLOT_HEIGHT)
25
26 // one over width and height
27 #define GR_FONT_ATLAS_RECIP_WIDTH "0.00390625"//"0.0009765625"
28 #define GR_FONT_ATLAS_A8_RECIP_WIDTH "0.00390625"//"0.00048828125"
29 #define GR_FONT_ATLAS_RECIP_HEIGHT "0.00390625"//"0.00048828125"
30
31 // 1/(3*width)
32 // only used for distance fields, which are A8
33 #define GR_FONT_ATLAS_LCD_DELTA "0.001302083"//"0.000162760417"
34 #else
12 #define GR_FONT_ATLAS_TEXTURE_WIDTH 1024 35 #define GR_FONT_ATLAS_TEXTURE_WIDTH 1024
13 #define GR_FONT_ATLAS_A8_TEXTURE_WIDTH 2048 36 #define GR_FONT_ATLAS_A8_TEXTURE_WIDTH 2048
14 #define GR_FONT_ATLAS_TEXTURE_HEIGHT 2048 37 #define GR_FONT_ATLAS_TEXTURE_HEIGHT 2048
15 38
16 #define GR_FONT_ATLAS_PLOT_WIDTH 256 39 #define GR_FONT_ATLAS_PLOT_WIDTH 256
17 #define GR_FONT_ATLAS_A8_PLOT_WIDTH 512 40 #define GR_FONT_ATLAS_A8_PLOT_WIDTH 512
18 #define GR_FONT_ATLAS_PLOT_HEIGHT 256 41 #define GR_FONT_ATLAS_PLOT_HEIGHT 256
19 42
20 #define GR_FONT_ATLAS_NUM_PLOTS_X (GR_FONT_ATLAS_TEXTURE_WIDTH / GR_FONT_ATL AS_PLOT_WIDTH) 43 #define GR_FONT_ATLAS_NUM_PLOTS_X (GR_FONT_ATLAS_TEXTURE_WIDTH / GR_FONT_ATL AS_PLOT_WIDTH)
21 #define GR_FONT_ATLAS_A8_NUM_PLOTS_X (GR_FONT_ATLAS_A8_TEXTURE_WIDTH / GR_FONT_ ATLAS_A8_PLOT_WIDTH) 44 #define GR_FONT_ATLAS_A8_NUM_PLOTS_X (GR_FONT_ATLAS_A8_TEXTURE_WIDTH / GR_FONT_ ATLAS_A8_PLOT_WIDTH)
22 #define GR_FONT_ATLAS_NUM_PLOTS_Y (GR_FONT_ATLAS_TEXTURE_HEIGHT / GR_FONT_AT LAS_PLOT_HEIGHT) 45 #define GR_FONT_ATLAS_NUM_PLOTS_Y (GR_FONT_ATLAS_TEXTURE_HEIGHT / GR_FONT_AT LAS_PLOT_HEIGHT)
23 46
24 // one over width and height 47 // one over width and height
25 #define GR_FONT_ATLAS_RECIP_WIDTH "0.0009765625" 48 #define GR_FONT_ATLAS_RECIP_WIDTH "0.0009765625"
26 #define GR_FONT_ATLAS_A8_RECIP_WIDTH "0.00048828125" 49 #define GR_FONT_ATLAS_A8_RECIP_WIDTH "0.00048828125"
27 #define GR_FONT_ATLAS_RECIP_HEIGHT "0.00048828125" 50 #define GR_FONT_ATLAS_RECIP_HEIGHT "0.00048828125"
28 51
29 // 1/(3*width) 52 // 1/(3*width)
30 // only used for distance fields, which are A8 53 // only used for distance fields, which are A8
31 #define GR_FONT_ATLAS_LCD_DELTA "0.000162760417" 54 #define GR_FONT_ATLAS_LCD_DELTA "0.000162760417"
32
33 #endif 55 #endif
56 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698