2 Copyright 1999-2014 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 #include "MagickCore/cache.h"
22 #include "MagickCore/distribute-cache.h"
23 #include "MagickCore/pixel.h"
24 #include "MagickCore/random_.h"
25 #include "MagickCore/thread-private.h"
26 #include "MagickCore/semaphore.h"
28 #if defined(__cplusplus) || defined(c_plusplus)
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
119 authentic_pixel_cache;
128 typedef struct _CacheInfo
152 channel_map[MaxPixelChannels];
170 virtual_pixel_method;
191 filename[MaxTextExtent],
192 cache_filename[MaxTextExtent];
224 extern MagickPrivate Cache
225 AcquirePixelCache(const size_t),
226 ClonePixelCache(const Cache),
227 DestroyPixelCache(Cache),
228 ReferencePixelCache(Cache);
230 extern MagickPrivate ClassType
231 GetPixelCacheStorageClass(const Cache);
233 extern MagickPrivate ColorspaceType
234 GetPixelCacheColorspace(const Cache);
236 extern MagickPrivate const Quantum
237 *GetVirtualPixelsFromNexus(const Image *,const VirtualPixelMethod,
238 const ssize_t,const ssize_t,const size_t,const size_t,NexusInfo *,
239 ExceptionInfo *) magick_hot_spot,
240 *GetVirtualPixelsNexus(const Cache,NexusInfo *);
242 extern MagickPrivate const void
243 *AcquirePixelCachePixels(const Image *,MagickSizeType *,ExceptionInfo *),
244 *GetVirtualMetacontentFromNexus(const Cache,NexusInfo *);
246 extern MagickPrivate MagickBooleanType
247 CacheComponentGenesis(void),
248 SyncAuthenticPixelCacheNexus(Image *,NexusInfo *,ExceptionInfo *)
250 SyncImagePixelCache(Image *,ExceptionInfo *);
252 extern MagickPrivate MagickSizeType
253 GetPixelCacheNexusExtent(const Cache,NexusInfo *);
255 extern MagickPrivate NexusInfo
256 **AcquirePixelCacheNexus(const size_t),
257 **DestroyPixelCacheNexus(NexusInfo **,const size_t);
259 extern MagickPrivate Quantum
260 *GetAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
261 const size_t,const size_t,NexusInfo *,ExceptionInfo *) magick_hot_spot,
262 *QueueAuthenticPixelCacheNexus(Image *,const ssize_t,const ssize_t,
263 const size_t,const size_t,const MagickBooleanType,NexusInfo *,
264 ExceptionInfo *) magick_hot_spot;
266 extern MagickPrivate size_t
267 GetPixelCacheChannels(const Cache);
269 extern MagickPrivate VirtualPixelMethod
270 GetPixelCacheVirtualMethod(const Image *),
271 SetPixelCacheVirtualMethod(Image *,const VirtualPixelMethod,ExceptionInfo *);
273 extern MagickPrivate void
274 CacheComponentTerminus(void),
275 ClonePixelCacheMethods(Cache,const Cache),
276 *GetPixelCachePixels(Image *,MagickSizeType *,ExceptionInfo *),
277 GetPixelCacheTileSize(const Image *,size_t *,size_t *),
278 GetPixelCacheMethods(CacheMethods *),
279 SetPixelCacheMethods(Cache,CacheMethods *);
281 #if defined(__cplusplus) || defined(c_plusplus)