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/opencl-private.h"
24#include "MagickCore/pixel.h"
25#include "MagickCore/random_.h"
26#include "MagickCore/thread-private.h"
27#include "MagickCore/semaphore.h"
29#if defined(__cplusplus) || defined(c_plusplus)
36typedef MagickBooleanType
37 (*GetOneAuthenticPixelFromHandler)(
Image *,
const ssize_t,
const ssize_t,
39 (*GetOneVirtualPixelFromHandler)(
const Image *,
const VirtualPixelMethod,
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,
56 *(*GetAuthenticPixelsFromHandler)(
const Image *);
59 *(*QueueAuthenticPixelsHandler)(
Image *,
const ssize_t,
const ssize_t,
63 (*DestroyPixelHandler)(
Image *);
66 *(*GetAuthenticMetacontentFromHandler)(
const Image *);
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;
120 authentic_pixel_cache;
155 channel_map[MaxPixelChannels];
174 virtual_pixel_method;
195 filename[MagickPathExtent],
196 cache_filename[MagickPathExtent];
238static inline MagickBooleanType IsValidPixelOffset(
const ssize_t x,
243 if ((x >= (MAGICK_SSIZE_MAX/(ssize_t) extent)) ||
244 (x <= (MAGICK_SSIZE_MIN/(ssize_t) extent)))
249extern MagickPrivate Cache
250 AcquirePixelCache(
const size_t),
251 ClonePixelCache(
const Cache),
252 DestroyPixelCache(Cache),
253 ReferencePixelCache(Cache);
255extern MagickPrivate ClassType
256 GetPixelCacheStorageClass(
const Cache);
258extern MagickPrivate ColorspaceType
259 GetPixelCacheColorspace(
const Cache);
261extern MagickPrivate
const Quantum
262 *GetVirtualPixelCacheNexus(
const Image *,
const VirtualPixelMethod,
263 const ssize_t,
const ssize_t,
const size_t,
const size_t,
NexusInfo *,
265 *GetVirtualPixelsNexus(
const Cache,
NexusInfo *magick_restrict);
267extern MagickPrivate
const void
268 *GetVirtualMetacontentFromNexus(
const Cache,
NexusInfo *magick_restrict);
270extern MagickPrivate MagickBooleanType
271 CacheComponentGenesis(
void),
276extern MagickPrivate MagickSizeType
277 GetPixelCacheNexusExtent(
const Cache,
NexusInfo *magick_restrict);
280 **AcquirePixelCacheNexus(
const size_t),
281 **DestroyPixelCacheNexus(
NexusInfo **,
const size_t);
283extern MagickPrivate Quantum
284 *GetAuthenticPixelCacheNexus(
Image *,
const ssize_t,
const ssize_t,
286 *QueueAuthenticPixelCacheNexus(
Image *,
const ssize_t,
const ssize_t,
287 const size_t,
const size_t,
const MagickBooleanType,
NexusInfo *,
290extern MagickPrivate
size_t
291 GetPixelCacheChannels(
const Cache);
293extern MagickPrivate VirtualPixelMethod
294 GetPixelCacheVirtualMethod(
const Image *),
297extern MagickPrivate
void
298 CacheComponentTerminus(
void),
299 ClonePixelCacheMethods(Cache,
const Cache),
300 GetPixelCacheTileSize(
const Image *,
size_t *,
size_t *),
302 ResetCacheAnonymousMemory(
void),
303 ResetPixelCacheChannels(
Image *),
306#if defined(MAGICKCORE_OPENCL_SUPPORT)
307extern MagickPrivate cl_mem
310extern MagickPrivate
void
311 SyncAuthenticOpenCLBuffer(
const Image *);
314#if defined(__cplusplus) || defined(c_plusplus)