Lines Matching defs:glyph

46  * glyph caching code is responsible for actually creating the accelerated
47 * memory surface that will contain the individual glyph images.
49 * Each glyph contains a reference to a list of cell infos - one per glyph
50 * cache. There may be multiple glyph caches (for example, one per graphics
51 * adapter), so if the glyph is cached on two devices its cell list will
52 * consists of two elements corresponding to different glyph caches.
54 * The platform-specific glyph caching code is supposed to use
55 * GetCellInfoForCache method for retrieving cache infos from the glyph's list.
57 * Note that if it is guaranteed that there will be only one global glyph
59 * for retrieving cell info for the glyph, but instead just use the struct's
91 * Attempts to add the provided glyph to the specified cache. If the
93 * stored in the glyph's cellInfo field; otherwise, its cellInfo field is
94 * set to NULL, indicating that the glyph's original bits should be rendered
95 * instead. If the cache is full, the least-recently-used glyph is
96 * invalidated and its cache cell is reassigned to the new glyph being added.
99 * "virtual" glyph cache is available for the glyph image. Platform specific
100 * glyph caching code is responsible for actually caching the glyph image
104 * cache and glyph's cell lists, NULL otherwise.
107 AccelGlyphCache_AddGlyph(GlyphCacheInfo *cache, GlyphInfo *glyph)
110 jint w = glyph->width;
111 jint h = glyph->height;
115 if ((glyph->width > cache->cellWidth) ||
116 (glyph->height > cache->cellHeight))
150 cellinfo->glyphInfo = glyph;
186 * - invalidate any glyph that may be residing in that cell
187 * - update the cell with the new resident glyph's information
226 // glyph that is about to be kicked out
231 // if the cell is occupied, notify the base glyph that the
236 // update cellinfo with glyph's occupied region information
237 cellinfo->glyphInfo = glyph;
242 // add cache cell to the glyph's cells list
243 AccelGlyphCache_AddCellInfo(glyph, cellinfo);
264 // glyph cache layout
272 // if the cell is occupied, notify the base glyph that its
296 // glyph cache
304 // if the cell is occupied, notify the base glyph that its
315 * Add cell info to the head of the glyph's list of cached cells.
318 AccelGlyphCache_AddCellInfo(GlyphInfo *glyph, CacheCellInfo *cellInfo)
320 // assert (glyph != NULL && cellInfo != NULL)
322 J2dTraceLn2(J2D_TRACE_VERBOSE, " glyph 0x%x: adding cell 0x%x to the list",
323 glyph, cellInfo);
325 cellInfo->glyphInfo = glyph;
326 cellInfo->nextGCI = glyph->cellInfo;
327 glyph->cellInfo = cellInfo;
328 glyph->managed = MANAGED_GLYPH;
332 * Removes cell info from the glyph's list of cached cells.
335 AccelGlyphCache_RemoveCellInfo(GlyphInfo *glyph, CacheCellInfo *cellInfo)
337 CacheCellInfo *currCellInfo = glyph->cellInfo;
339 // assert (glyph!= NULL && glyph->cellInfo != NULL && cellInfo != NULL)
344 " glyph 0x%x: removing cell 0x%x from glyph's list",
345 glyph, currCellInfo);
347 glyph->cellInfo = currCellInfo->nextGCI;
359 "no cell 0x%x in glyph 0x%x's cell list",
360 cellInfo, glyph);
364 * Removes cell info from the glyph's list of cached cells.
367 AccelGlyphCache_RemoveAllCellInfos(GlyphInfo *glyph)
373 if (glyph == NULL || glyph->cellInfo == NULL) {
377 // invalidate all of this glyph's accelerated cache cells
378 currCell = glyph->cellInfo;
386 glyph->cellInfo = NULL;
390 * Returns cell info associated with particular cache from the glyph's list of
394 AccelGlyphCache_GetCellInfoForCache(GlyphInfo *glyph, GlyphCacheInfo *cache)
396 // assert (glyph != NULL && cache != NULL)
399 if (glyph->cellInfo != NULL) {
400 CacheCellInfo *cellInfo = glyph->cellInfo;
404 " glyph 0x%x: found cell 0x%x for cache 0x%x",
405 glyph, cellInfo, cache);
411 J2dTraceLn2(J2D_TRACE_VERBOSE2, " glyph 0x%x: no cell for cache 0x%x",
412 glyph, cache);