[haiku-commits] Re: r38589 - haiku/trunk/src/kits/interface

  • From: Urias McCullough <umccullough@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 8 Sep 2010 16:02:38 -0700

On Wed, Sep 8, 2010 at 3:41 PM, Stephan Assmus <superstippi@xxxxxx> wrote:
> If the string width changes and triggers a relayout, then so many things
> happen, including tons of trips to the app_server not only for resizing, but
> also for redrawing many things in this and other views, that the two extra
> StringWidth() calls pale in comparison. However, if the string width does
> not change often, like in the new MediaPlayer duration info view, then it's
> good to avoid invalidating the layout unnecessarily.

Maybe you can also check to see if the string value changed before
calling the second StringWidth() ?

- Urias

Other related posts: