MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
cache.c File Reference
Include dependency graph for cache.c:

Go to the source code of this file.

Data Structures

struct  _MagickModulo
 

Macros

#define CacheTick(offset, extent)   QuantumTick((MagickOffsetType) offset,extent)
 
#define IsFileDescriptorLimitExceeded()
 
#define MaxCacheThreads   ((size_t) GetMagickResourceLimit(ThreadResource))
 
#define cache_number_threads(source, destination, chunk, multithreaded)
 

Typedefs

typedef struct _MagickModulo MagickModulo
 

Functions

static Cache GetImagePixelCache (Image *, const MagickBooleanType, ExceptionInfo *) magick_hot_spot
 
static const QuantumGetVirtualPixelCache (const Image *, const VirtualPixelMethod, const ssize_t, const ssize_t, const size_t, const size_t, ExceptionInfo *)
 
static const QuantumGetVirtualPixelsCache (const Image *)
 
static const void * GetVirtualMetacontentFromCache (const Image *)
 
static MagickBooleanType GetOneAuthenticPixelFromCache (Image *, const ssize_t, const ssize_t, Quantum *, ExceptionInfo *)
 
static MagickBooleanType GetOneVirtualPixelFromCache (const Image *, const VirtualPixelMethod, const ssize_t, const ssize_t, Quantum *, ExceptionInfo *)
 
static MagickBooleanType OpenPixelCache (Image *, const MapMode, ExceptionInfo *)
 
static MagickBooleanType OpenPixelCacheOnDisk (CacheInfo *, const MapMode)
 
static MagickBooleanType ReadPixelCachePixels (CacheInfo *magick_restrict, NexusInfo *magick_restrict, ExceptionInfo *)
 
static MagickBooleanType ReadPixelCacheMetacontent (CacheInfo *magick_restrict, NexusInfo *magick_restrict, ExceptionInfo *)
 
static MagickBooleanType SyncAuthenticPixelsCache (Image *, ExceptionInfo *)
 
static MagickBooleanType WritePixelCachePixels (CacheInfo *magick_restrict, NexusInfo *magick_restrict, ExceptionInfo *)
 
static MagickBooleanType WritePixelCacheMetacontent (CacheInfo *, NexusInfo *magick_restrict, ExceptionInfo *)
 
static QuantumGetAuthenticPixelsCache (Image *, const ssize_t, const ssize_t, const size_t, const size_t, ExceptionInfo *)
 
static QuantumQueueAuthenticPixelsCache (Image *, const ssize_t, const ssize_t, const size_t, const size_t, ExceptionInfo *)
 
static QuantumSetPixelCacheNexusPixels (const CacheInfo *magick_restrict, const MapMode, const ssize_t, const ssize_t, const size_t, const size_t, const MagickBooleanType, NexusInfo *magick_restrict, ExceptionInfo *) magick_hot_spot
 
MagickPrivate Cache AcquirePixelCache (const size_t number_threads)
 
MagickPrivate NexusInfo ** AcquirePixelCacheNexus (const size_t number_threads)
 
MagickExport void * AcquirePixelCachePixels (const Image *image, size_t *length, ExceptionInfo *exception)
 
MagickPrivate MagickBooleanType CacheComponentGenesis (void)
 
MagickPrivate void CacheComponentTerminus (void)
 
static MagickBooleanType ClipPixelCacheNexus (Image *image, NexusInfo *nexus_info, ExceptionInfo *exception)
 
MagickPrivate Cache ClonePixelCache (const Cache cache)
 
MagickPrivate void ClonePixelCacheMethods (Cache clone, const Cache cache)
 
static MagickBooleanType ClonePixelCacheOnDisk (CacheInfo *magick_restrict cache_info, CacheInfo *magick_restrict clone_info)
 
static MagickBooleanType ClonePixelCacheRepository (CacheInfo *magick_restrict clone_info, CacheInfo *magick_restrict cache_info, ExceptionInfo *exception)
 
static void DestroyImagePixelCache (Image *image)
 
MagickExport void DestroyImagePixels (Image *image)
 
static MagickBooleanType ClosePixelCacheOnDisk (CacheInfo *cache_info)
 
static void RelinquishPixelCachePixels (CacheInfo *cache_info)
 
MagickPrivate Cache DestroyPixelCache (Cache cache)
 
static void RelinquishCacheNexusPixels (NexusInfo *nexus_info)
 
