On Tue, 21 Jan 2003, Andreas Beck wrote: > > What has that to do with the matter we're discussing here? > > It is the same thing. If windows had backing store, it could redraw - > right?
windows _has_ backing store, just not all apps request it. > > Applications should lock the gfx mem when accessing it and unlock when non > > accessing it anymore. > > O.K. - so I have an idiotic application that does that for a long time. > Shall I thus inhibit VT-switching? Great DOS-Opportunity. If the app doesn't respond in, say, 5 secs you could put it to sleep. > > I'm not sure about this. By using locking and shared memory VT switching > > could be put to wait until the gfx mem gets unlocked. > > That's what I am saying. You _have_ to schedule VT-switching. And if you > already have to do that, why not just have the application acknowledge > the request and all is easy and smooth. uh? Because it's not the same thing and because it's NOT TRANSPARENT! The whole point of kgi/ggi is that the app doesn't _know_ where it's running, so tying it with a specific target is the dumbest thing to do. > > Look, it could be implemented _exactly_ like in X: applications can > > request backing store if they want, so let's do it with ggi/kgi too: if > > apps request backing store, just let them go to background and provide > > them with a backing store, > > Why make a big deal of it, if the app can just do that: > > if (have_vtswitch_request()) { > backstore=ggiOpen("memory",...) > ggiSetMode(backstore,...); > ggiCrossBlit(currvis => backstore,...); > savedvis=currvis; > currvis=backstore; > } > > If that's too much to write, we can put it in a lib. > > But the _app_ knows when this can be called safely. look there: "vtswitch_request". So, does any ggi app have to implement that? Or will there be some ggi apps that run on kgi and other that don't? > > It would be really annoying, for example, if I started my favourite > > fractal application, then switched console to do some programming, and > > after one hour I went back to the fractal app just to discover that it > > didn't do _anything_ because it's been put to sleep. > > That would be a perfect example for a broken application. lol :) > If the app wants to run in BG, it should react nicely to being asked to > stop using the graphics engine. The app _doesn't_ have to care about where it runs, I should be able to run it on X and on KGI without having to touch one line of code. Your approach defeats the whole point of ggi. > > see, that's a perfect example of an application that NEEDS backing store > > and that NEEDS to NOT be put to sleep. > > Why does that need backing store? To avoid having to store its result > somewhere else? Yes, to avoid to implement a backing store itself: why do it when there's such a nice feature already implemented in the framework? Fabio Alemagna