[ros-diffs] [sir_richard] 46117: [WIN32K]: Enable the alignment code and reduce the number of hacks, leaving only one for 1bpp top-down output (Freetype?) which doesn't seem to like when the lDelta is aligned to the correct bit-boundary. This should fix the crashes and graphic cltches recently introduced.
sir_richard at svn.reactos.org
sir_richard at svn.reactos.org
Thu Mar 11 22:41:20 CET 2010
- Previous message: [ros-diffs] [janderwald] 46116: [KSPROXY] - Recreate resource file with visual studio - Fix compilation with msvc - Copy extra format buffer in IEnumMediaTypes::Next - Create the pin handle in IPin::ReceiveConnection - Implement IPin::Disconnect for the input pin - Enumerate media formats and pass it to constructor of CEnumMediaTypes - Check if the passed format is null in CInputPin::CheckFormat - Copy extra format buffer after KSDATAFORMAT in the pin connection request - Implement KsGetMediaType function - Implement ISpecifyPropertyPages, IKsPropertySet, IKsControl, IStreamBuilder, IKsPinFactory for the output pin - Implement IPin::ReceiveConnection, IPin::EnumMediaTypes for output pin - Stub interfaces for IReferenceClock, IMediaSeeking, IKsTopology, IKsAggregateControl, IKsClockPropertySet, ISpecifyPropertyPages, IPersistStream for proxy filter - Implement IAMDeviceRemoval, IKsControl, IAMFilterMiscFlags, IKsPropertySet interface for proxy filter
- Next message: [ros-diffs] [janderwald] 46118: [KSPROXY] - Fix trunk
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: sir_richard
Date: Thu Mar 11 22:41:19 2010
New Revision: 46117
URL: http://svn.reactos.org/svn/reactos?rev=46117&view=rev
Log:
[WIN32K]: Enable the alignment code and reduce the number of hacks, leaving only one for 1bpp top-down output (Freetype?) which doesn't seem to like when the lDelta is aligned to the correct bit-boundary. This should fix the crashes and graphic cltches recently introduced.
Modified:
trunk/reactos/subsystems/win32/win32k/eng/surface.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/surface.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng/surface.c?rev=46117&r1=46116&r2=46117&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] Thu Mar 11 22:41:19 2010
@@ -475,27 +475,27 @@
switch (BitmapInfo->Format)
{
case BMF_1BPP:
- //ScanLine = ((BitmapInfo->Width + 31) & ~31) / 8;
+ ScanLine = ((BitmapInfo->Width + 31) & ~31) >> 3;
break;
case BMF_4BPP:
- //ScanLine = ((BitmapInfo->Width + 7) & ~7) / 2;
+ ScanLine = ((BitmapInfo->Width + 7) & ~7) >> 1;
break;
case BMF_8BPP:
- //ScanLine = ((BitmapInfo->Width + 3) & ~3);
+ ScanLine = (BitmapInfo->Width + 3) & ~3;
break;
case BMF_16BPP:
- //ScanLine = ((BitmapInfo->Width + 1) & ~1) * 2;
+ ScanLine = ((BitmapInfo->Width + 1) & ~1) << 1;
break;
case BMF_24BPP:
- //ScanLine = ((BitmapInfo->Width * 3) + 3) & ~3;
+ ScanLine = ((BitmapInfo->Width * 3) + 3) & ~3;
break;
case BMF_32BPP:
- // ScanLine = BitmapInfo->Width * 4;
+ ScanLine = BitmapInfo->Width << 2;
break;
case BMF_8RLE:
@@ -509,8 +509,6 @@
DPRINT1("Invalid bitmap format\n");
return NULL;
}
-
- ScanLine = BitmapInfo->Width;
/* Does the device manage its own surface? */
if (!Bits)
@@ -604,6 +602,9 @@
/* For topdown, the base address starts with the bits */
pso->pvScan0 = pso->pvBits;
pso->lDelta = ScanLine;
+
+ /* Hack for FreeType/Font Rendering, cannot use the Aligned ScanLine */
+ if (BitmapInfo->Format == BMF_1BPP) pso->lDelta = BitmapInfo->Width / 8;
}
else
{
@@ -669,7 +670,6 @@
*/
if ((Bits) && (Width))
{
- #if 0
switch (BitmapInfo.Format)
{
/* Do the conversion for each bit depth we support */
@@ -692,9 +692,6 @@
BitmapInfo.Width = Width / 4;
break;
}
-#endif
- BitmapInfo.Width = Width;
-
}
/* Now create the surface */
- Previous message: [ros-diffs] [janderwald] 46116: [KSPROXY] - Recreate resource file with visual studio - Fix compilation with msvc - Copy extra format buffer in IEnumMediaTypes::Next - Create the pin handle in IPin::ReceiveConnection - Implement IPin::Disconnect for the input pin - Enumerate media formats and pass it to constructor of CEnumMediaTypes - Check if the passed format is null in CInputPin::CheckFormat - Copy extra format buffer after KSDATAFORMAT in the pin connection request - Implement KsGetMediaType function - Implement ISpecifyPropertyPages, IKsPropertySet, IKsControl, IStreamBuilder, IKsPinFactory for the output pin - Implement IPin::ReceiveConnection, IPin::EnumMediaTypes for output pin - Stub interfaces for IReferenceClock, IMediaSeeking, IKsTopology, IKsAggregateControl, IKsClockPropertySet, ISpecifyPropertyPages, IPersistStream for proxy filter - Implement IAMDeviceRemoval, IKsControl, IAMFilterMiscFlags, IKsPropertySet interface for proxy filter
- Next message: [ros-diffs] [janderwald] 46118: [KSPROXY] - Fix trunk
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Ros-diffs
mailing list