MagickPrivate NexusInfo ** DestroyPixelCacheNexus (NexusInfo **nexus_info, const size_t number_threads)
 
MagickExport void * GetAuthenticMetacontent (const Image *image)
 
static void * GetAuthenticMetacontentFromCache (const Image *image)
 
MagickPrivate QuantumGetAuthenticPixelCacheNexus (Image *image, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, NexusInfo *nexus_info, ExceptionInfo *exception)
 
static QuantumGetAuthenticPixelsFromCache (const Image *image)
 
MagickExport QuantumGetAuthenticPixelQueue (const Image *image)
 
MagickExport QuantumGetAuthenticPixels (Image *image, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
 
MagickExport MagickSizeType GetImageExtent (const Image *image)
 
static MagickBooleanType ValidatePixelCacheMorphology (const Image *magick_restrict image)
 
MagickExport CacheType GetImagePixelCacheType (const Image *image)
 
static MagickBooleanType CopyPixel (const Image *image, const Quantum *source, Quantum *destination)
 
MagickExport MagickBooleanType GetOneAuthenticPixel (Image *image, const ssize_t x, const ssize_t y, Quantum *pixel, ExceptionInfo *exception)
 
MagickExport MagickBooleanType GetOneVirtualPixel (const Image *image, const ssize_t x, const ssize_t y, Quantum *pixel, ExceptionInfo *exception)
 
MagickExport MagickBooleanType GetOneVirtualPixelInfo (const Image *image, const VirtualPixelMethod virtual_pixel_method, const ssize_t x, const ssize_t y, PixelInfo *pixel, ExceptionInfo *exception)
 
MagickPrivate ColorspaceType GetPixelCacheColorspace (const Cache cache)
 
MagickExport const char * GetPixelCacheFilename (const Image *image)
 
MagickPrivate void GetPixelCacheMethods (CacheMethods *cache_methods)
 
MagickPrivate MagickSizeType GetPixelCacheNexusExtent (const Cache cache, NexusInfo *magick_restrict nexus_info)
 
MagickExport void * GetPixelCachePixels (Image *image, MagickSizeType *length, ExceptionInfo *magick_unused(exception))
 
MagickPrivate ClassType GetPixelCacheStorageClass (const Cache cache)
 
MagickPrivate void GetPixelCacheTileSize (const Image *image, size_t *width, size_t *height)
 
MagickPrivate VirtualPixelMethod GetPixelCacheVirtualMethod (const Image *image)
 
MagickPrivate const void * GetVirtualMetacontentFromNexus (const Cache cache, NexusInfo *magick_restrict nexus_info)
 
MagickExport const void * GetVirtualMetacontent (const Image *image)
 
static ssize_t DitherX (const ssize_t x, const size_t columns)
 
static ssize_t DitherY (const ssize_t y, const size_t rows)
 
static ssize_t EdgeX (const ssize_t x, const size_t columns)
 
static ssize_t EdgeY (const ssize_t y, const size_t rows)
 
static ssize_t RandomX (RandomInfo *random_info, const size_t columns)
 
static ssize_t RandomY (RandomInfo *random_info, const size_t rows)
 
static MagickModulo VirtualPixelModulo (const ssize_t offset, const size_t extent)
 
MagickPrivate const QuantumGetVirtualPixelCacheNexus (const Image *image, const VirtualPixelMethod virtual_pixel_method, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, NexusInfo *nexus_info, ExceptionInfo *exception)
 
MagickExport const QuantumGetVirtualPixelQueue (const Image *image)
 
MagickExport const QuantumGetVirtualPixels (const Image *image, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
 
MagickPrivate const QuantumGetVirtualPixelsNexus (const Cache cache, NexusInfo *magick_restrict nexus_info)
 
static Quantum ApplyPixelCompositeMask (const Quantum p, const MagickRealType alpha, const Quantum q, const MagickRealType beta)
 
static MagickBooleanType MaskPixelCacheNexus (Image *image, NexusInfo *nexus_info, ExceptionInfo *exception)
 
static MagickOffsetType WritePixelCacheRegion (const CacheInfo *magick_restrict cache_info, const MagickOffsetType offset, const MagickSizeType length, const unsigned char *magick_restrict buffer)
 
static MagickBooleanType SetPixelCacheExtent (Image *image, MagickSizeType length)
 
MagickExport MagickBooleanType PersistPixelCache (Image *image, const char *filename, const MagickBooleanType attach, MagickOffsetType *offset, ExceptionInfo *exception)
 
MagickPrivate QuantumQueueAuthenticPixelCacheNexus (Image *image, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, const MagickBooleanType clone, NexusInfo *nexus_info, ExceptionInfo *exception)
 
MagickExport QuantumQueueAuthenticPixels (Image *image, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
 
static MagickOffsetType ReadPixelCacheRegion (const CacheInfo *magick_restrict cache_info, const MagickOffsetType offset, const MagickSizeType length, unsigned char *magick_restrict buffer)
 
static MagickBooleanType ReadPixelCacheMetacontent (CacheInfo *magick_restrict cache_info, NexusInfo *magick_restrict nexus_info, ExceptionInfo *exception)
 
static MagickBooleanType ReadPixelCachePixels (CacheInfo *magick_restrict cache_info, NexusInfo *magick_restrict nexus_info, ExceptionInfo *exception)
 
MagickPrivate Cache ReferencePixelCache (Cache cache)
 
MagickPrivate void ResetPixelCacheChannels (Image *image)
 
MagickPrivate void ResetCacheAnonymousMemory (void)
 
MagickPrivate void ResetPixelCacheEpoch (void)
 
MagickPrivate void SetPixelCacheMethods (Cache cache, CacheMethods *cache_methods)
 
static MagickBooleanType AcquireCacheNexusPixels (const CacheInfo *magick_restrict cache_info, const MagickSizeType length, NexusInfo *magick_restrict nexus_info, ExceptionInfo *exception)
 
static void PrefetchPixelCacheNexusPixels (const NexusInfo *nexus_info, const MapMode mode)
 
static MagickBooleanType ValidatePixelOffset (const ssize_t x, const size_t a)
 
static QuantumSetPixelCacheNexusPixels (const CacheInfo *magick_restrict cache_info, const MapMode mode, const ssize_t x, const ssize_t y, const size_t width, const size_t height, const MagickBooleanType buffered, NexusInfo *magick_restrict nexus_info, ExceptionInfo *exception)
 
static MagickBooleanType SetCacheAlphaChannel (Image *image, const Quantum alpha, ExceptionInfo *exception)
 
MagickPrivate VirtualPixelMethod SetPixelCacheVirtualMethod (Image *image, const VirtualPixelMethod virtual_pixel_method, ExceptionInfo *exception)
 
MagickPrivate MagickBooleanType SyncAuthenticPixelCacheNexus (Image *image, NexusInfo *magick_restrict nexus_info, ExceptionInfo *exception)
 
MagickExport MagickBooleanType SyncAuthenticPixels (Image *image, ExceptionInfo *exception)
 
MagickPrivate MagickBooleanType SyncImagePixelCache (Image *image, ExceptionInfo *exception)
 
static MagickBooleanType WritePixelCacheMetacontent (CacheInfo *cache_info, NexusInfo *magick_restrict nexus_info, ExceptionInfo *exception)
 
static MagickBooleanType WritePixelCachePixels (CacheInfo *magick_restrict cache_info, NexusInfo *magick_restrict nexus_info, ExceptionInfo *exception)
 

Variables

static SemaphoreInfocache_semaphore = (SemaphoreInfo *) NULL
 
static ssize_t cache_anonymous_memory = (-1)
 
static time_t cache_epoch = 0
 
static ssize_t DitherMatrix [64]
 

Macro Definition Documentation

◆ cache_number_threads

#define cache_number_threads (   source,
  destination,
  chunk,
  multithreaded 
)
Value:
num_threads((multithreaded) == 0 ? 1 : \
(((source)->type != MemoryCache) && ((source)->type != MapCache)) || \
(((destination)->type != MemoryCache) && ((destination)->type != MapCache)) ? \
MagickMax(MagickMin((ssize_t) GetMagickResourceLimit(ThreadResource),(ssize_t) (chunk)/256),1))
@ MemoryCache
Definition: cache.h:33
@ MapCache
Definition: cache.h:32
#define MagickMin(x, y)
Definition: image-private.h:39
#define MagickMax(x, y)
Definition: image-private.h:38
MagickExport MagickSizeType GetMagickResourceLimit(const ResourceType type)
Definition: resource.c:795
@ ThreadResource
Definition: resource_.h:34

◆ CacheTick

#define CacheTick (   offset,
  extent 
)    QuantumTick((MagickOffsetType) offset,extent)

Definition at line 84 of file cache.c.

◆ IsFileDescriptorLimitExceeded

#define IsFileDescriptorLimitExceeded ( )
Value:
GetMagickResourceLimit(FileResource) ? MagickTrue : MagickFalse)
@ MagickFalse
Definition: magick-type.h:163
@ MagickTrue
Definition: magick-type.h:164
MagickExport MagickSizeType GetMagickResource(const ResourceType type)
Definition: resource.c:676
@ FileResource
Definition: resource_.h:30

Definition at line 85 of file cache.c.

◆ MaxCacheThreads

#define MaxCacheThreads   ((size_t) GetMagickResourceLimit(ThreadResource))

Typedef Documentation

◆ MagickModulo

typedef struct _MagickModulo MagickModulo

Function Documentation

◆ AcquireCacheNexusPixels()

static MagickBooleanType AcquireCacheNexusPixels ( const CacheInfo *magick_restrict  cache_info,
const MagickSizeType  length,
NexusInfo *magick_restrict  nexus_info,
ExceptionInfo exception 
)
inlinestatic

◆ AcquirePixelCache()

◆ AcquirePixelCacheNexus()

◆ AcquirePixelCachePixels()

MagickExport void * AcquirePixelCachePixels ( const Image image,
size_t *  length,
ExceptionInfo exception 
)

◆ ApplyPixelCompositeMask()

static Quantum ApplyPixelCompositeMask ( const Quantum  p,
const MagickRealType  alpha,
const Quantum  q,
const MagickRealType  beta 
)
inlinestatic

◆ CacheComponentGenesis()

MagickPrivate MagickBooleanType CacheComponentGenesis ( void  )

Definition at line 356 of file cache.c.

References AcquireSemaphoreInfo(), cache_semaphore, and MagickTrue.

