[interfacekit] Re: server part of BDirectWindow

"burton666@xxxxxxxxx" <burton666@xxxxxxxxx> wrote:
> >    BTW, how do you do clipping to the visible surface if you give 
> > access to
> >    the frame buffer?
> Here's the nice trick: you don't :)

At least it gets the visible rectangles from the app_server :)

> It's the client application which has to do its own clipping (this 
> isn't good, I 
> know).
> In fact, with a BDirectWindow you can also do bad things (as writing 
> outside 
> your clipping region, or worse, write in a wrong pci memory area). 
> Though, 
> this is by design, and R5 works exactly like this.

The only thing one could do about it, would be to clone only a portion 
of the frame buffer into the application. But that would require the 
frame buffer to be aligned to B_PAGE_SIZE, and also, the current R5 API 
wouldn't support that.
But it's even worse - BeOS maps the whole frame buffer memory (that is, 
all gfx memory) writeable for all applications; it doesn't have 
anything to do about it, it's just there.

Bye,
   Axel.


Other related posts: