mirror of https://github.com/GNOME/gimp.git
app: rename gimp_drawable_get_buffer() and gimp_tile_manager_get_gegl_buffer()
to foo_create_buffer() because they return new objects.
This commit is contained in:
parent
0d236ee351
commit
b95fc4f8d5
|
@ -518,7 +518,7 @@ gimp_edit_extract (GimpImage *image,
|
|||
GeglBuffer *temp;
|
||||
GimpBuffer *buffer;
|
||||
|
||||
temp = gimp_tile_manager_get_gegl_buffer (tiles, TRUE);
|
||||
temp = gimp_tile_manager_create_buffer (tiles, TRUE);
|
||||
tile_manager_unref (tiles);
|
||||
|
||||
buffer = gimp_buffer_new (temp, _("Global Buffer"),
|
||||
|
|
|
@ -93,8 +93,8 @@ gimp_drawable_offset (GimpDrawable *drawable,
|
|||
|
||||
new_tiles = tile_manager_new (width, height, gimp_drawable_bytes (drawable));
|
||||
|
||||
src_buffer = gimp_drawable_get_buffer (drawable, FALSE);
|
||||
dest_buffer = gimp_tile_manager_get_gegl_buffer (new_tiles, TRUE);
|
||||
src_buffer = gimp_drawable_create_buffer (drawable, FALSE);
|
||||
dest_buffer = gimp_tile_manager_create_buffer (new_tiles, TRUE);
|
||||
|
||||
if (offset_x >= 0)
|
||||
{
|
||||
|
|
|
@ -180,8 +180,8 @@ gimp_drawable_apply_operation_private (GimpDrawable *drawable,
|
|||
"dont-cache", TRUE,
|
||||
NULL);
|
||||
|
||||
inbuf = gimp_drawable_get_buffer (drawable, FALSE);
|
||||
outbuf = gimp_tile_manager_get_gegl_buffer (dest_tiles, TRUE);
|
||||
inbuf = gimp_drawable_create_buffer (drawable, FALSE);
|
||||
outbuf = gimp_tile_manager_create_buffer (dest_tiles, TRUE);
|
||||
|
||||
input = gegl_node_new_child (gegl,
|
||||
"operation", "gegl:buffer-source",
|
||||
|
|
|
@ -435,8 +435,8 @@ gimp_drawable_duplicate (GimpItem *item,
|
|||
gimp_item_get_height (new_item),
|
||||
gimp_drawable_bytes (new_drawable));
|
||||
|
||||
src = gimp_drawable_get_buffer (drawable, FALSE);
|
||||
dest = gimp_drawable_get_buffer (new_drawable, TRUE);
|
||||
src = gimp_drawable_create_buffer (drawable, FALSE);
|
||||
dest = gimp_drawable_create_buffer (new_drawable, TRUE);
|
||||
|
||||
gegl_buffer_copy (src, NULL, dest, NULL);
|
||||
|
||||
|
@ -848,7 +848,7 @@ gimp_drawable_real_set_tiles (GimpDrawable *drawable,
|
|||
|
||||
if (drawable->private->tile_source_node)
|
||||
{
|
||||
GeglBuffer *buffer = gimp_drawable_get_buffer (drawable, FALSE);
|
||||
GeglBuffer *buffer = gimp_drawable_create_buffer (drawable, FALSE);
|
||||
|
||||
gegl_node_set (drawable->private->tile_source_node,
|
||||
"buffer", buffer,
|
||||
|
@ -1472,13 +1472,13 @@ gimp_drawable_init_src_region (GimpDrawable *drawable,
|
|||
}
|
||||
|
||||
GeglBuffer *
|
||||
gimp_drawable_get_buffer (GimpDrawable *drawable,
|
||||
gboolean write)
|
||||
gimp_drawable_create_buffer (GimpDrawable *drawable,
|
||||
gboolean write)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
|
||||
|
||||
return gimp_tile_manager_get_gegl_buffer (gimp_drawable_get_tiles (drawable),
|
||||
write);
|
||||
return gimp_tile_manager_create_buffer (gimp_drawable_get_tiles (drawable),
|
||||
write);
|
||||
}
|
||||
|
||||
TileManager *
|
||||
|
@ -1567,7 +1567,7 @@ gimp_drawable_get_source_node (GimpDrawable *drawable)
|
|||
|
||||
drawable->private->source_node = gegl_node_new ();
|
||||
|
||||
buffer = gimp_drawable_get_buffer (drawable, FALSE);
|
||||
buffer = gimp_drawable_create_buffer (drawable, FALSE);
|
||||
|
||||
drawable->private->tile_source_node =
|
||||
gegl_node_new_child (drawable->private->source_node,
|
||||
|
|
|
@ -178,8 +178,9 @@ void gimp_drawable_init_src_region (GimpDrawable *drawable,
|
|||
gint height,
|
||||
TileManager **temp_tiles);
|
||||
|
||||
GeglBuffer * gimp_drawable_get_buffer (GimpDrawable *drawable,
|
||||
GeglBuffer * gimp_drawable_create_buffer (GimpDrawable *drawable,
|
||||
gboolean write);
|
||||
|
||||
TileManager * gimp_drawable_get_tiles (GimpDrawable *drawable);
|
||||
void gimp_drawable_set_tiles (GimpDrawable *drawable,
|
||||
gboolean push_undo,
|
||||
|
|
|
@ -382,9 +382,9 @@ gimp_image_map_apply (GimpImageMap *image_map,
|
|||
GeglBuffer *output_buffer;
|
||||
|
||||
input_buffer =
|
||||
gimp_tile_manager_get_gegl_buffer (image_map->undo_tiles, FALSE);
|
||||
gimp_tile_manager_create_buffer (image_map->undo_tiles, FALSE);
|
||||
output_buffer =
|
||||
gimp_tile_manager_get_gegl_buffer (gimp_drawable_get_shadow_tiles (image_map->drawable), TRUE);
|
||||
gimp_tile_manager_create_buffer (gimp_drawable_get_shadow_tiles (image_map->drawable), TRUE);
|
||||
|
||||
if (! image_map->gegl)
|
||||
{
|
||||
|
|
|
@ -1200,11 +1200,8 @@ gimp_layer_new_from_buffer (GeglBuffer *buffer,
|
|||
type, name,
|
||||
opacity, mode);
|
||||
|
||||
dest = gimp_tile_manager_get_gegl_buffer (gimp_drawable_get_tiles (GIMP_DRAWABLE (layer)),
|
||||
TRUE);
|
||||
|
||||
dest = gimp_drawable_create_buffer (GIMP_DRAWABLE (layer), TRUE);
|
||||
gegl_buffer_copy (buffer, NULL, dest, NULL);
|
||||
|
||||
g_object_unref (dest);
|
||||
|
||||
return layer;
|
||||
|
|
|
@ -393,7 +393,7 @@ gimp_projection_get_sink_node (GimpProjection *proj)
|
|||
gegl_node_add_child (proj->graph, graph);
|
||||
|
||||
tiles = gimp_projection_get_tiles (GIMP_PICKABLE (proj));
|
||||
buffer = gimp_tile_manager_get_gegl_buffer (tiles, TRUE);
|
||||
buffer = gimp_tile_manager_create_buffer (tiles, TRUE);
|
||||
|
||||
proj->sink_node =
|
||||
gegl_node_new_child (proj->graph,
|
||||
|
@ -433,9 +433,10 @@ gimp_projection_get_tiles_at_level (GimpProjection *proj,
|
|||
if (proj->sink_node)
|
||||
{
|
||||
TileManager *tiles;
|
||||
GeglBuffer *buffer;
|
||||
GeglBuffer *buffer;
|
||||
|
||||
tiles = tile_pyramid_get_tiles (proj->pyramid, 0, NULL);
|
||||
buffer = gimp_tile_manager_get_gegl_buffer (tiles, TRUE);
|
||||
buffer = gimp_tile_manager_create_buffer (tiles, TRUE);
|
||||
|
||||
gegl_node_set (proj->sink_node,
|
||||
"buffer", buffer,
|
||||
|
|
|
@ -89,16 +89,17 @@ gimp_buffer_to_tiles (GeglBuffer *buffer)
|
|||
{
|
||||
TileManager *new_tiles;
|
||||
GeglBuffer *temp;
|
||||
gint width = gegl_buffer_get_width (buffer);
|
||||
gint height = gegl_buffer_get_height (buffer);
|
||||
const Babl *format = gegl_buffer_get_format (buffer);
|
||||
|
||||
gint width = gegl_buffer_get_width (buffer);
|
||||
gint height = gegl_buffer_get_height (buffer);
|
||||
const Babl *format = gegl_buffer_get_format (buffer);
|
||||
|
||||
new_tiles = tile_manager_new (width, height,
|
||||
gimp_babl_format_to_legacy_bpp (format));
|
||||
temp = gimp_tile_manager_get_gegl_buffer (new_tiles, TRUE);
|
||||
|
||||
temp = gimp_tile_manager_create_buffer (new_tiles, TRUE);
|
||||
gegl_buffer_copy (buffer, NULL, temp, NULL);
|
||||
g_object_unref (temp);
|
||||
|
||||
return new_tiles;
|
||||
}
|
||||
|
||||
|
@ -157,8 +158,8 @@ gimp_interpolation_to_gegl_filter (GimpInterpolationType interpolation)
|
|||
}
|
||||
|
||||
GeglBuffer *
|
||||
gimp_tile_manager_get_gegl_buffer (TileManager *tm,
|
||||
gboolean write)
|
||||
gimp_tile_manager_create_buffer (TileManager *tm,
|
||||
gboolean write)
|
||||
{
|
||||
GeglTileBackend *backend;
|
||||
GeglBuffer *buffer;
|
||||
|
|
|
@ -30,7 +30,7 @@ TileManager * gimp_buffer_to_tiles (GeglBuffer *buffer);
|
|||
const gchar * gimp_layer_mode_to_gegl_operation (GimpLayerModeEffects mode) G_GNUC_CONST;
|
||||
const gchar * gimp_interpolation_to_gegl_filter (GimpInterpolationType interpolation) G_GNUC_CONST;
|
||||
|
||||
GeglBuffer * gimp_tile_manager_get_gegl_buffer (TileManager *tm,
|
||||
GeglBuffer * gimp_tile_manager_create_buffer (TileManager *tm,
|
||||
gboolean write);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue