gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash/gui gui.cpp gui.h


From: strk
Subject: Re: [Gnash-commit] gnash/gui gui.cpp gui.h
Date: Thu, 2 Nov 2006 22:48:20 +0100

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;

Minor thing: an else before the second if would avoid an additional check.

> +     // trigger redraw
> +     _redraw_flag |= (_width!=width) || (_height!=height);
> +
>       // set new size ?
>       _width = width;
>       _height = height;

Same here, to reduce checks/assignments:

        if ( _width != width )
        {
                _width = width;
                _redraw_flag=1;
        }

        if ( _height != height )
        {
                _height = height;
                _redraw_flag=1;
        }

> +    /// Signals that the next frame must be re-rendered completely because 
> the
> +    /// window size did change.
> +    bool            _redraw_flag;

I would omit the *reason* if we allow arbitrary reasons to completely
redraw (for example expose event received)

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]