Author: jgardou Date: Mon Apr 19 02:51:32 2010 New Revision: 46934
URL: http://svn.reactos.org/svn/reactos?rev=46934&view=rev Log: [WIN32k] - Don't hold the DC blit lock during the whole GreTextOutW function.
Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/freetype.c
Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/freetype.c URL: http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win3... ============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Mon Apr 19 02:51:32 2010 @@ -3187,9 +3187,6 @@ return TRUE; }
- /* FIXME : This is ugly, but this function must be rewritten anyway */ - DC_vPrepareDCsForBlit(dc, dc->rosdc.CombinedClip->rclBounds, NULL, DestRect); - pdcattr = dc->pdcattr;
if (pdcattr->ulDirty_ & DIRTY_TEXT) @@ -3262,6 +3259,8 @@ DestRect.top += dc->ptlDCOrig.y; DestRect.right += dc->ptlDCOrig.x; DestRect.bottom += dc->ptlDCOrig.y; + + DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect);
IntEngBitBlt( &psurf->SurfObj, @@ -3276,6 +3275,7 @@ &BrushOrigin, ROP3_TO_ROP4(PATCOPY)); fuOptions &= ~ETO_OPAQUE; + DC_vFinishBlit(dc, NULL); } else { @@ -3454,7 +3454,6 @@ /* * The main rendering loop. */ - for (i = 0; i < Count; i++) { if (fuOptions & ETO_GLYPH_INDEX) @@ -3503,6 +3502,7 @@ DestRect.right = (TextLeft + (realglyph->root.advance.x >> 10) + 32) >> 6; DestRect.top = TextTop + yoff - ((face->size->metrics.ascender + 32) >> 6); DestRect.bottom = TextTop + yoff + ((32 - face->size->metrics.descender) >> 6); + DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect); IntEngBitBlt( &psurf->SurfObj, NULL, @@ -3515,7 +3515,9 @@ &dc->eboBackground.BrushObject, &BrushOrigin, ROP3_TO_ROP4(PATCOPY)); + DC_vFinishBlit(dc, NULL); BackgroundLeft = DestRect.right; + }
DestRect.left = ((TextLeft + 32) >> 6) + realglyph->left; @@ -3568,7 +3570,7 @@ DestRect.right = lprc->right + dc->ptlDCOrig.x; DoBreak = TRUE; } - + DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect); IntEngMaskBlt( SurfObj, SourceGlyphSurf, @@ -3579,6 +3581,7 @@ (PPOINTL)&MaskRect, &dc->eboText.BrushObject, &BrushOrigin); + DC_vFinishBlit(dc, NULL);
EngUnlockSurface(SourceGlyphSurf); EngDeleteSurface((HSURF)HSourceGlyph); @@ -3608,7 +3611,6 @@
String++; } - IntUnLockFreeType;
EXLATEOBJ_vCleanup(&exloRGB2Dst); @@ -3616,7 +3618,6 @@ if (TextObj != NULL) TEXTOBJ_UnlockText(TextObj); good: - DC_vFinishBlit(dc, NULL); DC_UnlockDc( dc );
return TRUE; @@ -3627,7 +3628,7 @@ fail: if (TextObj != NULL) TEXTOBJ_UnlockText(TextObj); - DC_vFinishBlit(dc, NULL); + DC_UnlockDc(dc);
return FALSE;