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/pixel.h"
28 #include "MagickCore/random_.h"
29 #include "MagickCore/thread-private.h"
30 #include "MagickCore/semaphore.h"
35 typedef MagickBooleanType
36 (*GetOneAuthenticPixelFromHandler)(Image *,const ssize_t,const ssize_t,
37 Quantum *,ExceptionInfo *),
38 (*GetOneVirtualPixelFromHandler)(const Image *,const VirtualPixelMethod,
39 const ssize_t,const ssize_t,Quantum *,ExceptionInfo *),
40 (*SyncAuthenticPixelsHandler)(Image *,ExceptionInfo *);
43 *(*GetVirtualPixelHandler)(const Image *,const VirtualPixelMethod,
44 const ssize_t,const ssize_t,const size_t,const size_t,ExceptionInfo *),
45 *(*GetVirtualPixelsHandler)(const Image *);
48 *(*GetVirtualMetacontentFromHandler)(const Image *);
51 *(*GetAuthenticPixelsHandler)(Image *,const ssize_t,const ssize_t,
52 const size_t,const size_t,ExceptionInfo *);
55 *(*GetAuthenticPixelsFromHandler)(const Image *);
58 *(*QueueAuthenticPixelsHandler)(Image *,const ssize_t,const ssize_t,
59 const size_t,const size_t,ExceptionInfo *);
62 (*DestroyPixelHandler)(Image *);
65 *(*GetAuthenticMetacontentFromHandler)(const Image *);
67 typedef struct _CacheMethods
69 GetVirtualPixelHandler
70 get_virtual_pixel_handler;
72 GetVirtualPixelsHandler
73 get_virtual_pixels_handler;
75 GetVirtualMetacontentFromHandler
76 get_virtual_metacontent_from_handler;
78 GetOneVirtualPixelFromHandler
79 get_one_virtual_pixel_from_handler;
81 GetAuthenticPixelsHandler
82 get_authentic_pixels_handler;
84 GetAuthenticMetacontentFromHandler
85 get_authentic_metacontent_from_handler;
87 GetOneAuthenticPixelFromHandler
88 get_one_authentic_pixel_from_handler;
90 GetAuthenticPixelsFromHandler
91 get_authentic_pixels_from_handler;
93 QueueAuthenticPixelsHandler
94 queue_authentic_pixels_handler;
96 SyncAuthenticPixelsHandler
97 sync_authentic_pixels_handler;
100 destroy_pixel_handler;
103 typedef struct _NexusInfo
106 typedef struct _CacheInfo
129 channel_map[MaxPixelChannels];
147 virtual_pixel_method;
168 filename[MaxTextExtent],
169 cache_filename[MaxTextExtent];
197 extern MagickPrivate Cache
198 AcquirePixelCache(const size_t),
199 ClonePixelCache(const Cache),
200 DestroyPixelCache(Cache),
201 ReferencePixelCache(Cache);
203 extern MagickPrivate ClassType
204 GetPixelCacheStorageClass(const Cache);
206 extern MagickPrivate ColorspaceType
207 GetPixelCacheColorspace(const Cache);
209 extern MagickPrivate const Quantum
210 *GetVirtualPixelsFromNexus(const Image *,const VirtualPixelMethod,
211 const ssize_t,const ssize_t,const size_t,const size_t,NexusInfo *,
212 ExceptionInfo *) magick_hot_spot,
213 *GetVirtualPixelsNexus(const Cache,NexusInfo *);
215 extern MagickPrivate const void
216 *AcquirePixelCachePixels(const Image *,MagickSizeType *,ExceptionInfo *),
217 *GetVirtualMetacontentFromNexus(const Cache,NexusInfo *);
219 extern MagickPrivate MagickBooleanType
220 CacheComponentGenesis(void),
221 SyncAuthenticPixelCacheNexus(Image *,NexusInfo *,ExceptionInfo *)
223 SyncImagePixelCache(Image *,ExceptionInfo *);
225 extern MagickPrivate MagickSizeType
226 GetPixelCacheNexusExtent(const Cache,NexusInfo *);
228 extern MagickPrivate NexusInfo
229 **AcquirePixelCacheNexus(const size_t),
230 **DestroyPixelCacheNexus(NexusInfo **,const size_t);
232 extern MagickPrivate Quantum
233 *GetAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
234 const size_t,const size_t,NexusInfo *,ExceptionInfo *) magick_hot_spot,
235 *GetPixelCacheNexusPixels(const Cache,NexusInfo *),
236 *QueueAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
237 const size_t,const size_t,const MagickBooleanType,NexusInfo *,
238 ExceptionInfo *) magick_hot_spot;
240 extern MagickPrivate size_t
241 GetPixelCacheChannels(const Cache);
243 extern MagickPrivate VirtualPixelMethod
244 GetPixelCacheVirtualMethod(const Image *),
245 SetPixelCacheVirtualMethod(Image *,const VirtualPixelMethod,ExceptionInfo *);
247 extern MagickPrivate void
248 CacheComponentTerminus(void),
249 ClonePixelCacheMethods(Cache,const Cache),
250 *GetPixelCacheNexusMetacontent(const Cache,NexusInfo *) magick_hot_spot,
251 *GetPixelCachePixels(Image *,MagickSizeType *,ExceptionInfo *),
252 GetPixelCacheTileSize(const Image *,size_t *,size_t *),
253 GetPixelCacheMethods(CacheMethods *),
254 SetPixelCacheMethods(Cache,CacheMethods *);
256 #if defined(__cplusplus) || defined(c_plusplus)