- Don't hold the DC blit lock during the whole GreTextOutW function.

svn path=/branches/reactos-yarotows/; revision=46934
This commit is contained in:
Jérôme Gardou 2010-04-19 00:51:32 +00:00
parent a98902ef25
commit 75dff0cf6a

View file

@ -3187,9 +3187,6 @@ GreExtTextOutW(
return TRUE; 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; pdcattr = dc->pdcattr;
if (pdcattr->ulDirty_ & DIRTY_TEXT) if (pdcattr->ulDirty_ & DIRTY_TEXT)
@ -3263,6 +3260,8 @@ GreExtTextOutW(
DestRect.right += dc->ptlDCOrig.x; DestRect.right += dc->ptlDCOrig.x;
DestRect.bottom += dc->ptlDCOrig.y; DestRect.bottom += dc->ptlDCOrig.y;
DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect);
IntEngBitBlt( IntEngBitBlt(
&psurf->SurfObj, &psurf->SurfObj,
NULL, NULL,
@ -3276,6 +3275,7 @@ GreExtTextOutW(
&BrushOrigin, &BrushOrigin,
ROP3_TO_ROP4(PATCOPY)); ROP3_TO_ROP4(PATCOPY));
fuOptions &= ~ETO_OPAQUE; fuOptions &= ~ETO_OPAQUE;
DC_vFinishBlit(dc, NULL);
} }
else else
{ {
@ -3454,7 +3454,6 @@ GreExtTextOutW(
/* /*
* The main rendering loop. * The main rendering loop.
*/ */
for (i = 0; i < Count; i++) for (i = 0; i < Count; i++)
{ {
if (fuOptions & ETO_GLYPH_INDEX) if (fuOptions & ETO_GLYPH_INDEX)
@ -3503,6 +3502,7 @@ GreExtTextOutW(
DestRect.right = (TextLeft + (realglyph->root.advance.x >> 10) + 32) >> 6; DestRect.right = (TextLeft + (realglyph->root.advance.x >> 10) + 32) >> 6;
DestRect.top = TextTop + yoff - ((face->size->metrics.ascender + 32) >> 6); DestRect.top = TextTop + yoff - ((face->size->metrics.ascender + 32) >> 6);
DestRect.bottom = TextTop + yoff + ((32 - face->size->metrics.descender) >> 6); DestRect.bottom = TextTop + yoff + ((32 - face->size->metrics.descender) >> 6);
DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect);
IntEngBitBlt( IntEngBitBlt(
&psurf->SurfObj, &psurf->SurfObj,
NULL, NULL,
@ -3515,7 +3515,9 @@ GreExtTextOutW(
&dc->eboBackground.BrushObject, &dc->eboBackground.BrushObject,
&BrushOrigin, &BrushOrigin,
ROP3_TO_ROP4(PATCOPY)); ROP3_TO_ROP4(PATCOPY));
DC_vFinishBlit(dc, NULL);
BackgroundLeft = DestRect.right; BackgroundLeft = DestRect.right;
} }
DestRect.left = ((TextLeft + 32) >> 6) + realglyph->left; DestRect.left = ((TextLeft + 32) >> 6) + realglyph->left;
@ -3568,7 +3570,7 @@ GreExtTextOutW(
DestRect.right = lprc->right + dc->ptlDCOrig.x; DestRect.right = lprc->right + dc->ptlDCOrig.x;
DoBreak = TRUE; DoBreak = TRUE;
} }
DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect);
IntEngMaskBlt( IntEngMaskBlt(
SurfObj, SurfObj,
SourceGlyphSurf, SourceGlyphSurf,
@ -3579,6 +3581,7 @@ GreExtTextOutW(
(PPOINTL)&MaskRect, (PPOINTL)&MaskRect,
&dc->eboText.BrushObject, &dc->eboText.BrushObject,
&BrushOrigin); &BrushOrigin);
DC_vFinishBlit(dc, NULL);
EngUnlockSurface(SourceGlyphSurf); EngUnlockSurface(SourceGlyphSurf);
EngDeleteSurface((HSURF)HSourceGlyph); EngDeleteSurface((HSURF)HSourceGlyph);
@ -3608,7 +3611,6 @@ GreExtTextOutW(
String++; String++;
} }
IntUnLockFreeType; IntUnLockFreeType;
EXLATEOBJ_vCleanup(&exloRGB2Dst); EXLATEOBJ_vCleanup(&exloRGB2Dst);
@ -3616,7 +3618,6 @@ GreExtTextOutW(
if (TextObj != NULL) if (TextObj != NULL)
TEXTOBJ_UnlockText(TextObj); TEXTOBJ_UnlockText(TextObj);
good: good:
DC_vFinishBlit(dc, NULL);
DC_UnlockDc( dc ); DC_UnlockDc( dc );
return TRUE; return TRUE;
@ -3627,7 +3628,7 @@ fail2:
fail: fail:
if (TextObj != NULL) if (TextObj != NULL)
TEXTOBJ_UnlockText(TextObj); TEXTOBJ_UnlockText(TextObj);
DC_vFinishBlit(dc, NULL);
DC_UnlockDc(dc); DC_UnlockDc(dc);
return FALSE; return FALSE;