diff --git a/headers/private/servers/app/ServerConfig.h b/headers/private/servers/app/ServerConfig.h index 4095690dc6..8ef9cd9628 100644 --- a/headers/private/servers/app/ServerConfig.h +++ b/headers/private/servers/app/ServerConfig.h @@ -8,50 +8,16 @@ #define TEST_MODE 1 #endif -// The ViewDriver is a BView/BWindow combination. Plenty of functionality, -// but dog-slow. -#define VIEWDRIVER 0 - -// The ScreenDriver utilizes a BWindowScreen to directly access the video -// hardware. -#define SCREENDRIVER 1 - -// The SecondDriver allows the server to make use of a second video card while -// still running as a regular BeOS application. You could say it's training -// wheels for the HWDriver -#define SECONDDRIVER 2 - -// The HWDriver is the real thing - loads all the graphics hardware and -// literally takes over the system as the app_server is supposed to. This -// one can be used only when the app_server is running as *the* app_server -// and not in testing mode like the other drivers are for. -#define HWDRIVER 3 - - -#define DIRECTDRIVER 4 - -// The Painter driver will be a complete app_server drawing backend based on -// the Anti-Grain Geometry 2D graphics engine. The Painter class encapsulates -// all AGG related functionality, while the DisplayDriverPainter class uses -// a Painter object to implement all app_server required drawing functions. -#define PAINTERDRIVER 5 - -// Display driver to be used by the server. -#ifndef DISPLAYDRIVER -# define DISPLAYDRIVER PAINTERDRIVER -//# define DISPLAYDRIVER VIEWDRIVER -#endif - // Uncomment this if the DisplayDriver should only rely on drawing functions implemented // in software even though hardware-accelerated functions are available +// NOTE: everything is software right now (since DisplayDriverPainter) //#define DISABLE_HARDWARE_ACCELERATION // Define this for a quick hack to test some of the drawing functions //#define DISPLAYDRIVER_TEST_HACK // Define this if you want the display driver to emulate the input server. -// Comment this out if DISPLAYDRIVER is defined as HWDRIVER. -#if DISPLAYDRIVER != HWDRIVER +#if TEST_MODE # define ENABLE_INPUT_SERVER_EMULATION #endif diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index 4d536b723e..e58f1e9541 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -31,6 +31,7 @@ #include "AppServer.h" #include "Desktop.h" #include "DisplayDriver.h" +#include "DisplayDriverPainter.h" #include "Globals.h" #include "Layer.h" #include "RootLayer.h" @@ -41,17 +42,6 @@ #include "WinBorder.h" #include "Workspace.h" -#if DISPLAYDRIVER == HWDRIVER -// #include "AccelerantDriver.h" - #include "DisplayDriverPainter.h" -#elif DISPLAYDRIVER == DIRECTDRIVER - #include "DirectDriver.h" -#elif DISPLAYDRIVER == PAINTERDRIVER - #include "DisplayDriverPainter.h" -#else - #include "ViewDriver.h" -#endif - //#define DEBUG_DESKTOP #ifdef DEBUG_DESKTOP @@ -87,35 +77,17 @@ Desktop::Init(void) { DisplayDriver *driver = NULL; -#if DISPLAYDRIVER == HWDRIVER - // If we're using the AccelerantDriver for rendering, eventually we will loop through - // drivers until one can't initialize in order to support multiple monitors. For now, - // we'll just load one and be done with it. + // Eventually we will loop through drivers until + // one can't initialize in order to support multiple monitors. + // For now, we'll just load one and be done with it. bool initDrivers = true; while (initDrivers) { -// driver = new AccelerantDriver(); driver = new DisplayDriverPainter(); AddDriver(driver); initDrivers = false; } -#elif DISPLAYDRIVER == DIRECTDRIVER - // It would be nice to have this for the default testing driver. Someday.... - driver = new DirectDriver(); - AddDriver(driver); - -#elif DISPLAYDRIVER == PAINTERDRIVER - // It would be nice to have this for the default testing driver. Someday.... - driver = new DisplayDriverPainter(); - AddDriver(driver); - -#else - // It would be nice to not ever need this again.... - driver = new ViewDriver(); - AddDriver(driver); -#endif - if (fScreenList.CountItems() < 1) { delete this; return; @@ -137,7 +109,7 @@ Desktop::AddDriver(DisplayDriver *driver) // Screen *sc = new Screen(driver, BPoint(640, 480), B_GRAY8, fScreenList.CountItems()+1); // Screen *sc = new Screen(driver, BPoint(640, 480), B_RGB15, fScreenList.CountItems()+1); // Screen *sc = new Screen(driver, BPoint(640, 480), B_RGB16, fScreenList.CountItems()+1); -// Screen *sc = new Screen(driver, BPoint(1024, 768), B_RGB32, fScreenList.CountItems()+1); +// Screen *sc = new Screen(driver, BPoint(800, 600), B_RGB32, fScreenList.CountItems()+1); fScreenList.AddItem(sc); } else { driver->Shutdown(); diff --git a/src/servers/app/Jamfile b/src/servers/app/Jamfile index d71c875d08..3b37ff5049 100644 --- a/src/servers/app/Jamfile +++ b/src/servers/app/Jamfile @@ -16,14 +16,13 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) drawing ] ; if ( $(TARGET_PLATFORM) = haiku ) { # This overrides the definitions in private/servers/app/ServerConfig.h - defines = [ FDefines DISPLAYDRIVER=HWDRIVER TEST_MODE=0 ] ; + defines = [ FDefines TEST_MODE=0 ] ; SubDirCcFlags $(defines) ; SubDirC++Flags $(defines) ; VIEW_DRIVER_SOURCES = AccelerantBuffer.cpp -# AccelerantDriver.cpp AccelerantHWInterface.cpp DisplayDriverPainter.cpp HWInterface.cpp @@ -33,21 +32,14 @@ if ( $(TARGET_PLATFORM) = haiku ) { } else { VIEW_DRIVER_SOURCES = fake_input_server.cpp -# AccelerantDriver.cpp -# BitmapDriver.cpp -# ViewDriver.cpp -# DirectDriver.cpp - # We'll just remove this from the build for a little while... - #ScreenDriver.cpp - # Painter based DisplayDriver Classes BitmapBuffer.cpp AccelerantBuffer.cpp + AccelerantHWInterface.cpp DisplayDriverPainter.cpp HWInterface.cpp MallocBuffer.cpp UpdateQueue.cpp ViewHWInterface.cpp - AccelerantHWInterface.cpp ; } @@ -57,7 +49,6 @@ SharedLibrary appserver : BitmapManager.cpp ColorSet.cpp CursorData.cpp - CursorHandler.cpp Decorator.cpp FontFamily.cpp GraphicsBuffer.cpp @@ -76,10 +67,7 @@ SharedLibrary appserver : # drawing PatternHandler.cpp - PixelRenderer.cpp DisplayDriver.cpp - #DisplayDriverImpl.cpp - DisplaySupport.cpp ; Server app_server : @@ -99,7 +87,6 @@ Server app_server : # DisplayDriver Classes $(VIEW_DRIVER_SOURCES) - # Clipper.cpp DefaultDecorator.cpp Layer.cpp RootLayer.cpp diff --git a/src/servers/app/RootLayer.cpp b/src/servers/app/RootLayer.cpp index d34d6aa72b..b5ed93ce1f 100644 --- a/src/servers/app/RootLayer.cpp +++ b/src/servers/app/RootLayer.cpp @@ -58,8 +58,6 @@ #define STRACE(a) /* nothing */ #endif -//#define DISPLAYDRIVER_TEST_HACK - RootLayer::RootLayer(const char *name, int32 workspaceCount, Desktop *desktop, DisplayDriver *driver) : Layer(BRect(0,0,0,0), name, 0, B_FOLLOW_ALL, B_WILL_DRAW, driver) @@ -1407,7 +1405,7 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg) break; } } -#else // DISPLAYDRIVER != HWDRIVER +#else // TEST_MODE // F12 if(scancode>0x1 && scancode<0xe) { @@ -1479,7 +1477,7 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg) break; } } -#endif // DISPLAYDRIVER != HWDRIVER +#endif // !TEST_MODE // We got this far, so apparently it's safe to pass to the active // window. @@ -1543,7 +1541,7 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg) STRACE(("Key Up: 0x%lx\n",scancode)); -#if DISPLAYDRIVER == HWDRIVER +#if !TEST_MODE // Tab key if(scancode==0x26 && (modifiers & B_CONTROL_KEY)) { @@ -1554,7 +1552,7 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg) break; //} } -#else // DISPLAYDRIVER != HWDRIVER +#else // TEST_MODE if(scancode==0x26 && (modifiers & B_LEFT_SHIFT_KEY)) { //ServerApp *deskbar=app_server->FindApp("application/x-vnd.Be-TSKB"); @@ -1941,4 +1939,4 @@ void RootLayer::show_final_scene(WinBorder *exFocus, WinBorder *exActive) fLastMouseMoved = LayerAt(fLastMousePossition); if (fLastMouseMoved == NULL) debugger("RootLayer::KeyboardEventHandler: 'fLastMouseMoved' can't be null.\n"); -} \ No newline at end of file +} diff --git a/src/servers/app/ServerApp.cpp b/src/servers/app/ServerApp.cpp index d7544a8f91..3f36ad31d9 100644 --- a/src/servers/app/ServerApp.cpp +++ b/src/servers/app/ServerApp.cpp @@ -379,7 +379,7 @@ int32 ServerApp::MonitorApp(void *data) // If we are using the real, accelerated version of the // DisplayDriver, we do NOT want the user to be able shut down // the server. The results would NOT be pretty -#if DISPLAYDRIVER != HWDRIVER +#if TEST_MODE BMessage pleaseQuit(B_QUIT_REQUESTED); app->SendMessageToClient(&pleaseQuit); #endif diff --git a/src/servers/app/drawing/AccelerantDriver.cpp b/src/servers/app/drawing/old_but_informative/AccelerantDriver.cpp similarity index 100% rename from src/servers/app/drawing/AccelerantDriver.cpp rename to src/servers/app/drawing/old_but_informative/AccelerantDriver.cpp diff --git a/src/servers/app/drawing/AccelerantDriver.h b/src/servers/app/drawing/old_but_informative/AccelerantDriver.h similarity index 100% rename from src/servers/app/drawing/AccelerantDriver.h rename to src/servers/app/drawing/old_but_informative/AccelerantDriver.h diff --git a/src/servers/app/drawing/BitmapDriver.cpp b/src/servers/app/drawing/old_but_informative/BitmapDriver.cpp similarity index 100% rename from src/servers/app/drawing/BitmapDriver.cpp rename to src/servers/app/drawing/old_but_informative/BitmapDriver.cpp diff --git a/src/servers/app/drawing/BitmapDriver.h b/src/servers/app/drawing/old_but_informative/BitmapDriver.h similarity index 100% rename from src/servers/app/drawing/BitmapDriver.h rename to src/servers/app/drawing/old_but_informative/BitmapDriver.h diff --git a/src/servers/app/drawing/DirectDriver.cpp b/src/servers/app/drawing/old_but_informative/DirectDriver.cpp similarity index 100% rename from src/servers/app/drawing/DirectDriver.cpp rename to src/servers/app/drawing/old_but_informative/DirectDriver.cpp diff --git a/src/servers/app/drawing/DirectDriver.h b/src/servers/app/drawing/old_but_informative/DirectDriver.h similarity index 100% rename from src/servers/app/drawing/DirectDriver.h rename to src/servers/app/drawing/old_but_informative/DirectDriver.h diff --git a/src/servers/app/drawing/DisplayDriverImpl.cpp b/src/servers/app/drawing/old_but_informative/DisplayDriverImpl.cpp similarity index 100% rename from src/servers/app/drawing/DisplayDriverImpl.cpp rename to src/servers/app/drawing/old_but_informative/DisplayDriverImpl.cpp diff --git a/src/servers/app/drawing/DisplayDriverImpl.h b/src/servers/app/drawing/old_but_informative/DisplayDriverImpl.h similarity index 100% rename from src/servers/app/drawing/DisplayDriverImpl.h rename to src/servers/app/drawing/old_but_informative/DisplayDriverImpl.h diff --git a/src/servers/app/drawing/DisplaySupport.cpp b/src/servers/app/drawing/old_but_informative/DisplaySupport.cpp similarity index 100% rename from src/servers/app/drawing/DisplaySupport.cpp rename to src/servers/app/drawing/old_but_informative/DisplaySupport.cpp diff --git a/src/servers/app/drawing/PixelRenderer.cpp b/src/servers/app/drawing/old_but_informative/PixelRenderer.cpp similarity index 100% rename from src/servers/app/drawing/PixelRenderer.cpp rename to src/servers/app/drawing/old_but_informative/PixelRenderer.cpp diff --git a/src/servers/app/drawing/ScreenDriver.cpp b/src/servers/app/drawing/old_but_informative/ScreenDriver.cpp similarity index 100% rename from src/servers/app/drawing/ScreenDriver.cpp rename to src/servers/app/drawing/old_but_informative/ScreenDriver.cpp diff --git a/src/servers/app/drawing/ScreenDriver.h b/src/servers/app/drawing/old_but_informative/ScreenDriver.h similarity index 100% rename from src/servers/app/drawing/ScreenDriver.h rename to src/servers/app/drawing/old_but_informative/ScreenDriver.h diff --git a/src/servers/app/drawing/ViewDriver.cpp b/src/servers/app/drawing/old_but_informative/ViewDriver.cpp similarity index 100% rename from src/servers/app/drawing/ViewDriver.cpp rename to src/servers/app/drawing/old_but_informative/ViewDriver.cpp diff --git a/src/servers/app/drawing/ViewDriver.h b/src/servers/app/drawing/old_but_informative/ViewDriver.h similarity index 100% rename from src/servers/app/drawing/ViewDriver.h rename to src/servers/app/drawing/old_but_informative/ViewDriver.h