mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 04:22:29 +00:00
aaa16d3b87
2007-12-13 Sven Neumann <sven@gimp.org> Speed up our display rendering code paths by keeping data with pre-multiplied alpha where possible. The projection tile-manager at 100 % zoom is not affected. So we can still always get the non-pre-multiplied pixel data. * app/core/gimpprojection.[ch]: removed gimp_projection_get_opacity(), the projection is always opaque. * app/base/tile-pyramid.[ch]: use pre-multiplied alpha for the upper levels of the pyramid. This speeds up validation of the upper levels significantly. * app/base/temp-buf.[ch]: added temp_buf_demultiply(). * app/core/gimpimage-preview.c: demultiply the preview temp-buf obtained from the projection's tile tyramid. * app/display/gimpdisplayshell-draw.c * app/display/gimpdisplayshell-render.c: added code to deal with pre-multiplied data. In fact all data returned by render_image_tile_fault() is now pre-multiplied so that render_image_rgb_a() and render_image_gray_a() don't need to use the large lookup tables from gimprender.[ch] any longer. svn path=/trunk/; revision=24352
54 lines
2.5 KiB
C
54 lines
2.5 KiB
C
/* GIMP - The GNU Image Manipulation Program
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef __TILE_PYRAMID_H__
|
|
#define __TILE_PYRAMID_H__
|
|
|
|
|
|
TilePyramid * tile_pyramid_new (GimpImageType type,
|
|
gint width,
|
|
gint height);
|
|
void tile_pyramid_destroy (TilePyramid *pyramid);
|
|
|
|
gint tile_pyramid_get_level (gint width,
|
|
gint height,
|
|
gdouble scale);
|
|
|
|
TileManager * tile_pyramid_get_tiles (TilePyramid *pyramid,
|
|
gint level,
|
|
gboolean *is_premult);
|
|
|
|
void tile_pyramid_invalidate_area (TilePyramid *pyramid,
|
|
gint x,
|
|
gint y,
|
|
gint width,
|
|
gint height);
|
|
|
|
void tile_pyramid_set_validate_proc (TilePyramid *pyramid,
|
|
TileValidateProc proc,
|
|
gpointer user_data);
|
|
|
|
gint tile_pyramid_get_width (const TilePyramid *pyramid);
|
|
gint tile_pyramid_get_height (const TilePyramid *pyramid);
|
|
gint tile_pyramid_get_bpp (const TilePyramid *pyramid);
|
|
|
|
gint64 tile_pyramid_get_memsize (const TilePyramid *pyramid);
|
|
|
|
|
|
#endif /* __TILE_PYRAMID_H__ */
|