[haiku-development] Re: Offscreen view drawing

  • From: Charles Pergiel <c.pergiel@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 28 Aug 2013 16:59:46 -0700

I'm thinking something dumb like clobbering part of the pointer, or the
count, so that only half of the data gets transferred.
What kind of debugger are you using? For that matter, what kind does Haiku
have?


On Wed, Aug 28, 2013 at 3:17 PM, Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>wrote:

> Hi,
>
> I've hit what seems to be a Haiku oddity, and wonder if
> anyone has any insight.
>
> I thought I'd update Michael Pfeiffer's old BeOS MidiSynth,
> which actually mostly works in Haiku, but there were a few
> things not quite right.
>
> In particular, the 'Scope' function only managed to fill half
> or less of the window with the graph.  Strangely, MidiPlayer
> is perfectly able to fill the window -- and it uses Michael's
> code!  The only difference is that MidiPlayer draws in the
> window view directly, and Michael uses an offscreen
> bitmap, that is then drawn into the window.  I checked that
> this works as expected in BeOS.
>
> I modified the MidiSynth Scope code so that it also draws
> directly, and it too now looks right.  Something seems to be
> off with the transfer from offscreen to screen, but I can't
> see what.  The original code seems to do things correctly.
> On a Pulse, it locks the bitmap while it draws the graph into it,
> does a Flush(), and calls Invalidate() on the view.  The
> view's Draw() then does a DrawBitmap().
>
> Any thoughts?  (I'm not sure an offscreen draw is needed here,
> as it looks fine without it, but it ought to work!)
>
>         -- Pete --
>
>


-- 
Charles Pergiel
Silicon Forest
www.pergelator.blogspot.com

Other related posts: