{
if (instance) return;
instance = this;
- initted = 0;
- numBoxes = 0;
+ osd = Osd::getInstance();
}
BoxStack::~BoxStack()
boxLock.lock();
-// Log::getInstance()->log("BoxStack", Log::DEBUG, "Starting deleteBox");
- deleteBox(i);
-// Log::getInstance()->log("BoxStack", Log::DEBUG, "Done deleteBox");
+ //Log::getInstance()->log("BoxStack", Log::DEBUG, "Starting repaintRevealed loop");
+ RegionList rl;
+ boxSplit(boxes[i]->area, i + 1, numBoxes, 1, rl);
+ while(!rl.empty())
+ {
+ repaintRevealed(i, rl.front());
+ rl.pop_front();
+ }
+ //Log::getInstance()->log("BoxStack", Log::DEBUG, "Done repaintRevealed loop");
// Shift the boxes on top down one
--numBoxes;
// as this box is not in the stack any more, there is no chance for a second delete
Log::getInstance()->log("BoxStack", Log::DEBUG, "remove: going to delete boxx %p, num %d", toDelete, numBoxes);
delete toDelete;
+
+ osd->doRender();
+
if (display) {
Log::getInstance()->log("BoxStack", Log::DEBUG, "setVideoDisplay %d %d %d %d %d %d", display->mode, display->fallbackMode,
display->x, display->y, display->width, display->height);
return 1;
}
-/////////////////////////////////////////////////////////////////////////////
-// NEW STUFF
-/////////////////////////////////////////////////////////////////////////////
-
-void BoxStack::deleteBox(int z)
-{
-// Log::getInstance()->log("BoxStack", Log::DEBUG, "Delete box %i of %i", z, numBoxes);
- RegionList rl;
- boxSplit(boxes[z]->area, z + 1, numBoxes, 1, rl);
- while(!rl.empty())
- {
- repaintRevealed(z, rl.front());
- rl.pop_front();
- }
-}
-
void BoxStack::redrawAllBoxes()
{
boxLock.lock();
for (int z = 0; z < numBoxes; z++)
{
- boxes[z]->draw();
+ boxes[z]->draw();
}
-
boxLock.unlock();
update(NULL,NULL); // should blt all
}
}
}
-/////////////////////////////////////////////////////////////////////////////
-// END NEW STUFF
-/////////////////////////////////////////////////////////////////////////////
-
-// ---------------------------------------------------- END OF REMOVE CODE
-
-
void BoxStack::removeAllExceptWallpaper()
{
// 1.. Don't delete wallpaper. No point.
boxLock.unlock();
//AVO: do the delete outside the lock to allow for recursive deletes
- Log::getInstance()->log("BoxStack", Log::DEBUG, "going to delete boxx %p, num=%d", toDel, numBoxes);
+ Log::getInstance()->log("BoxStack", Log::DEBUG, "removeall: going to delete boxx %p, num=%d", toDel, numBoxes);
if (display) Video::getInstance()->setVideoDisplay(*display);
if (toDel) delete toDel;
}
// OSDOVG-ROD-EXPERIMENT - temp hack to allow OsdVector to signal the thread in OsdOpenVG
-void OsdOpenVG::nudgeRenderThread()
+void OsdOpenVG::doRender()
{
Log::getInstance()->log("OSD", Log::DEBUG, "Nudge render thread");
* Will tearing show up in on-demand mode?
* Moves away from conventional FPS type render loop. VOMP doesn't use 3D GFX / animations
* currently, so this doesn't matter at the moment?
- * Code needs updating to call nudgeRenderThread,
- * e.g. FIXME backing out of the options screen doesn't redraw VWelcome
+ * Code needs updating to call doRender,
+ * e.g. backing out of the options screen doesn't redraw VWelcome, fixed now
*
* Maybe have a hybrid system. One that normally works on-demand but can
* also switch to looping on the fly if necessary.
#if DEV
dumpStyles();
#endif
+ Log::getInstance()->log("OSDOpenVG", Log::CRAZY, "EXPERIMENT - render");
InternalRendering();
lastrendertime = getTimeMS();