LONGLONG TextLeft, RealXStart;
ULONG TextTop, previous, BackgroundLeft;
FT_Bool use_kerning;
- RECTL DestRect, MaskRect;
+ RECTL DestRect, MaskRect, DummyRect = {0, 0, 0, 0};
POINTL SourcePoint, BrushOrigin;
HBITMAP HSourceGlyph;
SURFOBJ *SourceGlyphSurf;
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)
- DC_vUpdateTextBrush(dc);
-
if ((fuOptions & ETO_OPAQUE) || pdcattr->jBkMode == OPAQUE)
{
if (pdcattr->ulDirty_ & DIRTY_BACKGROUND)
IntLPtoDP(dc, (POINT *)lprc, 2);
}
- psurf = dc->dclevel.pSurface;
- if (!psurf)
- {
- goto fail;
- }
- SurfObj = &psurf->SurfObj;
-
Start.x = XStart;
Start.y = YStart;
IntLPtoDP(dc, &Start, 1);
DestRect.right += dc->ptlDCOrig.x;
DestRect.bottom += dc->ptlDCOrig.y;
+ DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect);
+
+ if (pdcattr->ulDirty_ & DIRTY_BACKGROUND)
+ DC_vUpdateBackgroundBrush(dc);
+
IntEngBitBlt(
- &psurf->SurfObj,
+ &dc->dclevel.pSurface->SurfObj,
NULL,
NULL,
dc->rosdc.CombinedClip,
&BrushOrigin,
ROP3_TO_ROP4(PATCOPY));
fuOptions &= ~ETO_OPAQUE;
+ DC_vFinishBlit(dc, NULL);
}
else
{
TextTop = YStart;
BackgroundLeft = (RealXStart + 32) >> 6;
+ /* Lock blit with a dummy rect */
+ DC_vPrepareDCsForBlit(dc, DummyRect, NULL, DummyRect);
+
+ psurf = dc->dclevel.pSurface ;
+ SurfObj = &psurf->SurfObj ;
+
/* Create the xlateobj */
hDestPalette = psurf->hDIBPalette;
if (!hDestPalette) hDestPalette = pPrimarySurface->devinfo.hpalDefault;
EXLATEOBJ_vInitialize(&exloDst2RGB, ppalDst, &gpalRGB, 0, 0, 0);
PALETTE_UnlockPalette(ppalDst);
+ if ((fuOptions & ETO_OPAQUE) && (dc->pdcattr->ulDirty_ & DIRTY_BACKGROUND))
+ DC_vUpdateBackgroundBrush(dc) ;
+
+ if(dc->pdcattr->ulDirty_ & DIRTY_TEXT)
+ DC_vUpdateTextBrush(dc) ;
/*
* The main rendering loop.
*/
-
for (i = 0; i < Count; i++)
{
if (fuOptions & ETO_GLYPH_INDEX)
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,
&dc->eboBackground.BrushObject,
&BrushOrigin,
ROP3_TO_ROP4(PATCOPY));
+ DC_vFinishBlit(dc, NULL);
BackgroundLeft = DestRect.right;
+
}
DestRect.left = ((TextLeft + 32) >> 6) + realglyph->left;
DestRect.right = lprc->right + dc->ptlDCOrig.x;
DoBreak = TRUE;
}
-
+ DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect);
IntEngMaskBlt(
SurfObj,
SourceGlyphSurf,
(PPOINTL)&MaskRect,
&dc->eboText.BrushObject,
&BrushOrigin);
+ DC_vFinishBlit(dc, NULL);
EngUnlockSurface(SourceGlyphSurf);
EngDeleteSurface((HSURF)HSourceGlyph);
String++;
}
-
IntUnLockFreeType;
+ DC_vFinishBlit(dc, NULL) ;
EXLATEOBJ_vCleanup(&exloRGB2Dst);
EXLATEOBJ_vCleanup(&exloDst2RGB);
if (TextObj != NULL)
TEXTOBJ_UnlockText(TextObj);
good:
- DC_vFinishBlit(dc, NULL);
DC_UnlockDc( dc );
return TRUE;
fail:
if (TextObj != NULL)
TEXTOBJ_UnlockText(TextObj);
- DC_vFinishBlit(dc, NULL);
+
DC_UnlockDc(dc);
return FALSE;