2 Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 http://www.imagemagick.org/script/license.php
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
16 MagickCore cache private methods.
18 #ifndef _MAGICKCORE_CACHE_PRIVATE_H
19 #define _MAGICKCORE_CACHE_PRIVATE_H
21 #if defined(__cplusplus) || defined(c_plusplus)
26 #include "MagickCore/random_.h"
27 #include "MagickCore/thread-private.h"
28 #include "MagickCore/semaphore.h"
42 typedef MagickBooleanType
43 (*GetOneAuthenticPixelFromHandler)(Image *,const ssize_t,const ssize_t,
44 Quantum *,ExceptionInfo *),
45 (*GetOneVirtualPixelFromHandler)(const Image *,const VirtualPixelMethod,
46 const ssize_t,const ssize_t,Quantum *,ExceptionInfo *),
47 (*SyncAuthenticPixelsHandler)(Image *,ExceptionInfo *);
50 *(*GetVirtualPixelHandler)(const Image *,const VirtualPixelMethod,
51 const ssize_t,const ssize_t,const size_t,const size_t,ExceptionInfo *),
52 *(*GetVirtualPixelsHandler)(const Image *);
55 *(*GetVirtualMetacontentFromHandler)(const Image *);
58 *(*GetAuthenticPixelsHandler)(Image *,const ssize_t,const ssize_t,
59 const size_t,const size_t,ExceptionInfo *);
62 *(*GetAuthenticPixelsFromHandler)(const Image *);
65 *(*QueueAuthenticPixelsHandler)(Image *,const ssize_t,const ssize_t,
66 const size_t,const size_t,ExceptionInfo *);
69 (*DestroyPixelHandler)(Image *);
72 *(*GetAuthenticMetacontentFromHandler)(const Image *);
74 typedef struct _CacheMethods
76 GetVirtualPixelHandler
77 get_virtual_pixel_handler;
79 GetVirtualPixelsHandler
80 get_virtual_pixels_handler;
82 GetVirtualMetacontentFromHandler
83 get_virtual_metacontent_from_handler;
85 GetOneVirtualPixelFromHandler
86 get_one_virtual_pixel_from_handler;
88 GetAuthenticPixelsHandler
89 get_authentic_pixels_handler;
91 GetAuthenticMetacontentFromHandler
92 get_authentic_metacontent_from_handler;
94 GetOneAuthenticPixelFromHandler
95 get_one_authentic_pixel_from_handler;
97 GetAuthenticPixelsFromHandler
98 get_authentic_pixels_from_handler;
100 QueueAuthenticPixelsHandler
101 queue_authentic_pixels_handler;
103 SyncAuthenticPixelsHandler
104 sync_authentic_pixels_handler;
107 destroy_pixel_handler;
110 typedef struct _NexusInfo
113 typedef struct _CacheInfo
134 channel_map[MaxPixelChannels];
152 virtual_pixel_method;
173 filename[MaxTextExtent],
174 cache_filename[MaxTextExtent];
202 extern MagickPrivate Cache
203 AcquirePixelCache(const size_t),
204 ClonePixelCache(const Cache),
205 DestroyPixelCache(Cache),
206 ReferencePixelCache(Cache);
208 extern MagickPrivate CacheType
209 GetPixelCacheType(const Image *);
211 extern MagickPrivate ClassType
212 GetPixelCacheStorageClass(const Cache);
214 extern MagickPrivate ColorspaceType
215 GetPixelCacheColorspace(const Cache);
217 extern MagickPrivate const Quantum
218 *GetVirtualPixelsFromNexus(const Image *,const VirtualPixelMethod,
219 const ssize_t,const ssize_t,const size_t,const size_t,NexusInfo *,
220 ExceptionInfo *) magick_hot_spot,
221 *GetVirtualPixelsNexus(const Cache,NexusInfo *);
223 extern MagickPrivate const void
224 *AcquirePixelCachePixels(const Image *,MagickSizeType *,ExceptionInfo *),
225 *GetVirtualMetacontentFromNexus(const Cache,NexusInfo *);
227 extern MagickPrivate MagickBooleanType
228 CacheComponentGenesis(void),
229 SyncAuthenticPixelCacheNexus(Image *,NexusInfo *,ExceptionInfo *)
231 SyncImagePixelCache(Image *,ExceptionInfo *);
233 extern MagickPrivate MagickSizeType
234 GetPixelCacheNexusExtent(const Cache,NexusInfo *);
236 extern MagickPrivate NexusInfo
237 **AcquirePixelCacheNexus(const size_t),
238 **DestroyPixelCacheNexus(NexusInfo **,const size_t);
240 extern MagickPrivate Quantum
241 *GetAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
242 const size_t,const size_t,NexusInfo *,ExceptionInfo *) magick_hot_spot,
243 *GetPixelCacheNexusPixels(const Cache,NexusInfo *),
244 *QueueAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
245 const size_t,const size_t,const MagickBooleanType,NexusInfo *,
246 ExceptionInfo *) magick_hot_spot;
248 extern MagickPrivate size_t
249 GetPixelCacheChannels(const Cache);
251 extern MagickPrivate VirtualPixelMethod
252 GetPixelCacheVirtualMethod(const Image *),
253 SetPixelCacheVirtualMethod(Image *,const VirtualPixelMethod,ExceptionInfo *);
255 extern MagickPrivate void
256 CacheComponentTerminus(void),
257 ClonePixelCacheMethods(Cache,const Cache),
258 *GetPixelCacheNexusMetacontent(const Cache,NexusInfo *) magick_hot_spot,
259 *GetPixelCachePixels(Image *,MagickSizeType *,ExceptionInfo *),
260 GetPixelCacheTileSize(const Image *,size_t *,size_t *),
261 GetPixelCacheMethods(CacheMethods *),
262 SetPixelCacheMethods(Cache,CacheMethods *);
264 #if defined(__cplusplus) || defined(c_plusplus)