[interfacekit] Re: :) Again - BBitmap

> > > 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?
> >
> > Though I don't get the last part,
>
> I R5, when you draw in a BBitmap, you often call the views drawing
functions
> from another BWindow thread.
>
> BWindow::something()
> {
> fBitmap->Lock();
> fViewAttachedToTheBitmap->Draw(someRect);
> fBitmap->Unlock();
> }
>
> That's why I proposed this, it's the same thread that's occupied with the
> drawing, and there are no BBitmap threads needed and rendering still
happens
> on the server, in one place (Btw, rendering also includes all clipping
> calculations, and the management of clipping regions).
>
> BWindow::something()
> {
> BeginDrawBitmap(fBitmap);
> fViewAttachedToTheWindow->Draw(someRect);
> EndDrawBitmap();
> }
>
> I know you still need a BWindow, but at least you can use one window to
draw
> in any bitmap you want.

    Wow Marc... you do agree now... :-)

    Wouldn't Begin/EndDrawBitmap() create us some problems? (view hierarchy
related ) ?


Other related posts: