[haiku-development] Re: Vector Icons help...?

  • From: pete.goodeve@xxxxxxxxxxxx
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 26 Nov 2009 12:00:52 -0800

On Thu, Nov 26, 2009 at 11:19:01AM +0100, Philippe Houdoin wrote:
> Stephan was wondering:
> > Apparently, the MessageImporter is used when the FlatIconImporter
> > returns an error, but why that is, I cannot say at the moment.
> > I thought the MessageImporter isn't even part of libicon.a, but part
> > of I-O-M. Maybe I can have a look tonight.
> 
> It's part of libicon.a, and used in BIconUtils::GetVectorIcon() as
> fallback :
> [....]

Maybe the issue is, where am I getting the libicon stuff *from*?
All I did was to put (a link to) IconUtils.h in the /boot/develop/headers
hierarchy so that I could compile PatchBay with the additions. I didn't
specify any extra libraries or paths, so I presume everything is in
libbe or somewhere.  I noticed you added libicon.a to the jamfile,
and tried adding that to the libraries in the makefile (before I found
that your midi_server didn't work either) and it made no difference.

I compiled PatchBay with its own makefile, so it was presumably getting
everything (except IconUtils.h) from the standard alpha-1 environment,
while jamming midi_server presumably uses the source tree to build everything.
(I see a libicon.a in the .../generated/... tree.)  And of course Tracker is
displaying vector icons fine, so things can't be completely broken!

> 
> So, the original issue is, as spotted by Pete, due to FlatIconImporter
> returning Out Of Memory, or to be more
> specific due to _ParseStyles failure.
> 
> As I've actually see the HVIF icon rendered as a 32x32 CMAP8 bitmap
> displayed in an unmodified PatchBay, I know that my change actually
> succeed to render once.
> But what I didn't check:
> 1. that the 16x16 CMAP8 bitmap was rendered successfully too
> 2. that the raw data wasn't corrupted in the process
> 
> I assume GetVectorIcon() don't modify the passed raw data.
> But maybe I'm wrong here.
> 
> Pete, did you try to comment out the "Render 32x32 and 16x16 icons for
> R5 compatibility" portion in midi_server's DeviceWatcher()
> constructor, to just have the HVIF raw data loaded and no large/mini
> icons rendered?

No, I haven't done any debugging on the midi_server end yet.  All I noted
was that PrintToStream() in PatchBay showed an empty message with no icon
data at all, so I deduced that all the attempted conversions were failing.
I'll try your suggestion.

Cheers,

-- Pete --


Other related posts: