EXA: Try to accelerate non-antialiased text via the glyph cache as well.
Treat 1 bit glyphs and masks as PICT_a8 in the glyph cache. We're not able to accelerate them otherwise.
This commit is contained in:
		
							parent
							
								
									a65d530040
								
							
						
					
					
						commit
						8349732a67
					
				| 
						 | 
					@ -374,6 +374,10 @@ exaGlyphCacheUploadGlyph(ScreenPtr         pScreen,
 | 
				
			||||||
    if (exaPixmapIsOffscreen(pGlyphPixmap))
 | 
					    if (exaPixmapIsOffscreen(pGlyphPixmap))
 | 
				
			||||||
	return FALSE;
 | 
						return FALSE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* UploadToScreen only works if bpp match */
 | 
				
			||||||
 | 
					    if (pGlyphPixmap->drawable.bitsPerPixel != pCachePixmap->drawable.bitsPerPixel)
 | 
				
			||||||
 | 
						return FALSE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* cache pixmap must be offscreen. */
 | 
					    /* cache pixmap must be offscreen. */
 | 
				
			||||||
    pixmaps[0].as_dst = TRUE;
 | 
					    pixmaps[0].as_dst = TRUE;
 | 
				
			||||||
    pixmaps[0].as_src = FALSE;
 | 
					    pixmaps[0].as_src = FALSE;
 | 
				
			||||||
| 
						 | 
					@ -525,6 +529,9 @@ exaBufferGlyph(ScreenPtr         pScreen,
 | 
				
			||||||
    if (buffer->count == GLYPH_BUFFER_SIZE)
 | 
					    if (buffer->count == GLYPH_BUFFER_SIZE)
 | 
				
			||||||
	return ExaGlyphNeedFlush;
 | 
						return ExaGlyphNeedFlush;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (PICT_FORMAT_BPP(format) == 1)
 | 
				
			||||||
 | 
						format = PICT_a8;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) {
 | 
					    for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) {
 | 
				
			||||||
	ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i];
 | 
						ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -796,6 +803,14 @@ exaGlyphs (CARD8 	 op,
 | 
				
			||||||
	    return;
 | 
						    return;
 | 
				
			||||||
	width = extents.x2 - extents.x1;
 | 
						width = extents.x2 - extents.x1;
 | 
				
			||||||
	height = extents.y2 - extents.y1;
 | 
						height = extents.y2 - extents.y1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (maskFormat->depth == 1) {
 | 
				
			||||||
 | 
						    PictFormatPtr a8Format = PictureMatchFormat (pScreen, 8, PICT_a8);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						    if (a8Format)
 | 
				
			||||||
 | 
							maskFormat = a8Format;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
 | 
						pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
 | 
				
			||||||
						maskFormat->depth,
 | 
											maskFormat->depth,
 | 
				
			||||||
						CREATE_PIXMAP_USAGE_SCRATCH);
 | 
											CREATE_PIXMAP_USAGE_SCRATCH);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue