Second pass at optimizing the FrameBuffer classes. I think I've

finally got it this time.  And as a nice side effect, it seems
that switching between debugger/emulation/launcher is working
in fullscreen Windows mode.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@683 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2005-07-20 17:33:03 +00:00
parent d15978825a
commit a61598a33b
3 changed files with 6 additions and 15 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: FrameBufferGL.cxx,v 1.35 2005-07-20 15:52:57 stephena Exp $ // $Id: FrameBufferGL.cxx,v 1.36 2005-07-20 17:33:02 stephena Exp $
//============================================================================ //============================================================================
#ifdef DISPLAY_OPENGL #ifdef DISPLAY_OPENGL
@ -280,9 +280,6 @@ void FrameBufferGL::postFrameUpdate()
glTexCoord2f(myTexCoord[2], myTexCoord[3]); glVertex2i(w, h); glTexCoord2f(myTexCoord[2], myTexCoord[3]); glVertex2i(w, h);
glTexCoord2f(myTexCoord[0], myTexCoord[3]); glVertex2i(0, h); glTexCoord2f(myTexCoord[0], myTexCoord[3]); glVertex2i(0, h);
glEnd(); glEnd();
// The frame doesn't need to be completely redrawn anymore
theRedrawTIAIndicator = theRedrawOverlayIndicator = false;
} }
} }

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: FrameBufferSoft.cxx,v 1.29 2005-07-02 01:28:42 stephena Exp $ // $Id: FrameBufferSoft.cxx,v 1.30 2005-07-20 17:33:03 stephena Exp $
//============================================================================ //============================================================================
#include <SDL.h> #include <SDL.h>
@ -251,9 +251,6 @@ void FrameBufferSoft::drawMediaSource()
myRectList->add(&temp); myRectList->add(&temp);
SDL_FillRect(myScreen, &temp, myPalette[active.color]); SDL_FillRect(myScreen, &temp, myPalette[active.color]);
} }
// The frame doesn't need to be completely redrawn anymore
theRedrawTIAIndicator = false;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: FrameBuffer.cxx,v 1.55 2005-07-20 15:52:57 stephena Exp $ // $Id: FrameBuffer.cxx,v 1.56 2005-07-20 17:33:03 stephena Exp $
//============================================================================ //============================================================================
#include <sstream> #include <sstream>
@ -217,14 +217,8 @@ void FrameBuffer::update()
// Only update the overlay if it's changed // Only update the overlay if it's changed
// This is a performance hack to only draw the menus when necessary // This is a performance hack to only draw the menus when necessary
if(theRedrawOverlayIndicator) if(theRedrawOverlayIndicator)
{
myOSystem->debugger().draw(); myOSystem->debugger().draw();
// This needs to be here, otherwise software mode uses a lot
// of CPU when drawing the debugger. I'm sure it's a bug,
// but at least it's a documented one :)
theRedrawOverlayIndicator = false;
}
break; // S_DEBUGGER break; // S_DEBUGGER
} }
@ -235,6 +229,9 @@ void FrameBuffer::update()
// Do any post-frame stuff // Do any post-frame stuff
postFrameUpdate(); postFrameUpdate();
// The frame doesn't need to be completely redrawn anymore
theRedrawTIAIndicator = theRedrawOverlayIndicator = false;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -