[Freeciv-Dev] Re: (PR#3424) New flush code soplited in 2 parts
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke wrote:
> On Sat, Feb 15, 2003 at 02:32:35AM -0800, Rafa? Bursig wrote:
>
>>>Naming: all three function should have the same prefix
>>>Coding-Style: read the guide.
>>> +void add_to_flush( int canvas_x , int canvas_y ,
>>> ^ ^ remove these
>>> 1 2
>>
>>1) I still prefer name "add_to_flush" than "flush_add_to".
>
>
> What do you think about:
>
> flush_add_region
> flush_add_all_as_region
> flush_all_regions
I prefer:
dirty_rect
dirty_all
flush_dirty_rects
which is far more descriptive than "add_to_flush"...
>>If you put flush_rects() at end of update_map_canvas_visible then flush
>>is made after redraw map and redraw city descriptions but sdl client
>>have additional widget layer which is redrawed with other net packages.
>
>
> I know. I proposed to change
> void update_map_canvas_visible(void)
> to
> void update_map_canvas_visible(bool write_to_screen)
>
> And add
> if(write_to_screen) {
> // call flush function
> }
> at the end of it.
Under these patches, the write_to_screen parameter doesn't really do
anything anymore. Whatever value it has, the client is likely to just
mark the area as dirty and flush it later. The core issue is that every
drawing operation should be written to screen; the only qeustion is
when. With the introduction of flush_dirty_rects this question is answered.
Note that a call to dirty_all would seem to be appropriate within
update_map_canvas_visible, but since update_map_canvas already calls
dirty_rect for a very large rect we don't want to re-call this function.
I suggested removing the write_to_screen parameter from all functions,
but Rafal pointed out that it's not clear what the final form of the
functions should be since the flush code doesn't yet deal with animation.
jason
Message not available
|
|