2 Copyright 1999-2013 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/cache.h"
27 #include "MagickCore/distribute-cache.h"
28 #include "MagickCore/pixel.h"
29 #include "MagickCore/random_.h"
30 #include "MagickCore/thread-private.h"
31 #include "MagickCore/semaphore.h"
36 typedef MagickBooleanType
37 (*GetOneAuthenticPixelFromHandler)(Image *,const ssize_t,const ssize_t,
38 Quantum *,ExceptionInfo *),
39 (*GetOneVirtualPixelFromHandler)(const Image *,const VirtualPixelMethod,
40 const ssize_t,const ssize_t,Quantum *,ExceptionInfo *),
41 (*SyncAuthenticPixelsHandler)(Image *,ExceptionInfo *);
44 *(*GetVirtualPixelHandler)(const Image *,const VirtualPixelMethod,
45 const ssize_t,const ssize_t,const size_t,const size_t,ExceptionInfo *),
46 *(*GetVirtualPixelsHandler)(const Image *);
49 *(*GetVirtualMetacontentFromHandler)(const Image *);
52 *(*GetAuthenticPixelsHandler)(Image *,const ssize_t,const ssize_t,
53 const size_t,const size_t,ExceptionInfo *);
56 *(*GetAuthenticPixelsFromHandler)(const Image *);
59 *(*QueueAuthenticPixelsHandler)(Image *,const ssize_t,const ssize_t,
60 const size_t,const size_t,ExceptionInfo *);
63 (*DestroyPixelHandler)(Image *);
66 *(*GetAuthenticMetacontentFromHandler)(const Image *);
68 typedef struct _CacheMethods
70 GetVirtualPixelHandler
71 get_virtual_pixel_handler;
73 GetVirtualPixelsHandler
74 get_virtual_pixels_handler;
76 GetVirtualMetacontentFromHandler
77 get_virtual_metacontent_from_handler;
79 GetOneVirtualPixelFromHandler
80 get_one_virtual_pixel_from_handler;
82 GetAuthenticPixelsHandler
83 get_authentic_pixels_handler;
85 GetAuthenticMetacontentFromHandler
86 get_authentic_metacontent_from_handler;
88 GetOneAuthenticPixelFromHandler
89 get_one_authentic_pixel_from_handler;
91 GetAuthenticPixelsFromHandler
92 get_authentic_pixels_from_handler;
94 QueueAuthenticPixelsHandler
95 queue_authentic_pixels_handler;
97 SyncAuthenticPixelsHandler
98 sync_authentic_pixels_handler;
101 destroy_pixel_handler;
104 typedef struct _NexusInfo
129 typedef struct _CacheInfo
153 channel_map[MaxPixelChannels];
171 virtual_pixel_method;
192 filename[MaxTextExtent],
193 cache_filename[MaxTextExtent];
225 extern MagickPrivate Cache
226 AcquirePixelCache(const size_t),
227 ClonePixelCache(const Cache),
228 DestroyPixelCache(Cache),
229 ReferencePixelCache(Cache);
231 extern MagickPrivate ClassType
232 GetPixelCacheStorageClass(const Cache);
234 extern MagickPrivate ColorspaceType
235 GetPixelCacheColorspace(const Cache);
237 extern MagickPrivate const Quantum
238 *GetVirtualPixelsFromNexus(const Image *,const VirtualPixelMethod,
239 const ssize_t,const ssize_t,const size_t,const size_t,NexusInfo *,
240 ExceptionInfo *) magick_hot_spot,
241 *GetVirtualPixelsNexus(const Cache,NexusInfo *);
243 extern MagickPrivate const void
244 *AcquirePixelCachePixels(const Image *,MagickSizeType *,ExceptionInfo *),
245 *GetVirtualMetacontentFromNexus(const Cache,NexusInfo *);
247 extern MagickPrivate MagickBooleanType
248 CacheComponentGenesis(void),
249 SyncAuthenticPixelCacheNexus(Image *,NexusInfo *,ExceptionInfo *)
251 SyncImagePixelCache(Image *,ExceptionInfo *);
253 extern MagickPrivate MagickSizeType
254 GetPixelCacheNexusExtent(const Cache,NexusInfo *);
256 extern MagickPrivate NexusInfo
257 **AcquirePixelCacheNexus(const size_t),
258 **DestroyPixelCacheNexus(NexusInfo **,const size_t);
260 extern MagickPrivate Quantum
261 *GetAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
262 const size_t,const size_t,NexusInfo *,ExceptionInfo *) magick_hot_spot,
263 *QueueAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
264 const size_t,const size_t,const MagickBooleanType,NexusInfo *,
265 ExceptionInfo *) magick_hot_spot;
267 extern MagickPrivate size_t
268 GetPixelCacheChannels(const Cache);
270 extern MagickPrivate VirtualPixelMethod
271 GetPixelCacheVirtualMethod(const Image *),
272 SetPixelCacheVirtualMethod(Image *,const VirtualPixelMethod,ExceptionInfo *);
274 extern MagickPrivate void
275 CacheComponentTerminus(void),
276 ClonePixelCacheMethods(Cache,const Cache),
277 *GetPixelCachePixels(Image *,MagickSizeType *,ExceptionInfo *),
278 GetPixelCacheTileSize(const Image *,size_t *,size_t *),
279 GetPixelCacheMethods(CacheMethods *),
280 SetPixelCacheMethods(Cache,CacheMethods *);
282 #if defined(__cplusplus) || defined(c_plusplus)