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.
This commit is contained in:
@ -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);
|
||||
|
@ -23,9 +23,6 @@
|
||||
#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,
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user