~ubuntu-branches/ubuntu/trusty/vips/trusty-proposed

« back to all changes in this revision

Viewing changes to libvips/include/vips/private.h

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2014-03-29 12:29:29 UTC
  • mfrom: (1.1.21) (30.1.16 sid)
  • Revision ID: package-import@ubuntu.com-20140329122929-fvxnaann32ex0gzk
Tags: 7.38.5-2
Enable dh-autoreconf. (Closes: #742872)

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 */
57
57
#define VIPS_SIZEOF_HEADER (64)
58
58
 
 
59
/* Startup plus ABI check.
 
60
 */
 
61
int vips__init( const char *argv0 );
 
62
size_t vips__get_sizeof_vipsobject( void );
 
63
 
59
64
/* What we track for each mmap window. Have a list of these on an openin
60
65
 * VipsImage.
61
66
 */
77
82
int vips_window_unref( VipsWindow *window );
78
83
void vips_window_print( VipsWindow *window );
79
84
 
80
 
/* Per-thread buffer cache. Held in a GPrivate.
 
85
/* Per-thread buffer state. Held in a GPrivate.
81
86
 */
82
87
typedef struct {
83
 
        GHashTable *hash;       /* Hash to VipsBufferCacheList* */
 
88
        GHashTable *hash;       /* VipsImage -> VipsBufferCache* */
84
89
        GThread *thread;        /* Just for sanity checking */
85
 
} VipsBufferCache;
 
90
} VipsBufferThread;
86
91
 
87
92
/* Per-image buffer cache. Hash to this from VipsBufferCache.
88
93
 * We can't store the GSList directly in the hash table, as GHashTable lacks an
89
94
 * update operation and we'd need to _remove() and _insert() on every list
90
95
 * operation.
91
96
 */
92
 
typedef struct _VipsBufferCacheList {
 
97
typedef struct _VipsBufferCache {
93
98
        GSList *buffers;        /* GSList of VipsBuffer* */
94
99
        GThread *thread;        /* Just for sanity checking */
95
100
        struct _VipsImage *im;
96
 
        VipsBufferCache *cache;
97
 
} VipsBufferCacheList;
 
101
        VipsBufferThread *buffer_thread;
 
102
        GSList *reserve;        /* VipsBuffer kept in reserve */
 
103
        int n_reserve;          /* Number in reserve */
 
104
} VipsBufferCache;
98
105
 
99
 
/* What we track for each pixel buffer. 
 
106
/* What we track for each pixel buffer. These can move between caches and
 
107
 * between threads, but not between images. 
100
108
 */
101
109
typedef struct _VipsBuffer {
102
110
        int ref_count;          /* # of regions referencing us */
104
112
 
105
113
        VipsRect area;          /* Area this pixel buffer covers */
106
114
        gboolean done;          /* Calculated and in cache */
107
 
        VipsBufferCache *cache;
 
115
        VipsBufferCache *cache; /* The cache this buffer is published on */
108
116
        VipsPel *buf;           /* Private malloc() area */
109
117
        size_t bsize;           /* Size of private malloc() */
110
118
} VipsBuffer;
111
119
 
 
120
void vips_buffer_dump_all( void );
112
121
void vips_buffer_done( VipsBuffer *buffer );
113
122
void vips_buffer_undone( VipsBuffer *buffer );
114
123
void vips_buffer_unref( VipsBuffer *buffer );
149
158
void vips__region_check_ownership( struct _VipsRegion *reg );
150
159
void vips__region_no_ownership( struct _VipsRegion *reg );
151
160
 
152
 
int vips__region_start( struct _VipsRegion *reg );
153
 
void vips__region_stop( struct _VipsRegion *reg );
154
 
 
155
161
typedef int (*VipsRegionFillFn)( struct _VipsRegion *, void * );
156
162
int vips_region_fill( struct _VipsRegion *reg, 
157
163
        VipsRect *r, VipsRegionFillFn fn, void *a );
165
171
VipsArgument *vips__argument_table_lookup( VipsArgumentTable *table, 
166
172
        GParamSpec *pspec);
167
173
 
 
174
void vips__demand_hint_array( struct _VipsImage *image, 
 
175
        int hint, struct _VipsImage **in );
 
176
int vips__image_copy_fields_array( struct _VipsImage *out, 
 
177
        struct _VipsImage *in[] );
 
178
 
168
179
#ifdef __cplusplus
169
180
}
170
181
#endif /*__cplusplus*/