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];
198 extern MagickPrivate Cache
199 AcquirePixelCache(const size_t),
200 ClonePixelCache(const Cache),
201 DestroyPixelCache(Cache),
202 ReferencePixelCache(Cache);
204 extern MagickPrivate ClassType
205 GetPixelCacheStorageClass(const Cache);
207 extern MagickPrivate ColorspaceType
208 GetPixelCacheColorspace(const Cache);
210 extern MagickPrivate const Quantum
211 *GetVirtualPixelsFromNexus(const Image *,const VirtualPixelMethod,
212 const ssize_t,const ssize_t,const size_t,const size_t,NexusInfo *,
213 ExceptionInfo *) magick_hot_spot,
214 *GetVirtualPixelsNexus(const Cache,NexusInfo *);
216 extern MagickPrivate const void
217 *AcquirePixelCachePixels(const Image *,MagickSizeType *,ExceptionInfo *),
218 *GetVirtualMetacontentFromNexus(const Cache,NexusInfo *);
220 extern MagickPrivate MagickBooleanType
221 CacheComponentGenesis(void),
222 SyncAuthenticPixelCacheNexus(Image *,NexusInfo *,ExceptionInfo *)
224 SyncImagePixelCache(Image *,ExceptionInfo *);
226 extern MagickPrivate MagickSizeType
227 GetPixelCacheNexusExtent(const Cache,NexusInfo *);
229 extern MagickPrivate NexusInfo
230 **AcquirePixelCacheNexus(const size_t),
231 **DestroyPixelCacheNexus(NexusInfo **,const size_t);
233 extern MagickPrivate Quantum
234 *GetAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
235 const size_t,const size_t,NexusInfo *,ExceptionInfo *) magick_hot_spot,
236 *GetPixelCacheNexusPixels(const Cache,NexusInfo *),
237 *QueueAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
238 const size_t,const size_t,const MagickBooleanType,NexusInfo *,
239 ExceptionInfo *) magick_hot_spot;
241 extern MagickPrivate size_t
242 GetPixelCacheChannels(const Cache);
244 extern MagickPrivate VirtualPixelMethod
245 GetPixelCacheVirtualMethod(const Image *),
246 SetPixelCacheVirtualMethod(Image *,const VirtualPixelMethod,ExceptionInfo *);
248 extern MagickPrivate void
249 CacheComponentTerminus(void),
250 ClonePixelCacheMethods(Cache,const Cache),
251 *GetPixelCacheNexusMetacontent(const Cache,NexusInfo *) magick_hot_spot,
252 *GetPixelCachePixels(Image *,MagickSizeType *,ExceptionInfo *),
253 GetPixelCacheTileSize(const Image *,size_t *,size_t *),
254 GetPixelCacheMethods(CacheMethods *),
255 SetPixelCacheMethods(Cache,CacheMethods *);
257 #if defined(__cplusplus) || defined(c_plusplus)