diff options
author | Jonathan Marshall <jmarshall@never.you.mind> | 2011-06-21 10:26:28 +1200 |
---|---|---|
committer | bobo1on1 <bob-nospam-@xbmc.org> | 2011-06-22 15:30:13 +0200 |
commit | e94be600e8231749cea88aa48cb0342642a9bb25 (patch) | |
tree | 0b30aa161b42b0560a06c50c61987fa08a282b04 | |
parent | 2eb9e9bc8d1f4dc4a56ddefd4f9c0332b350f9c6 (diff) |
simplify CGUIWindowManager::MarkDirty to just mark the whole screen as dirty
-rw-r--r-- | xbmc/Application.cpp | 2 | ||||
-rw-r--r-- | xbmc/guilib/GUIWindowManager.cpp | 4 | ||||
-rw-r--r-- | xbmc/guilib/GUIWindowManager.h | 6 | ||||
-rw-r--r-- | xbmc/windowing/WinEventsSDL.cpp | 7 | ||||
-rw-r--r-- | xbmc/windowing/windows/WinEventsWin32.cpp | 2 |
5 files changed, 8 insertions, 13 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index f29cb27c00..2a4df793cc 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -1914,7 +1914,7 @@ void CApplication::RenderScreenSaver() { color_t color = ((color_t)(screenSaverFadeAmount * amount * 2.55f) & 0xff) << 24; CRect rect(0, 0, (float)g_graphicsContext.GetWidth(), (float)g_graphicsContext.GetHeight()); - g_windowManager.MarkDirty(rect); + g_windowManager.MarkDirty(); CGUITexture::DrawQuad(rect, color); } } diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp index 77268fb09c..895f97875b 100644 --- a/xbmc/guilib/GUIWindowManager.cpp +++ b/xbmc/guilib/GUIWindowManager.cpp @@ -515,9 +515,9 @@ void CGUIWindowManager::Process(unsigned int currentTime) m_tracker.MarkDirtyRegion(*itr); } -void CGUIWindowManager::MarkDirty(const CDirtyRegion &rect) +void CGUIWindowManager::MarkDirty() { - m_tracker.MarkDirtyRegion(rect); + m_tracker.MarkDirtyRegion(CRect(0, 0, (float)g_graphicsContext.GetWidth(), (float)g_graphicsContext.GetHeight())); } void CGUIWindowManager::RenderPass() diff --git a/xbmc/guilib/GUIWindowManager.h b/xbmc/guilib/GUIWindowManager.h index ee1b24602a..6a6934775e 100644 --- a/xbmc/guilib/GUIWindowManager.h +++ b/xbmc/guilib/GUIWindowManager.h @@ -72,11 +72,9 @@ public: */ void Process(unsigned int currentTime); - /*! \brief Mark a region of the screen as dirty - used by the mouse and dim/black screensavers currently - Ideally this would be removed and a technique for marking the screen as dirty implemented for ssavers - in addition to moving the mouse rendering into the manager. + /*! \brief Mark the screen as dirty, forcing a redraw at the next Render() */ - void MarkDirty(const CDirtyRegion &rect); + void MarkDirty(); /*! \brief Rendering of the current window and any dialogs Render is called every frame to draw the current window and any dialogs. diff --git a/xbmc/windowing/WinEventsSDL.cpp b/xbmc/windowing/WinEventsSDL.cpp index 33a73d5f9d..6176c63123 100644 --- a/xbmc/windowing/WinEventsSDL.cpp +++ b/xbmc/windowing/WinEventsSDL.cpp @@ -372,11 +372,8 @@ bool CWinEventsSDL::MessagePump() break; } case SDL_VIDEOEXPOSE: - { - //some other app has painted over our window, mark everything as dirty - CRect rect(0, 0, (float)g_graphicsContext.GetWidth(), (float)g_graphicsContext.GetHeight()); - g_windowManager.MarkDirty(rect); - } + g_windowManager.MarkDirty(); + break; } memset(&event, 0, sizeof(XBMC_Event)); } diff --git a/xbmc/windowing/windows/WinEventsWin32.cpp b/xbmc/windowing/windows/WinEventsWin32.cpp index 65a0210385..352b8d6967 100644 --- a/xbmc/windowing/windows/WinEventsWin32.cpp +++ b/xbmc/windowing/windows/WinEventsWin32.cpp @@ -671,7 +671,7 @@ LRESULT CALLBACK CWinEventsWin32::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, L } case WM_PAINT: //some other app has painted over our window, mark everything as dirty - g_windowManager.MarkDirty(CRect(0, 0, (float)g_graphicsContext.GetWidth(), (float)g_graphicsContext.GetHeight())); + g_windowManager.MarkDirty(); break; } return(DefWindowProc(hWnd, uMsg, wParam, lParam)); |