Skip to content

Commit

Permalink
renamed renderer->update_sizes to update_viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
nadvornik committed Aug 18, 2012
1 parent 10cc4eb commit 8316b45
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
11 changes: 4 additions & 7 deletions src/pixbuf-renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,8 @@ void pixbuf_renderer_set_color(PixbufRenderer *pr, GdkColor *color)

gtk_widget_set_style(widget, style);

pr->renderer->update_sizes(pr->renderer);
if (pr->renderer2) pr->renderer2->update_sizes(pr->renderer2);
pr->renderer->update_viewport(pr->renderer);
if (pr->renderer2) pr->renderer2->update_viewport(pr->renderer2);
}

/*
Expand Down Expand Up @@ -1818,8 +1818,8 @@ static void pr_size_sync(PixbufRenderer *pr, gint new_width, gint new_height)
if (pr->renderer2) pr->renderer2->update_zoom(pr->renderer2, FALSE);
}

pr->renderer->update_sizes(pr->renderer);
if (pr->renderer2) pr->renderer2->update_sizes(pr->renderer2);
pr->renderer->update_viewport(pr->renderer);
if (pr->renderer2) pr->renderer2->update_viewport(pr->renderer2);


/* ensure scroller remains visible */
Expand Down Expand Up @@ -2413,9 +2413,6 @@ void pixbuf_renderer_set_orientation(PixbufRenderer *pr, gint orientation)

pr_pixbuf_size_sync(pr);
pr_zoom_sync(pr, pr->zoom, PR_ZOOM_FORCE, 0, 0);

pr->renderer->update_sizes(pr->renderer);
if (pr->renderer2) pr->renderer2->update_sizes(pr->renderer2);
}

gint pixbuf_renderer_get_orientation(PixbufRenderer *pr)
Expand Down
2 changes: 1 addition & 1 deletion src/pixbuf-renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct _RendererFuncs
void (*area_changed)(void *renderer, gint src_x, gint src_y, gint src_w, gint src_h); /* pixbuf area changed */
void (*invalidate_region)(void *renderer, gint x, gint y, gint w, gint h);
void (*scroll)(void *renderer, gint x_off, gint y_off); /* scroll */
void (*update_sizes)(void *renderer); /* window / wiewport / borders / border color has changed */
void (*update_viewport)(void *renderer); /* window / wiewport / border color has changed */
void (*update_pixbuf)(void *renderer, gboolean lazy); /* pixbuf has changed */
void (*update_zoom)(void *renderer, gboolean lazy); /* zoom has changed */

Expand Down
6 changes: 3 additions & 3 deletions src/renderer-clutter.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ static gboolean rc_overlay_get(void *renderer, gint id, GdkPixbuf **pixbuf, gint
}


static void rc_update_sizes(void *renderer)
static void rc_update_viewport(void *renderer)
{
RendererClutter *rc = (RendererClutter *)renderer;
ClutterColor stage_color = { 0x00, 0x00, 0x00, 0xff };
Expand Down Expand Up @@ -750,7 +750,7 @@ static void rc_update_sizes(void *renderer)
rc->stereo_off_y = rc->pr->stereo_fixed_y_left;
}
}
DEBUG_0("rc_update_sizes scale %d %d", rc->pr->width, rc->pr->height);
DEBUG_0("rc_update_viewport scale %d %d", rc->pr->width, rc->pr->height);

clutter_stage_set_color(CLUTTER_STAGE(rc->stage), &stage_color);

Expand Down Expand Up @@ -827,7 +827,7 @@ RendererFuncs *renderer_clutter_new(PixbufRenderer *pr)
rc->f.update_zoom = rc_update_zoom;
rc->f.invalidate_region = rc_invalidate_region;
rc->f.scroll = rc_scroll;
rc->f.update_sizes = rc_update_sizes;
rc->f.update_viewport = rc_update_viewport;


rc->f.overlay_add = rc_overlay_add;
Expand Down
4 changes: 2 additions & 2 deletions src/renderer-tiles.c
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ static void renderer_overlay_draw(void *renderer, gint x, gint y, gint w, gint h
rt_overlay_draw((RendererTiles *)renderer, x, y, w, h, NULL);
}

static void renderer_update_sizes(void *renderer)
static void renderer_update_viewport(void *renderer)
{
RendererTiles *rt = (RendererTiles *)renderer;

Expand Down Expand Up @@ -2210,7 +2210,7 @@ RendererFuncs *renderer_tiles_new(PixbufRenderer *pr)
rt->f.update_zoom = renderer_update_zoom;
rt->f.invalidate_region = renderer_invalidate_region;
rt->f.scroll = rt_scroll;
rt->f.update_sizes = renderer_update_sizes;
rt->f.update_viewport = renderer_update_viewport;


rt->f.overlay_add = renderer_tiles_overlay_add;
Expand Down

0 comments on commit 8316b45

Please sign in to comment.