Use the pitch provided by FreeType. Fixes bug 894.
Modified: trunk/reactos/subsys/win32k/objects/text.c
_____
Modified: trunk/reactos/subsys/win32k/objects/text.c
--- trunk/reactos/subsys/win32k/objects/text.c 2005-10-13 08:05:12 UTC
(rev 18423)
+++ trunk/reactos/subsys/win32k/objects/text.c 2005-10-13 08:15:52 UTC
(rev 18424)
@@ -1458,7 +1458,7 @@
FT_Face face;
FT_GlyphSlot glyph;
LONGLONG TextLeft, RealXStart;
- ULONG TextTop, pitch, previous, BackgroundLeft;
+ ULONG TextTop, previous, BackgroundLeft;
FT_Bool use_kerning;
RECTL DestRect, MaskRect, SpecifiedDestRect;
POINTL SourcePoint, BrushOrigin;
@@ -1805,9 +1805,6 @@
DPRINT1("WARNING: Failed to render glyph!\n");
goto fail;
}
- pitch = glyph->bitmap.pitch;
- } else {
- pitch = glyph->bitmap.width;
}
if (fuOptions & ETO_OPAQUE)
@@ -1845,9 +1842,17 @@
* We should create the bitmap out of the loop at the biggest
possible
* glyph size. Then use memset with 0 to clear it and sourcerect
to
* limit the work of the transbitblt.
+ *
+ * FIXME: DIB bitmaps should have an lDelta which is a multiple
of 4.
+ * Here we pass in the pitch from the FreeType bitmap, which is
not
+ * guaranteed to be a multiple of 4. If it's not, we should
expand
+ * the FreeType bitmap to a temporary bitmap.
*/
- HSourceGlyph = EngCreateBitmap(bitSize, pitch,
(glyph->bitmap.pixel_mode == ft_pixel_mode_grays) ? BMF_8BPP : BMF_1BPP,
BMF_TOPDOWN, glyph->bitmap.buffer);
+ HSourceGlyph = EngCreateBitmap(bitSize, glyph->bitmap.pitch,
+ (glyph->bitmap.pixel_mode ==
ft_pixel_mode_grays) ?
+ BMF_8BPP : BMF_1BPP, BMF_TOPDOWN,
+ glyph->bitmap.buffer);
if ( !HSourceGlyph )
{
DPRINT1("WARNING: EngLockSurface() failed!\n");
add comment about KeCancelTimer pitfall
Modified: trunk/reactos/ntoskrnl/ke/timer.c
_____
Modified: trunk/reactos/ntoskrnl/ke/timer.c
--- trunk/reactos/ntoskrnl/ke/timer.c 2005-10-12 22:15:22 UTC (rev
18418)
+++ trunk/reactos/ntoskrnl/ke/timer.c 2005-10-12 23:10:31 UTC (rev
18419)
@@ -34,6 +34,19 @@
* Timer = timer to cancel
* RETURNS: True if the timer was running
* False otherwise
+ *
+ * DANGER!
+ * The statement in the DDK for KeCancelTimer that "if a DPC object is
+ * associated with the timer, it too is canceled" is wrong -- nothing
is
+ * done with the DPC object when the timer is removed from the system
+ * queue. So its very likely that the DPC will run after you have
canceled
+ * the timer!
+ * For what it's worth, calling KeRemoveQueueDpc after KeCancelTimer
would
+ * be sufficient to prevent any problems associated with destroying the
DPC
+ * object, at least as the OS is currently implemented. This is because
the
+ * DPC dispatcher doesn't need access to the object once the DPC is
+ * dequeued, and the dequeuing happens before the DPC routine gets
called."
+ * -Gunnar (article by Walter Oney)
*/
BOOLEAN
STDCALL