[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: [Gnash-commit] gnash/gui gui.cpp gui.h
From: |
Udo Giacomozzi |
Subject: |
Re[2]: [Gnash-commit] gnash/gui gui.cpp gui.h |
Date: |
Fri, 3 Nov 2006 16:39:40 +0100 |
Hello strk,
Thursday, November 2, 2006, 10:48:20 PM, you wrote:
s> On Thu, Nov 02, 2006 at 02:00:35PM +0000, Udo Giacomozzi wrote:
>> + // always scale proportionally
>> + if (_xscale < _yscale) _yscale = _xscale;
>> + if (_yscale < _xscale) _xscale = _yscale;
s> Minor thing: an else before the second if would avoid an additional check.
Agree.
>> + // trigger redraw
>> + _redraw_flag |= (_width!=width) || (_height!=height);
>> +
>> // set new size ?
>> _width = width;
>> _height = height;
s> Same here, to reduce checks/assignments:
As this gets called only once per frame, it's just a matter of code
readability.
>> + /// Signals that the next frame must be re-rendered completely because
>> the
>> + /// window size did change.
>> + bool _redraw_flag;
s> I would omit the *reason* if we allow arbitrary reasons to completely
s> redraw (for example expose event received)
We discuss this already in another thread. However, the point was
/not/ to /force/ a redraw on each resize event. The reasons are the
same as for the button events (trigger redraw on each mouse move
event?).
Udo