Author: tkreuzer
Date: Sat Mar 24 18:52:48 2012
New Revision: 56222
URL:
http://svn.reactos.org/svn/reactos?rev=56222&view=rev
Log:
[WIN32K]
Allow to build win32k with the new dib library, a switch is in win32k's
CMakeLists.txt
Added:
trunk/reactos/subsystems/win32/win32k/dib/dib_new.c (with props)
Modified:
trunk/reactos/subsystems/win32/win32k/CMakeLists.txt
trunk/reactos/subsystems/win32/win32k/dib/dib1bpp.c
trunk/reactos/subsystems/win32/win32k/dib/dib4bpp.c
Modified: trunk/reactos/subsystems/win32/win32k/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/CM…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/CMakeLists.txt [iso-8859-1] Sat Mar 24 18:52:48
2012
@@ -1,3 +1,5 @@
+
+set (USE_DIBLIB FALSE)
spec2def(win32k.sys win32k.spec ADD_IMPORTLIB)
@@ -33,7 +35,6 @@
dib/dib16bpp.c
dib/dib24bpp.c
dib/dib32bpp.c
- dib/dib.c
dib/floodfill.c
dib/stretchblt.c
eng/alphablend.c
@@ -41,8 +42,8 @@
eng/engbrush.c
eng/engevent.c
eng/clip.c
- eng/copybits.c
eng/debug.c
+ eng/drvdbg.c
eng/device.c
eng/driverobj.c
eng/error.c
@@ -143,7 +144,7 @@
objects/font.c
objects/freetype.c
objects/gdibatch.c
- objects/gdidbg.c
+ objects/gdidbg.c
objects/gdiobj.c
objects/gdipool.c
objects/icm.c
@@ -164,7 +165,18 @@
stubs/umpdstubs.c
win32k.rc)
-list(APPEND SOURCE ${GENDIB_FILES})
+if (USE_DIBLIB)
+ add_definitions(
+ -D_USE_DIBLIB_)
+ list(APPEND SOURCE
+ dib/dib_new.c
+ eng/bitblt_new.c)
+else()
+ list(APPEND SOURCE
+ dib/dib.c
+ eng/copybits.c
+ ${GENDIB_FILES})
+endif()
if(ARCH MATCHES i386)
list(APPEND SOURCE
@@ -194,6 +206,11 @@
dxguid
libcntpr)
+if (USE_DIBLIB)
+ target_link_libraries(win32k
+ diblib)
+endif()
+
add_importlibs(win32k ntoskrnl hal ftfd)
add_pch(win32k pch.h)
add_cd_file(TARGET win32k DESTINATION reactos/system32 FOR all)
@@ -201,3 +218,9 @@
add_library(win32ksys sys-stubs.S)
set_source_files_properties(sys-stubs.S PROPERTIES OBJECT_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/w32ksvc.h)
+
+if (USE_DIBLIB)
+ add_subdirectory(diblib)
+endif()
+
+
Modified: trunk/reactos/subsystems/win32/win32k/dib/dib1bpp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/di…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/dib/dib1bpp.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/dib/dib1bpp.c [iso-8859-1] Sat Mar 24 18:52:48
2012
@@ -313,6 +313,7 @@
return TRUE;
}
+#ifndef _USE_DIBLIB_
BOOLEAN
DIB_1BPP_BitBlt(PBLTINFO BltInfo)
{
@@ -465,6 +466,7 @@
}
return TRUE;
}
+#endif // !_USE_DIBLIB_
BOOLEAN
DIB_1BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
Modified: trunk/reactos/subsystems/win32/win32k/dib/dib4bpp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/di…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/dib/dib4bpp.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/dib/dib4bpp.c [iso-8859-1] Sat Mar 24 18:52:48
2012
@@ -55,6 +55,7 @@
}
}
+#ifndef _USE_DIBLIB_
BOOLEAN
DIB_4BPP_BitBltSrcCopy(PBLTINFO BltInfo)
{
@@ -366,6 +367,7 @@
}
return TRUE;
}
+#endif // !_USE_DIBLIB_
BOOLEAN
DIB_4BPP_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
Added: trunk/reactos/subsystems/win32/win32k/dib/dib_new.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/di…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/dib/dib_new.c (added)
+++ trunk/reactos/subsystems/win32/win32k/dib/dib_new.c [iso-8859-1] Sat Mar 24 18:52:48
2012
@@ -1,0 +1,152 @@
+/*
+ * PROJECT: Win32 subsystem
+ * LICENSE: See COPYING in the top level directory
+ * FILE: subsystems/win32/win32k/dib/dib.c
+ * PURPOSE: ROP handling, function pointer arrays, misc
+ * PROGRAMMERS: Ge van Geldorp
+ */
+
+
+#include <win32k.h>
+#include "..\diblib\DibLib_interface.h"
+
+/* Static data */
+
+unsigned char notmask[2] = { 0x0f, 0xf0 };
+unsigned char altnotmask[2] = { 0xf0, 0x0f };
+
+ULONG
+DIB_DoRop(ULONG Rop, ULONG Dest, ULONG Source, ULONG Pattern)
+{
+ return gapfnRop[Rop & 0xFF](Dest, Source, Pattern);
+}
+
+DIB_FUNCTIONS DibFunctionsForBitmapFormat[] =
+{
+ /* 0 */
+ {
+ Dummy_PutPixel, Dummy_GetPixel, Dummy_HLine, Dummy_VLine,
+ 0, 0, Dummy_StretchBlt, Dummy_TransparentBlt,
+ 0, Dummy_AlphaBlend
+ },
+ /* BMF_1BPP */
+ {
+ DIB_1BPP_PutPixel, DIB_1BPP_GetPixel, DIB_1BPP_HLine, DIB_1BPP_VLine,
+ 0, 0, DIB_XXBPP_StretchBlt,
+ DIB_1BPP_TransparentBlt, 0, DIB_XXBPP_AlphaBlend
+ },
+ /* BMF_4BPP */
+ {
+ DIB_4BPP_PutPixel, DIB_4BPP_GetPixel, DIB_4BPP_HLine, DIB_4BPP_VLine,
+ 0, 0, DIB_XXBPP_StretchBlt,
+ DIB_4BPP_TransparentBlt, 0, DIB_XXBPP_AlphaBlend
+ },
+ /* BMF_8BPP */
+ {
+ DIB_8BPP_PutPixel, DIB_8BPP_GetPixel, DIB_8BPP_HLine, DIB_8BPP_VLine,
+ 0, 0, DIB_XXBPP_StretchBlt,
+ DIB_8BPP_TransparentBlt, 0, DIB_XXBPP_AlphaBlend
+ },
+ /* BMF_16BPP */
+ {
+ DIB_16BPP_PutPixel, DIB_16BPP_GetPixel, DIB_16BPP_HLine, DIB_16BPP_VLine,
+ 0, 0, DIB_XXBPP_StretchBlt,
+ DIB_16BPP_TransparentBlt, 0, DIB_XXBPP_AlphaBlend
+ },
+ /* BMF_24BPP */
+ {
+ DIB_24BPP_PutPixel, DIB_24BPP_GetPixel, DIB_24BPP_HLine, DIB_24BPP_VLine,
+ 0, 0, DIB_XXBPP_StretchBlt,
+ DIB_24BPP_TransparentBlt, 0, DIB_24BPP_AlphaBlend
+ },
+ /* BMF_32BPP */
+ {
+ DIB_32BPP_PutPixel, DIB_32BPP_GetPixel, DIB_32BPP_HLine, DIB_32BPP_VLine,
+ 0, 0, DIB_XXBPP_StretchBlt,
+ DIB_32BPP_TransparentBlt, 0, DIB_32BPP_AlphaBlend
+ },
+ /* BMF_4RLE */
+ {
+ Dummy_PutPixel, Dummy_GetPixel, Dummy_HLine, Dummy_VLine,
+ 0, 0, Dummy_StretchBlt, Dummy_TransparentBlt,
+ 0, Dummy_AlphaBlend
+ },
+ /* BMF_8RLE */
+ {
+ Dummy_PutPixel, Dummy_GetPixel, Dummy_HLine, Dummy_VLine,
+ 0, 0, Dummy_StretchBlt, Dummy_TransparentBlt,
+ 0, Dummy_AlphaBlend
+ },
+ /* BMF_JPEG */
+ {
+ Dummy_PutPixel, Dummy_GetPixel, Dummy_HLine, Dummy_VLine,
+ 0, 0, Dummy_StretchBlt, Dummy_TransparentBlt,
+ 0, Dummy_AlphaBlend
+ },
+ /* BMF_PNG */
+ {
+ Dummy_PutPixel, Dummy_GetPixel, Dummy_HLine, Dummy_VLine,
+ 0, 0, Dummy_StretchBlt, Dummy_TransparentBlt,
+ 0, Dummy_AlphaBlend
+ }
+};
+
+
+VOID Dummy_PutPixel(SURFOBJ* SurfObj, LONG x, LONG y, ULONG c)
+{
+ return;
+}
+
+ULONG Dummy_GetPixel(SURFOBJ* SurfObj, LONG x, LONG y)
+{
+ return 0;
+}
+
+VOID Dummy_HLine(SURFOBJ* SurfObj, LONG x1, LONG x2, LONG y, ULONG c)
+{
+ return;
+}
+
+VOID Dummy_VLine(SURFOBJ* SurfObj, LONG x, LONG y1, LONG y2, ULONG c)
+{
+ return;
+}
+
+BOOLEAN Dummy_BitBlt(PBLTINFO BltInfo)
+{
+ return FALSE;
+}
+
+BOOLEAN Dummy_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
+ SURFOBJ *PatternSurface, SURFOBJ *MaskSurf,
+ RECTL* DestRect, RECTL *SourceRect,
+ POINTL* MaskOrigin, BRUSHOBJ* Brush,
+ POINTL* BrushOrign,
+ XLATEOBJ *ColorTranslation,
+ ROP4 Rop)
+{
+ return FALSE;
+}
+
+BOOLEAN Dummy_TransparentBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
+ RECTL* DestRect, RECTL *SourceRect,
+ XLATEOBJ *ColorTranslation, ULONG iTransColor)
+{
+ return FALSE;
+}
+
+BOOLEAN Dummy_ColorFill(SURFOBJ* Dest, RECTL* DestRect, ULONG Color)
+{
+ return FALSE;
+}
+
+
+BOOLEAN
+Dummy_AlphaBlend(SURFOBJ* Dest, SURFOBJ* Source, RECTL* DestRect,
+ RECTL* SourceRect, CLIPOBJ* ClipRegion,
+ XLATEOBJ* ColorTranslation, BLENDOBJ* BlendObj)
+{
+ return FALSE;
+}
+
+/* EOF */
Propchange: trunk/reactos/subsystems/win32/win32k/dib/dib_new.c
------------------------------------------------------------------------------
svn:eol-style = native