[Scummvm-cvs-logs] SF.net SVN: scummvm:[35880] scummvm/trunk/gui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Jan 17 17:57:50 CET 2009
Revision: 35880
http://scummvm.svn.sourceforge.net/scummvm/?rev=35880&view=rev
Author: fingolfin
Date: 2009-01-17 16:57:50 +0000 (Sat, 17 Jan 2009)
Log Message:
-----------
Removed unused & incomplete widget caching code
Modified Paths:
--------------
scummvm/trunk/gui/ThemeData.cpp
scummvm/trunk/gui/ThemeData.h
scummvm/trunk/gui/ThemeEngine.cpp
scummvm/trunk/gui/ThemeEngine.h
Modified: scummvm/trunk/gui/ThemeData.cpp
===================================================================
--- scummvm/trunk/gui/ThemeData.cpp 2009-01-17 04:50:13 UTC (rev 35879)
+++ scummvm/trunk/gui/ThemeData.cpp 2009-01-17 16:57:50 UTC (rev 35880)
@@ -133,13 +133,4 @@
_engine->addDirtyRect(_area);
}
-WidgetDrawData::~WidgetDrawData() {
- _steps.clear();
-
- if (_surfaceCache) {
- _surfaceCache->free();
- delete _surfaceCache;
- }
}
-
-}
Modified: scummvm/trunk/gui/ThemeData.h
===================================================================
--- scummvm/trunk/gui/ThemeData.h 2009-01-17 04:50:13 UTC (rev 35879)
+++ scummvm/trunk/gui/ThemeData.h 2009-01-17 16:57:50 UTC (rev 35880)
@@ -51,14 +51,7 @@
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 {
Modified: scummvm/trunk/gui/ThemeEngine.cpp
===================================================================
--- scummvm/trunk/gui/ThemeEngine.cpp 2009-01-17 04:50:13 UTC (rev 35879)
+++ scummvm/trunk/gui/ThemeEngine.cpp 2009-01-17 16:57:50 UTC (rev 35880)
@@ -282,17 +282,6 @@
_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 @@
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 @@
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) {}
}
}
}
Modified: scummvm/trunk/gui/ThemeEngine.h
===================================================================
--- scummvm/trunk/gui/ThemeEngine.h 2009-01-17 04:50:13 UTC (rev 35879)
+++ scummvm/trunk/gui/ThemeEngine.h 2009-01-17 16:57:50 UTC (rev 35880)
@@ -484,15 +484,6 @@
*/
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 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list