◆ CacheComponentTerminus()

MagickPrivate void CacheComponentTerminus ( void  )

Definition at line 381 of file cache.c.

References ActivateSemaphoreInfo(), cache_semaphore, and RelinquishSemaphoreInfo().

◆ ClipPixelCacheNexus()

◆ ClonePixelCache()

◆ ClonePixelCacheMethods()

MagickPrivate void ClonePixelCacheMethods ( Cache  clone,
const Cache  cache 
)

◆ ClonePixelCacheOnDisk()

◆ ClonePixelCacheRepository()

◆ ClosePixelCacheOnDisk()

◆ CopyPixel()

◆ DestroyImagePixelCache()

static void DestroyImagePixelCache ( Image image)
static

◆ DestroyImagePixels()

◆ DestroyPixelCache()

◆ DestroyPixelCacheNexus()

MagickPrivate NexusInfo ** DestroyPixelCacheNexus ( NexusInfo **  nexus_info,
const size_t  number_threads 
)

◆ DitherX()

static ssize_t DitherX ( const ssize_t  x,
const size_t  columns 
)
inlinestatic

Definition at line 2646 of file cache.c.

References DitherMatrix.

Referenced by GetVirtualPixelCacheNexus().

◆ DitherY()

static ssize_t DitherY ( const ssize_t  y,
const size_t  rows 
)
inlinestatic

Definition at line 2659 of file cache.c.

References DitherMatrix.

Referenced by GetVirtualPixelCacheNexus().

◆ EdgeX()

static ssize_t EdgeX ( const ssize_t  x,
const size_t  columns 
)
inlinestatic

Definition at line 2672 of file cache.c.

Referenced by GetVirtualPixelCacheNexus().

◆ EdgeY()

static ssize_t EdgeY ( const ssize_t  y,
const size_t  rows 
)
inlinestatic

Definition at line 2681 of file cache.c.

Referenced by GetVirtualPixelCacheNexus().

◆ GetAuthenticMetacontent()

MagickExport void * GetAuthenticMetacontent ( const Image image)

◆ GetAuthenticMetacontentFromCache()

static void * GetAuthenticMetacontentFromCache ( const Image image)
static

◆ GetAuthenticPixelCacheNexus()

MagickPrivate Quantum * GetAuthenticPixelCacheNexus ( Image image,
const ssize_t  x,
const ssize_t  y,
const size_t  columns,
const size_t  rows,
NexusInfo nexus_info,
ExceptionInfo exception 
)

◆ GetAuthenticPixelQueue()

MagickExport Quantum * GetAuthenticPixelQueue ( const Image image)

◆ GetAuthenticPixels()

MagickExport Quantum * GetAuthenticPixels ( Image image,
const ssize_t  x,
const ssize_t  y,
const size_t  columns,
const size_t  rows,
ExceptionInfo exception 
)

