[openbeos] Re: openbeos Digest V8 #104

  • From: "Raymond C. Rodgers" <sinful622@xxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Thu, 26 Jun 2008 09:14:33 -0400

François Revol wrote:
"François Revol" <revol@xxxxxxx> wrote:
Still calling DrawBitmap a lot on a bitmap that doesn't change would be awful if you force sending it each time, it would void the purpose.
You don't necessarily have to send it; but you might want to check (locally) if something changed.

Yes we can always maintain a checksum but that means we have to calculate it quite often...

François.

Couldn't a call back hook be used instead? Add a pointer that by default is null, and everytime a change is made, check to see if that pointer is still null. If it isn't, then call the function referenced by the pointer to notify whatever that the bitmap has changed. That should minimize the impact of frequent updates, yet allow all "watched" updates to the bitmap at least get passed along to the protocol, which I suppose could decided whether or not to pass certain ones along. (Say too many have occurred in a short period of time, it might only take the most recent few.)

Raymond

Other related posts: