From b40fb3c7b92b08fcef1ede6ed70a1a5f7c2f857d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 20 Apr 2009 12:01:06 +0000 Subject: [PATCH] This patch deactivates accelerated graphics driver functions and also the double screen height trick for using double buffering with an offscreen half of the frame buffer. Whenever I run app_server without this patch, it frequently locks up in weird ways. Additionally, app_server uses less CPU for many graphics operations, notably the ones that require any blending, ie reading frame buffer. This should be even more noticable for slow computers. The only draw back is that slow computers may suffer a bit when just dragging a window, since that is now performed on the CPU. However, I have high doubts that the benefits don't outweight the drawbacks, and the feedback I have received indicates that as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30278 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/drawing/AccelerantHWInterface.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/servers/app/drawing/AccelerantHWInterface.cpp b/src/servers/app/drawing/AccelerantHWInterface.cpp index 0051add0b8..ab62e1e949 100644 --- a/src/servers/app/drawing/AccelerantHWInterface.cpp +++ b/src/servers/app/drawing/AccelerantHWInterface.cpp @@ -508,7 +508,7 @@ AccelerantHWInterface::SetMode(const display_mode& mode) bool tryOffscreenBackBuffer = false; fOffscreenBackBuffer = false; -#if 1 +#if 0 if (fVGADevice < 0 && (color_space)newMode.space == B_RGB32) { // we should have an accelerated graphics driver, try // to allocate a frame buffer large enough to contain @@ -594,12 +594,18 @@ AccelerantHWInterface::SetMode(const display_mode& mode) #endif // update acceleration hooks +#if 0 fAccFillRect = (fill_rectangle)fAccelerantHook(B_FILL_RECTANGLE, (void *)&fDisplayMode); fAccInvertRect = (invert_rectangle)fAccelerantHook(B_INVERT_RECTANGLE, (void *)&fDisplayMode); fAccScreenBlit = (screen_to_screen_blit)fAccelerantHook( B_SCREEN_TO_SCREEN_BLIT, (void *)&fDisplayMode); +#else + fAccFillRect = NULL; + fAccInvertRect = NULL; + fAccScreenBlit = NULL; +#endif // in case there is no accelerated blit function, using // an offscreen located backbuffer will not be beneficial! @@ -627,6 +633,9 @@ AccelerantHWInterface::SetMode(const display_mode& mode) && fFrontBuffer->ColorSpace() != B_RGBA32) || fVGADevice >= 0 || fOffscreenBackBuffer) doubleBuffered = true; +#if 1 + doubleBuffered = true; +#endif if (doubleBuffered) { if (fOffscreenBackBuffer) {