◆ GetAuthenticPixelsCache()

static Quantum * GetAuthenticPixelsCache ( Image image,
const ssize_t  x,
const ssize_t  y,
const size_t  columns,
const size_t  rows,
ExceptionInfo exception 
)
static

◆ GetAuthenticPixelsFromCache()

static Quantum * GetAuthenticPixelsFromCache ( const Image image)
static

◆ GetImageExtent()

◆ GetImagePixelCache()

◆ GetImagePixelCacheType()

MagickExport CacheType GetImagePixelCacheType ( const Image image)

◆ GetOneAuthenticPixel()

MagickExport MagickBooleanType GetOneAuthenticPixel ( Image image,
const ssize_t  x,
const ssize_t  y,
Quantum pixel,
ExceptionInfo exception 
)

◆ GetOneAuthenticPixelFromCache()

static MagickBooleanType GetOneAuthenticPixelFromCache ( Image image,
const ssize_t  x,
const ssize_t  y,
Quantum pixel,
ExceptionInfo exception 
)
static

◆ GetOneVirtualPixel()

MagickExport MagickBooleanType GetOneVirtualPixel ( const Image image,
const ssize_t  x,
const ssize_t  y,
Quantum pixel,
ExceptionInfo exception 
)

◆ GetOneVirtualPixelFromCache()

static MagickBooleanType GetOneVirtualPixelFromCache ( const Image image,
const VirtualPixelMethod  virtual_pixel_method,
const ssize_t  x,
const ssize_t  y,
Quantum pixel,
ExceptionInfo exception 
)

◆ GetOneVirtualPixelInfo()

MagickExport MagickBooleanType GetOneVirtualPixelInfo ( const Image image,
const VirtualPixelMethod  virtual_pixel_method,
const ssize_t  x,
const ssize_t  y,
PixelInfo pixel,
ExceptionInfo exception 
)

◆ GetPixelCacheColorspace()

MagickPrivate ColorspaceType GetPixelCacheColorspace ( const Cache  cache)

◆ GetPixelCacheFilename()

MagickExport const char * GetPixelCacheFilename ( const Image image)

Definition at line 2198 of file cache.c.

References _Image::cache, magick_restrict, MagickCoreSignature, and _Image::signature.

◆ GetPixelCacheMethods()

◆ GetPixelCacheNexusExtent()

MagickPrivate MagickSizeType GetPixelCacheNexusExtent ( const Cache  cache,
NexusInfo *magick_restrict  nexus_info 
)

Definition at line 2278 of file cache.c.

References magick_restrict, and MagickCoreSignature.

Referenced by GetImageExtent().

◆ GetPixelCachePixels()

MagickExport void * GetPixelCachePixels ( Image image,
MagickSizeType length,
ExceptionInfo magick_unusedexception 
)

◆ GetPixelCacheStorageClass()

MagickPrivate ClassType GetPixelCacheStorageClass ( const Cache  cache)

◆ GetPixelCacheTileSize()

MagickPrivate void GetPixelCacheTileSize ( const Image image,
size_t *  width,
size_t *  height 
)

◆ GetPixelCacheVirtualMethod()

MagickPrivate VirtualPixelMethod GetPixelCacheVirtualMethod ( const Image image)

Definition at line 2449 of file cache.c.

References _Image::cache, magick_restrict, MagickCoreSignature, and _Image::signature.

Referenced by GetOneVirtualPixel(), and GetVirtualPixels().

◆ GetVirtualMetacontent()

MagickExport const void * GetVirtualMetacontent ( const Image image)

◆ GetVirtualMetacontentFromCache()

static const void * GetVirtualMetacontentFromCache ( const Image image)
static

◆ GetVirtualMetacontentFromNexus()

MagickPrivate const void * GetVirtualMetacontentFromNexus ( const Cache  cache,
NexusInfo *magick_restrict  nexus_info 
)

◆ GetVirtualPixelCache()

static const Quantum * GetVirtualPixelCache ( const Image image,
const VirtualPixelMethod  virtual_pixel_method,
const ssize_t  x,
const ssize_t  y,
const size_t  columns,
const size_t  rows,
ExceptionInfo exception 
)
static

◆ GetVirtualPixelCacheNexus()

MagickPrivate const Quantum * GetVirtualPixelCacheNexus ( const Image image,
const VirtualPixelMethod  virtual_pixel_method,
const ssize_t  x,
const ssize_t  y,
const size_t  columns,
const size_t  rows,
NexusInfo nexus_info,
ExceptionInfo exception 
)

Definition at line 2721 of file cache.c.

References AcquireQuantumMemory(), AcquireRandomInfo(), _PixelInfo::alpha, _NexusInfo::authentic_pixel_cache, _Image::background_color, BackgroundVirtualPixelMethod, _PixelInfo::black, BlackVirtualPixelMethod, _PixelInfo::blue, _Image::cache, CacheError, _Image::channels, CheckerTileVirtualPixelMethod, ClampToQuantum(), CompositeMaskChannel, DitherVirtualPixelMethod, DitherX(), DitherY(), EdgeVirtualPixelMethod, EdgeX(), EdgeY(), _Image::filename, GetMagickModule, GetVirtualMetacontentFromNexus(), GetVirtualPixelCacheNexus(), GrayVirtualPixelMethod, _PixelInfo::green, _RectangleInfo::height, HorizontalTileEdgeVirtualPixelMethod, HorizontalTileVirtualPixelMethod, magick_restrict, MagickCoreSignature, MagickFalse, MagickMin, MagickTrue, MaskVirtualPixelMethod, MaxPixelChannels, _NexusInfo::metacontent, MirrorVirtualPixelMethod, OpaqueAlpha, QuantumRange, _MagickModulo::quotient, RandomVirtualPixelMethod, RandomX(), RandomY(), ReadMode, ReadPixelCacheMetacontent(), ReadPixelCachePixels(), _PixelInfo::red, _NexusInfo::region, RelinquishMagickMemory(), _MagickModulo::remainder, SetPixelAlpha(), SetPixelBlack(), SetPixelBlue(), SetPixelCacheNexusPixels(), SetPixelChannel(), SetPixelGreen(), SetPixelRed(), _Image::signature, ThrowMagickException(), TileVirtualPixelMethod, TransparentAlpha, TransparentVirtualPixelMethod, UndefinedCache, UndefinedVirtualPixelMethod, VerticalTileEdgeVirtualPixelMethod, VerticalTileVirtualPixelMethod, _NexusInfo::virtual_nexus, VirtualPixelModulo(), WhiteVirtualPixelMethod, _RectangleInfo::width, WriteMaskChannel, _RectangleInfo::x, and _RectangleInfo::y.

Referenced by GetOneVirtualPixel(), GetOneVirtualPixelFromCache(), GetOneVirtualPixelInfo(), GetVirtualPixelCache(), GetVirtualPixelCacheNexus(), and GetVirtualPixels().

◆ GetVirtualPixelQueue()

MagickExport const Quantum * GetVirtualPixelQueue ( const Image image)

◆ GetVirtualPixels()

◆ GetVirtualPixelsCache()

static const Quantum * GetVirtualPixelsCache ( const Image image)

◆ GetVirtualPixelsNexus()

MagickPrivate const Quantum * GetVirtualPixelsNexus ( const Cache  cache,
NexusInfo *magick_restrict  nexus_info 
)

Definition at line 3350 of file cache.c.

References magick_restrict, MagickCoreSignature, and UndefinedClass.

Referenced by GetVirtualPixelQueue(), and GetVirtualPixelsCache().

◆ MaskPixelCacheNexus()

◆ OpenPixelCache()

static MagickBooleanType OpenPixelCache ( Image image,
const MapMode  mode,
ExceptionInfo exception 
)

Definition at line 3630 of file cache.c.

References AcquireAlignedMemory(), AcquireDistributeCacheInfo(), AcquireMagickResource(), _Image::alpha_trait, AreaResource, _Image::cache, cache_anonymous_memory, CacheError, CacheEvent, _Image::channel_map, _Image::channels, ClonePixelCacheRepository(), ClosePixelCacheOnDisk(), _Image::colorspace, _Image::columns, CommandOptionToMnemonic(), DestroyDistributeCacheInfo(), DestroyString(), DiskCache, DiskResource, DistributedCache, _Image::filename, FormatLocaleString(), FormatMagickSize(), GetDistributeCacheFile(), GetDistributeCacheHostname(), GetDistributeCachePort(), GetImageListLength(), GetImageRegistry(), GetMagickModule, GetMagickResourceLimit(), GetPixelChannels(), GetPolicyValue(), ImageError, InitializePixelChannelMap(), IOMode, IsEventLogging(), ListLengthResource, LocaleCompare(), LogMagickEvent(), magick_restrict, MagickAssumeAligned, MagickCacheOptions, MagickCoreSignature, MagickFalse, MagickMax, MagickPathExtent, MagickResourceInfinity, MagickTrue, MapBlob(), MapCache, MapResource, MaxPixelChannels, MemoryCache, MemoryResource, _Image::metacontent_extent, MissingDelegateError, _Image::offset, OpenDistributePixelCache(), OpenPixelCacheOnDisk(), PersistMode, _Image::ping, PingCache, ReadMode, RelinquishMagickResource(), RelinquishPixelCachePixels(), ResourceLimitError, _Image::rows, _Image::scene, SetPixelCacheExtent(), _Image::signature, _Image::storage_class, StringRegistryType, ThrowBinaryException, ThrowFileException, ThrowMagickException(), TraceEvent, UndefinedCache, and UndefinedClass.

Referenced by GetImagePixelCache(), and PersistPixelCache().

◆ OpenPixelCacheOnDisk()

◆ PersistPixelCache()

◆ PrefetchPixelCacheNexusPixels()

static void PrefetchPixelCacheNexusPixels ( const NexusInfo nexus_info,
const MapMode  mode 
)
inlinestatic

◆ QueueAuthenticPixelCacheNexus()

◆ QueueAuthenticPixels()

MagickExport Quantum * QueueAuthenticPixels ( Image image,
const ssize_t  x,
const ssize_t  y,
const size_t  columns,
const size_t  rows,
ExceptionInfo exception 
)

◆ QueueAuthenticPixelsCache()

static Quantum * QueueAuthenticPixelsCache ( Image image,
const ssize_t  x,
const ssize_t  y,
const size_t  columns,
const size_t  rows,
ExceptionInfo exception 
)

◆ RandomX()

static ssize_t RandomX ( RandomInfo random_info,
const size_t  columns 
)
inlinestatic

Definition at line 2690 of file cache.c.

References GetPseudoRandomValue(), and random_info.

Referenced by GetVirtualPixelCacheNexus().

◆ RandomY()

static ssize_t RandomY ( RandomInfo random_info,
const size_t  rows 
)
inlinestatic

Definition at line 2695 of file cache.c.

References GetPseudoRandomValue(), and random_info.

Referenced by GetVirtualPixelCacheNexus().

◆ ReadPixelCacheMetacontent() [1/2]

◆ ReadPixelCacheMetacontent() [2/2]

static MagickBooleanType ReadPixelCacheMetacontent ( CacheInfo magick_restrict,
NexusInfo magick_restrict,
ExceptionInfo  
)

◆ ReadPixelCachePixels() [1/2]

◆ ReadPixelCachePixels() [2/2]

static MagickBooleanType ReadPixelCachePixels ( CacheInfo magick_restrict,
NexusInfo magick_restrict,
ExceptionInfo  
)

◆ ReadPixelCacheRegion()

static MagickOffsetType ReadPixelCacheRegion ( const CacheInfo *magick_restrict  cache_info,
const MagickOffsetType  offset,
const MagickSizeType  length,
unsigned char *magick_restrict  buffer 
)
inlinestatic

Definition at line 4372 of file cache.c.

References MAGICK_SSIZE_MAX, and MagickMin.

Referenced by ReadPixelCacheMetacontent(), and ReadPixelCachePixels().

◆ ReferencePixelCache()

MagickPrivate Cache ReferencePixelCache ( Cache  cache)

Definition at line 4746 of file cache.c.

References LockSemaphoreInfo(), magick_restrict, MagickCoreSignature, and UnlockSemaphoreInfo().

Referenced by CloneImage(), and CloneImageInfo().

◆ RelinquishCacheNexusPixels()

static void RelinquishCacheNexusPixels ( NexusInfo nexus_info)
inlinestatic

◆ RelinquishPixelCachePixels()

◆ ResetCacheAnonymousMemory()

MagickPrivate void ResetCacheAnonymousMemory ( void  )

Definition at line 4813 of file cache.c.

References cache_anonymous_memory.

◆ ResetPixelCacheChannels()

MagickPrivate void ResetPixelCacheChannels ( Image image)

◆ ResetPixelCacheEpoch()

MagickPrivate void ResetPixelCacheEpoch ( void  )

Definition at line 4836 of file cache.c.

References cache_epoch.

◆ SetCacheAlphaChannel()

◆ SetPixelCacheExtent()

◆ SetPixelCacheMethods()

◆ SetPixelCacheNexusPixels() [1/2]

