[haiku-appserver] Re: private development

  • From: Stefano Ceccherini <burton666@xxxxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: 25 Mar 2005 08:53:38 -0000

>       Yes, we know, but don't worry. After app_server >reaches an almost beta 
> stage we will
>clean the code so that things would be clearer from C++'s >point of view.
>       However, some classes are friends and those will stay >like that 
> because they need frequent
>need of private members, and every time calling a public >method which returns 
>a pointer to the object
>in question imposes penalty on performance (method/function >call overhead).

Inlines ? :)

>ServerWindow::DispatchMessage (AS_LAYER_SET_STATE / >AS_LAYER_GET_STATE / 

BTW, that makes me wonder:
Wouldn't it be better to split the server protocol commands definition ?
I mean, currently we have a big enum: 
but that way it's hard to tell what's there and what's not, what does what, 
etc. And it will become more and more complex.
I was thinking about various enums like:

enum GraphicStateCommands {
    AS_LAYER_PUSH_STATE = 0x1000,

enum DrawingCommands {
    AS_STROKE_LINE = 0x2000,

etc. etc.

About the graphics acceleration in Painter:
I know there are 2 ways to accelerate drawing:
1. Accelerate some basic drawing methods (StrokeLine, StrokeRect, FillRect, 
2. Draw (without acceleration) to an offscreen bitmap and then use an 
accelerated blit to copy the content of the bitmap to the screen.

1. is what beos does and what we should do imho, especially because those 
commands are what the current beos drivers accelerate, what Rudolf worked on, 
Obviously my opinion doesn't count much as I didn't write any single line in 
the app server, but still I wanted to express it.

And now for the true reason I'm posting here:
I'd like to add (in the more or less foreseeable future) support for 
BDirectWindow in the server. I think I'll need to add some methods to 
ServerWindow. I have some questions, though:

Can I get a pointer to the frame buffer from ServerWindow ? how?

Can I get the current clipping region of the window from ServerWindow ? How ?

Thanks for your patience :)

Stefano Ceccherini aka Jack Burton
Scegli il tuo dominio preferito e attiva la tua email! Da oggi
l'eMail di superEva e' ancora piu' veloce e ricca di funzioni!

Other related posts: