Commit 260c8560 authored by Sven Neumann's avatar Sven Neumann
Browse files

app: remove gimp_display_shell_render_{init,exit}

The functions had become mostly obsolete and we can just use a
static scratch buffer for rendering.
parent d5d5f4fb
......@@ -95,38 +95,16 @@ struct _RenderInfo
gint64 dy;
};
static guchar tile_buf[GIMP_DISPLAY_RENDER_BUF_WIDTH * MAX_CHANNELS];
static void gimp_display_shell_render_info_scale (RenderInfo *info,
GimpDisplayShell *shell,
TileManager *tiles,
gint level,
gboolean is_premult);
static guchar *tile_buf = NULL;
void
gimp_display_shell_render_init (Gimp *gimp)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (tile_buf == NULL);
/* allocate a buffer for arranging information from a row of tiles */
tile_buf = g_new (guchar, GIMP_DISPLAY_RENDER_BUF_WIDTH * MAX_CHANNELS);
}
void
gimp_display_shell_render_exit (Gimp *gimp)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
if (tile_buf)
{
g_free (tile_buf);
tile_buf = NULL;
}
}
/* Render Image functions */
static void render_image_rgb_a (RenderInfo *info);
......@@ -147,12 +125,12 @@ static void gimp_display_shell_render_mask (GimpDisplayShell *shell,
/*****************************************************************/
void
gimp_display_shell_render (GimpDisplayShell *shell,
cairo_t *cr,
gint x,
gint y,
gint w,
gint h)
gimp_display_shell_render (GimpDisplayShell *shell,
cairo_t *cr,
gint x,
gint y,
gint w,
gint h)
{
GimpProjection *projection;
GimpImage *image;
......
......@@ -23,15 +23,12 @@
#define GIMP_DISPLAY_RENDER_BUF_HEIGHT 256
void gimp_display_shell_render_init (Gimp *gimp);
void gimp_display_shell_render_exit (Gimp *gimp);
void gimp_display_shell_render (GimpDisplayShell *shell,
cairo_t *cr,
gint x,
gint y,
gint w,
gint h);
void gimp_display_shell_render (GimpDisplayShell *shell,
cairo_t *cr,
gint x,
gint y,
gint w,
gint h);
#endif /* __GIMP_DISPLAY_SHELL_RENDER_H__ */
......@@ -42,7 +42,6 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplay-foreach.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-render.h"
#include "display/gimpstatusbar.h"
#include "tools/gimp-tools.h"
......@@ -406,7 +405,6 @@ gui_restore_callback (Gimp *gimp,
actions_init (gimp);
menus_init (gimp, global_action_factory);
gimp_render_init (gimp);
gimp_display_shell_render_init (gimp);
dialogs_init (gimp, global_menu_factory);
......@@ -630,7 +628,6 @@ gui_exit_after_callback (Gimp *gimp,
session_exit (gimp);
menus_exit (gimp);
actions_exit (gimp);
gimp_display_shell_render_exit (gimp);
gimp_render_exit (gimp);
gimp_controllers_exit (gimp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment