[interfacekit] Re: Icons and BBitmap

> On 2002-08-19 at 08:05:45 [-0700], interfacekit@xxxxxxxxxxxxx wrote:
> > 
> > >Tyler
> > >At any rate, I've worked around it for the time being, moving the 
> > >color
> > >conversion code elsewhere (incidentally, converting a B_RGB32 
> > > bitmap 
> > >to
> > >a B_CMAP8 bitmap using BBitmap::SetBits is way more involved that 
> > > it
> > >needs to be...). BMimeType::Get/SetIcon() is now finally working,
> > >though I plan to add some more tests to be sure all the color
> > >conversion code works like I think it should. The other Icon()
> > >functions will be tackled next...
> > I'm just curious how you accomplished this. I've got quite a bit 
> > figured out
> > about how our BBitmaps will be allocated and managed on the server 
> > side, but
> > that part is handled by the class itself.
> 
> I just moved the code that allocated new BBitmaps (technically, the 
> call to the code that allocated new bitmaps; the code actually lives 
> in 
> both places still) to a library that was able to do so without 
> crashing 
> (i.e. from obos_registrar to libstorage.so). I'm still not crystal 
> clear why it worked, but...

Just to ensure that the point is made: You can't call libstorage code 
that uses BBitmap from the registrar. And as it looks, you don't: 
MimeDatabase::SetIcon(const char *type, icon_size size, const void *
data, size_t dataSize) is used and it doesn't make use of BBitmap.

CU, Ingo



Other related posts: