[interfacekit] Re: :) Again - BBitmap

I would like to mention that more then 50% of the app_server code is
rendering code, not even including the font rendering API. If you want to
draw locally from the app, more than 50% of the app_server code will go into
libbe, which seems not so efficient memory wise.

Also please consider the consequences of not having the view connected to
the app_server, and not having a server counterpart. The connection is not
only used for drawing operations. And making this change will have lots of
other needed changes as a result. Look for example at BPrintJob,
BPrintJob::DrawView() needs the given view to be attached to a window
because the drawing commands need to reach the app_server. "The view must be
attached to a window; that is, it must be known to the Application Server."

If I would change it (although I wouldn't, because I really don't see a
problem with how it's done now) I would write an API like the BPicture one,
a BeginDrawBitmap(bitmap) and EndDrawBitmap(). All the drawing instructions
received between those calls would be rendered into the bitmap instead of
the window. This would make a lot of sense, since you would most likely call
view->Draw(view->Bounds()) from a window thread anyway, so why not let that
server thread do the work?

Marc Flerackers


Other related posts: