aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2009-01-17 16:57:50 +0000
committerMax Horn2009-01-17 16:57:50 +0000
commit42d4ddf9342b1f7678feb7cd2114d374b5df7632 (patch)
tree44e2bce980e767137908bd2df8aef31991627f29 /gui
parenteb0ea6a297c53920971a6a234f78a2ec60849c46 (diff)
downloadscummvm-rg350-42d4ddf9342b1f7678feb7cd2114d374b5df7632.tar.gz
scummvm-rg350-42d4ddf9342b1f7678feb7cd2114d374b5df7632.tar.bz2
scummvm-rg350-42d4ddf9342b1f7678feb7cd2114d374b5df7632.zip
Removed unused & incomplete widget caching code
svn-id: r35880
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeData.cpp9
-rw-r--r--gui/ThemeData.h7
-rw-r--r--gui/ThemeEngine.cpp16
-rw-r--r--gui/ThemeEngine.h17
4 files changed, 0 insertions, 49 deletions
diff --git a/gui/ThemeData.cpp b/gui/ThemeData.cpp
index 48a922e600..fbe5bb701d 100644
--- a/gui/ThemeData.cpp
+++ b/gui/ThemeData.cpp
@@ -133,13 +133,4 @@ void ThemeItemBitmap::drawSelf(bool draw, bool restore) {
_engine->addDirtyRect(_area);
}
-WidgetDrawData::~WidgetDrawData() {
- _steps.clear();
-
- if (_surfaceCache) {
- _surfaceCache->free();
- delete _surfaceCache;
- }
-}
-
}
diff --git a/gui/ThemeData.h b/gui/ThemeData.h
index a1f27e1c9b..18995ab477 100644
--- a/gui/ThemeData.h
+++ b/gui/ThemeData.h
@@ -51,14 +51,7 @@ struct WidgetDrawData {
Used when restoring the widget background */
uint16 _backgroundOffset;
- /** Sets whether the widget is cached beforehand. */
- bool _cached;
bool _buffer;
-
- /** Texture where the cached widget is stored. */
- Graphics::Surface *_surfaceCache;
-
- ~WidgetDrawData();
};
class ThemeItem {
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index dcb5a8bb05..0b53ce7fe4 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -282,17 +282,6 @@ void ThemeEngine::setGraphicsMode(GraphicsMode mode) {
_vectorRenderer->setSurface(&_screen);
}
-bool ThemeEngine::isWidgetCached(DrawData type, const Common::Rect &r) {
- return _widgets[type] && _widgets[type]->_cached &&
- _widgets[type]->_surfaceCache->w == r.width() &&
- _widgets[type]->_surfaceCache->h == r.height();
-}
-
-void ThemeEngine::drawCached(DrawData type, const Common::Rect &r) {
- assert(_widgets[type]->_surfaceCache->bytesPerPixel == _screen.bytesPerPixel);
- _vectorRenderer->blitSurface(_widgets[type]->_surfaceCache, r);
-}
-
void ThemeEngine::calcBackgroundOffset(DrawData type) {
uint maxShadow = 0;
for (Common::List<Graphics::DrawStep>::const_iterator step = _widgets[type]->_steps.begin();
@@ -403,9 +392,7 @@ bool ThemeEngine::addDrawData(const Common::String &data, bool cached) {
delete _widgets[data_id];
_widgets[data_id] = new WidgetDrawData;
- _widgets[data_id]->_cached = cached;
_widgets[data_id]->_buffer = kDrawDataDefaults[data_id].buffer;
- _widgets[data_id]->_surfaceCache = 0;
_widgets[data_id]->_textDataId = -1;
return true;
@@ -435,9 +422,6 @@ void ThemeEngine::loadTheme(const Common::String &themeId) {
warning("Missing data asset: '%s'", kDrawDataDefaults[i].name);
} else {
calcBackgroundOffset((DrawData)i);
-
- // TODO: draw the cached widget to the cache surface
- if (_widgets[i]->_cached) {}
}
}
}
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index e770f6bdc7..b5ca95685c 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -484,15 +484,6 @@ public:
*/
void restoreBackground(Common::Rect r);
- /**
- * Checks if a given DrawData set for a widget has been cached beforehand
- * and is ready to be blit into the screen.
- *
- * @param type DrawData type of the widget.
- * @param r Size of the widget which is expected to be cached.
- */
- bool isWidgetCached(DrawData type, const Common::Rect &r);
-
const Common::String &getThemeName() const { return _themeName; }
const Common::String &getThemeId() const { return _themeId; }
int getGraphicsMode() const { return _graphicsMode; }
@@ -544,14 +535,6 @@ protected:
TextData getTextData(DrawData ddId);
/**
- * Draws a cached widget directly on the screen. Currently deprecated.
- *
- * @param type DrawData type of the widget.
- * @param r Position on screen to draw the widget.
- */
- void drawCached(DrawData type, const Common::Rect &r);
-
- /**
* Calculates the background threshold offset of a given DrawData item.
* After fully loading all DrawSteps of a DrawData item, this function must be
* called in order to calculate if such draw steps would be drawn outside of