static Quantum * SetPixelCacheNexusPixels ( const CacheInfo *magick_restrict  cache_info,
const MapMode  mode,
const ssize_t  x,
const ssize_t  y,
const size_t  width,
const size_t  height,
const MagickBooleanType  buffered,
NexusInfo *magick_restrict  nexus_info,
ExceptionInfo exception 
)
static

◆ SetPixelCacheNexusPixels() [2/2]

static Quantum * SetPixelCacheNexusPixels ( const CacheInfo magick_restrict,
const  MapMode,
const  ssize_t,
const  ssize_t,
const  size_t,
const  size_t,
const  MagickBooleanType,
NexusInfo magick_restrict,
ExceptionInfo  
)

◆ SetPixelCacheVirtualMethod()

◆ SyncAuthenticPixelCacheNexus()

◆ SyncAuthenticPixels()

◆ SyncAuthenticPixelsCache()

static MagickBooleanType SyncAuthenticPixelsCache ( Image image,
ExceptionInfo exception 
)

◆ SyncImagePixelCache()

◆ ValidatePixelCacheMorphology()

static MagickBooleanType ValidatePixelCacheMorphology ( const Image *magick_restrict  image)
inlinestatic

Definition at line 1651 of file cache.c.

References magick_restrict, MagickFalse, and MagickTrue.

Referenced by GetImagePixelCache().

◆ ValidatePixelOffset()

static MagickBooleanType ValidatePixelOffset ( const ssize_t  x,
const size_t  a 
)
inlinestatic

Definition at line 5019 of file cache.c.

References MAGICK_SSIZE_MAX, MAGICK_SSIZE_MIN, MagickFalse, and MagickTrue.

Referenced by SetPixelCacheNexusPixels().

◆ VirtualPixelModulo()

static MagickModulo VirtualPixelModulo ( const ssize_t  offset,
const size_t  extent 
)
inlinestatic

Definition at line 2700 of file cache.c.

References _MagickModulo::quotient, and _MagickModulo::remainder.

Referenced by GetVirtualPixelCacheNexus().

◆ WritePixelCacheMetacontent() [1/2]

static MagickBooleanType WritePixelCacheMetacontent ( CacheInfo ,
NexusInfo magick_restrict,
ExceptionInfo  
)

◆ WritePixelCacheMetacontent() [2/2]

◆ WritePixelCachePixels() [1/2]

◆ WritePixelCachePixels() [2/2]

static MagickBooleanType WritePixelCachePixels ( CacheInfo magick_restrict,
NexusInfo magick_restrict,
ExceptionInfo  
)

◆ WritePixelCacheRegion()

static MagickOffsetType WritePixelCacheRegion ( const CacheInfo *magick_restrict  cache_info,
const MagickOffsetType  offset,
const MagickSizeType  length,
const unsigned char *magick_restrict  buffer 
)
inlinestatic

Definition at line 3547 of file cache.c.

References MAGICK_SSIZE_MAX, and MagickMin.

Referenced by SetPixelCacheExtent(), WritePixelCacheMetacontent(), and WritePixelCachePixels().

Variable Documentation

◆ cache_anonymous_memory

ssize_t cache_anonymous_memory = (-1)
static

Definition at line 160 of file cache.c.

Referenced by AcquireCacheNexusPixels(), OpenPixelCache(), and ResetCacheAnonymousMemory().

◆ cache_epoch

time_t cache_epoch = 0
static

Definition at line 163 of file cache.c.

Referenced by GetImagePixelCache(), and ResetPixelCacheEpoch().

◆ cache_semaphore

SemaphoreInfo* cache_semaphore = (SemaphoreInfo *) NULL
static

Definition at line 157 of file cache.c.

Referenced by CacheComponentGenesis(), and CacheComponentTerminus().

◆ DitherMatrix

ssize_t DitherMatrix[64]
static
Initial value:
=
{
0, 48, 12, 60, 3, 51, 15, 63,
32, 16, 44, 28, 35, 19, 47, 31,
8, 56, 4, 52, 11, 59, 7, 55,
40, 24, 36, 20, 43, 27, 39, 23,
2, 50, 14, 62, 1, 49, 13, 61,
34, 18, 46, 30, 33, 17, 45, 29,
10, 58, 6, 54, 9, 57, 5, 53,
42, 26, 38, 22, 41, 25, 37, 21
}

Definition at line 2634 of file cache.c.

Referenced by DitherX(), and DitherY().