gegl r2173 - in trunk: . gegl/buffer
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2173 - in trunk: . gegl/buffer
- Date: Tue, 15 Apr 2008 01:02:40 +0100 (BST)
Author: ok
Date: Tue Apr 15 01:02:40 2008
New Revision: 2173
URL: http://svn.gnome.org/viewvc/gegl?rev=2173&view=rev
Log:
* gegl/buffer/gegl-tile-gio.c: (gio_entry_read), (gio_entry_write):
use g_input_stream_read_all and g_output_stream_write_all.
Modified:
trunk/ChangeLog
trunk/gegl/buffer/gegl-tile-gio.c
Modified: trunk/gegl/buffer/gegl-tile-gio.c
==============================================================================
--- trunk/gegl/buffer/gegl-tile-gio.c (original)
+++ trunk/gegl/buffer/gegl-tile-gio.c Tue Apr 15 01:02:40 2008
@@ -102,11 +102,14 @@
GFile *file;
gint tile_size = GEGL_TILE_BACKEND (gio)->tile_size;
GFileInputStream *i;
+ gsize bytes_read;
file = make_tile_file (gio, entry->x, entry->y, entry->z);
i = g_file_read (file, NULL, NULL);
- g_input_stream_read (G_INPUT_STREAM (i), dest, tile_size, NULL, NULL);
+ g_input_stream_read_all (G_INPUT_STREAM (i), dest, tile_size, &bytes_read,
+ NULL, NULL);
+ g_assert (bytes_read == tile_size);
g_input_stream_close (G_INPUT_STREAM (i), NULL, NULL);
g_object_unref (G_OBJECT (i));
@@ -121,12 +124,15 @@
gint tile_size = GEGL_TILE_BACKEND (gio)->tile_size;
GFile *file;
GFileOutputStream *o;
+ gsize bytes_written;
file = make_tile_file (gio, entry->x, entry->y, entry->z);
o = g_file_replace (file, NULL, FALSE,
G_FILE_CREATE_NONE, NULL, NULL);
- g_output_stream_write (G_OUTPUT_STREAM (o), source, tile_size, NULL, NULL);
+ g_output_stream_write_all (G_OUTPUT_STREAM (o), source, tile_size,
+ &bytes_written, NULL, NULL);
+ g_assert (bytes_written == tile_size);
g_output_stream_close (G_OUTPUT_STREAM (o), NULL, NULL);
g_object_unref (G_OBJECT (o));
@@ -162,9 +168,9 @@
gint y,
gint z)
{
- GeglTileGio *tile_gio = GEGL_TILE_GIO (tile_store);
- GeglTileBackend *backend = GEGL_TILE_BACKEND (tile_store);
- GeglTile *tile = NULL;
+ GeglTileGio *tile_gio = GEGL_TILE_GIO (tile_store);
+ GeglTileBackend *backend = GEGL_TILE_BACKEND (tile_store);
+ GeglTile *tile = NULL;
if (exist_tile (tile_store, NULL, x, y, z))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]