From a61598a33b556fe831dd8e10f05b8a11d6046d12 Mon Sep 17 00:00:00 2001 From: stephena Date: Wed, 20 Jul 2005 17:33:03 +0000 Subject: [PATCH] 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 --- stella/src/common/FrameBufferGL.cxx | 5 +---- stella/src/common/FrameBufferSoft.cxx | 5 +---- stella/src/emucore/FrameBuffer.cxx | 11 ++++------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/stella/src/common/FrameBufferGL.cxx b/stella/src/common/FrameBufferGL.cxx index 17c11ec6b..a52e3926a 100644 --- a/stella/src/common/FrameBufferGL.cxx +++ b/stella/src/common/FrameBufferGL.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // 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 @@ -280,9 +280,6 @@ void FrameBufferGL::postFrameUpdate() glTexCoord2f(myTexCoord[2], myTexCoord[3]); glVertex2i(w, h); glTexCoord2f(myTexCoord[0], myTexCoord[3]); glVertex2i(0, h); glEnd(); - - // The frame doesn't need to be completely redrawn anymore - theRedrawTIAIndicator = theRedrawOverlayIndicator = false; } } diff --git a/stella/src/common/FrameBufferSoft.cxx b/stella/src/common/FrameBufferSoft.cxx index 5aee6111c..814853c00 100644 --- a/stella/src/common/FrameBufferSoft.cxx +++ b/stella/src/common/FrameBufferSoft.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // 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 @@ -251,9 +251,6 @@ void FrameBufferSoft::drawMediaSource() myRectList->add(&temp); SDL_FillRect(myScreen, &temp, myPalette[active.color]); } - - // The frame doesn't need to be completely redrawn anymore - theRedrawTIAIndicator = false; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stella/src/emucore/FrameBuffer.cxx b/stella/src/emucore/FrameBuffer.cxx index 8099a62a9..ff9e49f27 100644 --- a/stella/src/emucore/FrameBuffer.cxx +++ b/stella/src/emucore/FrameBuffer.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // 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 @@ -217,14 +217,8 @@ void FrameBuffer::update() // Only update the overlay if it's changed // This is a performance hack to only draw the menus when necessary if(theRedrawOverlayIndicator) - { 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 } @@ -235,6 +229,9 @@ void FrameBuffer::update() // Do any post-frame stuff postFrameUpdate(); + + // The frame doesn't need to be completely redrawn anymore + theRedrawTIAIndicator = theRedrawOverlayIndicator = false; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -