Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #871656 ยป 0035-Drop-flush_mapcanvas-from-gui-API.patch

Marko Lindqvist, 2020-05-02 01:48 PM

View differences:

client/gui-gtk-3.0/mapview.c
return TRUE;
}
/**********************************************************************//**
Flush the given part of the canvas buffer (if there is one) to the
screen.
**************************************************************************/
void flush_mapcanvas(int canvas_x, int canvas_y,
int pixel_width, int pixel_height)
{
GdkRectangle rectangle = {canvas_x, canvas_y, pixel_width, pixel_height};
if (gtk_widget_get_realized(map_canvas) && !mapview_is_frozen()) {
gdk_window_invalidate_rect(gtk_widget_get_window(map_canvas), &rectangle, FALSE);
}
}
/**********************************************************************//**
Mark the rectangular region as "dirty" so that we know to flush it
later.
client/gui-gtk-3.22/mapview.c
return TRUE;
}
/**********************************************************************//**
Flush the given part of the canvas buffer (if there is one) to the
screen.
**************************************************************************/
void flush_mapcanvas(int canvas_x, int canvas_y,
int pixel_width, int pixel_height)
{
GdkRectangle rectangle = {canvas_x, canvas_y, pixel_width, pixel_height};
if (gtk_widget_get_realized(map_canvas) && !mapview_is_frozen()) {
gdk_window_invalidate_rect(gtk_widget_get_window(map_canvas), &rectangle, FALSE);
}
}
/**********************************************************************//**
Mark the rectangular region as "dirty" so that we know to flush it
later.
client/gui-gtk-4.0/mapview.c
}
}
/**********************************************************************//**
Flush the given part of the canvas buffer (if there is one) to the
screen.
**************************************************************************/
void flush_mapcanvas(int canvas_x, int canvas_y,
int pixel_width, int pixel_height)
{
GdkRectangle rectangle = {canvas_x, canvas_y, pixel_width, pixel_height};
if (gtk_widget_get_realized(map_canvas) && !mapview_is_frozen()) {
gdk_surface_invalidate_rect(gtk_widget_get_surface(map_canvas), &rectangle);
}
}
/**********************************************************************//**
Mark the rectangular region as "dirty" so that we know to flush it
later.
client/gui-qt/mapview.cpp
Flush the given part of the canvas buffer (if there is one) to the
screen.
**************************************************************************/
void flush_mapcanvas(int canvas_x, int canvas_y,
int pixel_width, int pixel_height)
static void flush_mapcanvas(int canvas_x, int canvas_y,
int pixel_width, int pixel_height)
{
gui()->mapview_wdg->repaint(canvas_x, canvas_y, pixel_width, pixel_height);
}
......
gui()->mapview_wdg->height());
} else {
int i;
for (i = 0; i < num_dirty_rects; i++) {
flush_mapcanvas(dirty_rects[i].x(), dirty_rects[i].y(),
dirty_rects[i].width(), dirty_rects[i].height());
client/gui-sdl2/mapview.c
/**********************************************************************//**
Flush the mapcanvas part of the buffer(s) to the screen.
**************************************************************************/
void flush_mapcanvas(int canvas_x, int canvas_y,
int pixel_width, int pixel_height)
static void flush_mapcanvas(int canvas_x, int canvas_y,
int pixel_width, int pixel_height)
{
SDL_Rect rect = {canvas_x, canvas_y, pixel_width, pixel_height};
client/gui-stub/mapview.c
return NULL;
}
/************************************************************************//**
Flush the given part of the canvas buffer (if there is one) to the
screen.
****************************************************************************/
void flush_mapcanvas(int canvas_x, int canvas_y,
int pixel_width, int pixel_height)
{
/* PORTME */
}
/************************************************************************//**
Mark the rectangular region as "dirty" so that we know to flush it
later.
......
/************************************************************************//**
Flush all regions that have been previously marked as dirty. See
dirty_rect and dirty_all. This function is generally called after we've
dirty_rect() and dirty_all(). This function is generally called after we've
processed a batch of drawing operations.
****************************************************************************/
void flush_dirty(void)
......
/************************************************************************//**
Do any necessary synchronization to make sure the screen is up-to-date.
The canvas should have already been flushed to screen via flush_dirty -
The canvas should have already been flushed to screen via flush_dirty() -
all this function does is make sure the hardware has caught up.
****************************************************************************/
void gui_flush(void)
client/include/mapview_g.h
GUI_FUNC_PROTO(void, get_overview_area_dimensions, int *width, int *height)
GUI_FUNC_PROTO(struct canvas *, get_overview_window, void)
GUI_FUNC_PROTO(void, flush_mapcanvas, int canvas_x, int canvas_y,
int pixel_width, int pixel_height)
GUI_FUNC_PROTO(void, dirty_rect, int canvas_x, int canvas_y,
int pixel_width, int pixel_height)
GUI_FUNC_PROTO(void, dirty_all, void)
    (1-1/1)