I’m using a stripped-down repaint function for meters etc., haven’t had any trouble with it yet, and was wondering if A: It’s certain doom waiting to happen or B: a fast repaint should be part of the library.
[code]void fastRepaint ()
if (mParent != getParent())
mParent = getParent();
mPeer = mParent->getPeer(); // getPeer() takes a week or so
mPeer->repaint (mX, mY, mW, mH);
[/code]I haven’t had problems (so far), but I’ve only been using this for a week or so.
It doesn’t check if the message manager is locked (I only ever call this from the message thread), the normal repaint() is still there for when the component gets dirty.
Is comparing the last parent a safe way to bypass calling getPeer every time? Or is it one of those perfect 99.9994% of the time deals?