diff options
author | Johannes Schickel | 2013-08-18 20:12:12 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-19 00:06:46 +0200 |
commit | 74a056e746e12a2efc6f8014047eeb20a759004b (patch) | |
tree | 63df5935c043a95bafeac9c4ab554d9f7357bfed | |
parent | d58efe38185885548e7bc4d334deebffd152e8be (diff) | |
download | scummvm-rg350-74a056e746e12a2efc6f8014047eeb20a759004b.tar.gz scummvm-rg350-74a056e746e12a2efc6f8014047eeb20a759004b.tar.bz2 scummvm-rg350-74a056e746e12a2efc6f8014047eeb20a759004b.zip |
GUI: Clear dirty rects when initializing ThemeEngine.
This avoids nasty invalid writes to the overlay when the overlay is being
resized.
-rw-r--r-- | gui/ThemeEngine.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 561c0244a2..2abf4a545d 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -521,6 +521,12 @@ void ThemeEngine::setGraphicsMode(GraphicsMode mode) { delete _vectorRenderer; _vectorRenderer = Graphics::createRenderer(mode); _vectorRenderer->setSurface(&_screen); + + // Since we reinitialized our screen surfaces we know nothing has been + // drawn so far. Sometimes we still end up with dirty screen bits in the + // list. Clearing it avoids invalid overlay writes when the backend + // resizes the overlay. + _dirtyScreen.clear(); } void WidgetDrawData::calcBackgroundOffset() { |