Powered by Pair ImageMagick logo
Image Magick
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

ImageMagick-6.1.1/magick/cache_private.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  _CacheMethods
struct  _CacheInfo

Typedefs

typedef void * Cache
typedef IndexPacket *(* GetIndexesFromHandler )(const Image *)
typedef MagickBooleanType(* SyncPixelHandler )(Image *)
typedef const PixelPacket *(* AcquirePixelHandler )(const Image *, const long, const long, const unsigned long, const unsigned long, ExceptionInfo *)
typedef PixelPacket(* AcquireOnePixelFromHandler )(const Image *, const long, const long, ExceptionInfo *)
typedef PixelPacket(* GetOnePixelFromHandler )(Image *, const long, const long)
typedef PixelPacket *(* GetPixelHandler )(Image *, const long, const long, const unsigned long, const unsigned long)
typedef PixelPacket *(* GetPixelsFromHandler )(const Image *)
typedef PixelPacket *(* SetPixelHandler )(Image *, const long, const long, const unsigned long, const unsigned long)
typedef void(* DestroyPixelHandler )(Image *)
typedef _CacheMethods CacheMethods
typedef _NexusInfo NexusInfo
typedef _CacheInfo CacheInfo

Enumerations

enum  CacheType { UndefinedCache, MemoryCache, MapCache, DiskCache }

Functions

MagickExport Cache DestroyCacheInfo (Cache)
MagickExport Cache ReferenceCache (Cache)
MagickExport ClassType GetCacheClass (const Cache)
MagickExport ColorspaceType GetCacheColorspace (const Cache)
MagickExport IndexPacketGetNexusIndexes (const Cache, const unsigned long)
MagickExport PixelPacketGetNexusPixels (const Cache, const unsigned long)
MagickExport unsigned long GetNexus (Cache)
MagickExport void ClonePixelCacheMethods (Cache, const Cache)
MagickExport void DestroyCacheNexus (Cache, const unsigned long)
MagickExport void GetCacheInfo (Cache *)
MagickExport void SetPixelCacheMethods (Cache, AcquirePixelHandler, GetPixelHandler, SetPixelHandler, SyncPixelHandler, GetPixelsFromHandler, GetIndexesFromHandler, AcquireOnePixelFromHandler, GetOnePixelFromHandler, DestroyPixelHandler)


Typedef Documentation

typedef PixelPacket(* AcquireOnePixelFromHandler)(const Image *, const long, const long, ExceptionInfo *)
 

Definition at line 33 of file cache_private.h.

Referenced by AcquireOnePixel(), and SetPixelCacheMethods().

typedef const PixelPacket*(* AcquirePixelHandler)(const Image *, const long, const long, const unsigned long, const unsigned long, ExceptionInfo *)
 

Definition at line 29 of file cache_private.h.

Referenced by AcquireImagePixels(), and SetPixelCacheMethods().

typedef void* Cache
 

Definition at line 20 of file cache_private.h.

Referenced by AcquireCacheNexus(), AcquireImagePixels(), AcquireOnePixel(), ClonePixelCacheMethods(), DestroyCacheInfo(), DestroyCacheNexus(), DestroyImagePixels(), GetCacheClass(), GetCacheColorspace(), GetCacheInfo(), GetImagePixels(), GetImageVirtualPixelMethod(), GetIndexes(), GetIndexesFromCache(), GetNexus(), GetNexusIndexes(), GetNexusPixels(), GetOnePixel(), GetPixelCacheArea(), GetPixels(), GetPixelsFromCache(), ModifyCache(), ReadCacheIndexes(), ReadCachePixels(), ReferenceCache(), SetCacheNexus(), SetImagePixels(), SetImageVirtualPixelMethod(), SetPixelCacheMethods(), SyncCacheNexus(), SyncImagePixels(), WriteCacheIndexes(), and WriteCachePixels().

typedef struct _CacheInfo CacheInfo
 

Referenced by IsNexusInCore().

typedef struct _CacheMethods CacheMethods
 

typedef void(* DestroyPixelHandler)(Image *)
 

Definition at line 51 of file cache_private.h.

Referenced by DestroyImagePixels(), and SetPixelCacheMethods().

typedef IndexPacket*(* GetIndexesFromHandler)(const Image *)
 

Definition at line 23 of file cache_private.h.

Referenced by GetIndexes(), and SetPixelCacheMethods().

typedef PixelPacket(* GetOnePixelFromHandler)(Image *, const long, const long)
 

Definition at line 37 of file cache_private.h.

Referenced by GetOnePixel(), and SetPixelCacheMethods().

typedef PixelPacket*(* GetPixelHandler)(Image *, const long, const long, const unsigned long, const unsigned long)
 

Definition at line 40 of file cache_private.h.

Referenced by GetImagePixels(), and SetPixelCacheMethods().

typedef PixelPacket*(* GetPixelsFromHandler)(const Image *)
 

Definition at line 44 of file cache_private.h.

Referenced by GetPixels(), and SetPixelCacheMethods().

typedef struct _NexusInfo NexusInfo
 

Definition at line 83 of file cache_private.h.

Referenced by IsNexusInCore().

typedef PixelPacket*(* SetPixelHandler)(Image *, const long, const long, const unsigned long, const unsigned long)
 

Definition at line 47 of file cache_private.h.

Referenced by SetImagePixels(), and SetPixelCacheMethods().

typedef MagickBooleanType(* SyncPixelHandler)(Image *)
 

Definition at line 26 of file cache_private.h.

Referenced by SetPixelCacheMethods(), and SyncImagePixels().


Enumeration Type Documentation

enum CacheType
 

Enumeration values:
UndefinedCache 
MemoryCache 
MapCache 
DiskCache 

Definition at line 11 of file cache_private.h.

00012 { 00013 UndefinedCache, 00014 MemoryCache, 00015 MapCache, 00016 DiskCache 00017 } CacheType;


Function Documentation

MagickExport void ClonePixelCacheMethods Cache  ,
const  Cache
 

Referenced by AllocateImage().

MagickExport Cache DestroyCacheInfo Cache   ) 
 

Referenced by DestroyImageInfo(), DestroyPixelCache(), and PersistCache().

MagickExport void DestroyCacheNexus Cache  ,
const unsigned  long
 

Referenced by AcquireCacheNexus(), ClipCacheNexus(), CloneCacheNexus(), CloseCacheView(), and DestroyCacheInfo().

MagickExport ClassType GetCacheClass const  Cache  ) 
 

Definition at line 1363 of file cache.c.

References assert, Cache, ClassType, _CacheInfo::debug, _CacheInfo::filename, GetMagickModule, LogMagickEvent(), MagickExport, MagickFalse, MagickSignature, _CacheInfo::signature, _CacheInfo::storage_class, and TraceEvent.

Referenced by SetPixelStream().

01364 { 01365 CacheInfo 01366 *cache_info; 01367 01368 assert(cache != (Cache) NULL); 01369 cache_info=(CacheInfo *) cache; 01370 assert(cache_info->signature == MagickSignature); 01371 if (cache_info->debug != MagickFalse) 01372 (void) LogMagickEvent(TraceEvent,GetMagickModule(),cache_info->filename); 01373 return(cache_info->storage_class); 01374 }

Here is the call graph for this function:

MagickExport ColorspaceType GetCacheColorspace const  Cache  ) 
 

Definition at line 1401 of file cache.c.

References assert, Cache, _CacheInfo::colorspace, ColorspaceType, _CacheInfo::debug, _CacheInfo::filename, GetMagickModule, LogMagickEvent(), MagickExport, MagickFalse, MagickSignature, _CacheInfo::signature, and TraceEvent.

Referenced by SetPixelStream().

01402 { 01403 CacheInfo 01404 *cache_info; 01405 01406 assert(cache != (Cache) NULL); 01407 cache_info=(CacheInfo *) cache; 01408 assert(cache_info->signature == MagickSignature); 01409 if (cache_info->debug != MagickFalse) 01410 (void) LogMagickEvent(TraceEvent,GetMagickModule(),cache_info->filename); 01411 return(cache_info->colorspace); 01412 }

Here is the call graph for this function:

MagickExport void GetCacheInfo Cache  ) 
 

Referenced by AllocateImage(), CloneImage(), ModifyCache(), PersistCache(), and ReadStream().

MagickExport unsigned long GetNexus Cache   ) 
 

Definition at line 1726 of file cache.c.

References assert, _NexusInfo::available, Cache, _CacheInfo::debug, _CacheInfo::filename, GetMagickModule, LogMagickEvent(), MagickExport, MagickFalse, MagickSignature, _CacheInfo::nexus_info, _CacheInfo::number_views, ResetMagickMemory(), ResizeMagickMemory(), ResourceLimitFatalError, _CacheInfo::signature, ThrowMagickFatalException, and TraceEvent.

Referenced by AcquireCacheNexus(), ClipCacheNexus(), and OpenCacheView().

01727 { 01728 CacheInfo 01729 *cache_info; 01730 01731 register long 01732 id; 01733 01734 assert(cache != (Cache) NULL); 01735 cache_info=(CacheInfo *) cache; 01736 assert(cache_info->signature == MagickSignature); 01737 if (cache_info->debug != MagickFalse) 01738 (void) LogMagickEvent(TraceEvent,GetMagickModule(),cache_info->filename); 01739 for (id=1; id < (long) cache_info->number_views; id++) 01740 if (cache_info->nexus_info[id].available != MagickFalse) 01741 { 01742 cache_info->nexus_info[id].available=MagickFalse; 01743 return((unsigned long) id); 01744 } 01745 cache_info->number_views++; 01746 cache_info->nexus_info=(NexusInfo *) ResizeMagickMemory( 01747 cache_info->nexus_info,(size_t) cache_info->number_views* 01748 sizeof(*cache_info->nexus_info)); 01749 if (cache_info->nexus_info == (NexusInfo *) NULL) 01750 ThrowMagickFatalException(ResourceLimitFatalError, 01751 "MemoryAllocationFailed",strerror(errno)); 01752 (void) ResetMagickMemory(&cache_info->nexus_info[id],0, 01753 sizeof(*cache_info->nexus_info)); 01754 return((unsigned long) id); 01755 }

Here is the call graph for this function:

MagickExport IndexPacket* GetNexusIndexes const  Cache,
const unsigned  long
 

Definition at line 1786 of file cache.c.

References assert, Cache, _NexusInfo::indexes, IndexPacket, MagickExport, MagickSignature, _CacheInfo::nexus_info, _CacheInfo::signature, _CacheInfo::storage_class, and UndefinedClass.

Referenced by AcquireCacheNexus(), ClipCacheNexus(), GetCacheViewIndexes(), and GetIndexesFromCache().

01788 { 01789 CacheInfo 01790 *cache_info; 01791 01792 register NexusInfo 01793 *nexus_info; 01794 01795 if (cache == (Cache) NULL) 01796 return((IndexPacket *) NULL); 01797 cache_info=(CacheInfo *) cache; 01798 assert(cache_info->signature == MagickSignature); 01799 if (cache_info->storage_class == UndefinedClass) 01800 return((IndexPacket *) NULL); 01801 nexus_info=cache_info->nexus_info+nexus; 01802 return(nexus_info->indexes); 01803 }

MagickExport PixelPacket* GetNexusPixels const  Cache,
const unsigned  long
 

Definition at line 1832 of file cache.c.

References assert, Cache, _CacheInfo::debug, _CacheInfo::filename, GetMagickModule, LogMagickEvent(), MagickExport, MagickFalse, MagickSignature, _CacheInfo::nexus_info, _NexusInfo::pixels, _CacheInfo::signature, _CacheInfo::storage_class, TraceEvent, and UndefinedClass.

Referenced by GetCacheViewPixels(), and GetPixelsFromCache().

01834 { 01835 CacheInfo 01836 *cache_info; 01837 01838 register NexusInfo 01839 *nexus_info; 01840 01841 if (cache == (Cache) NULL) 01842 return((PixelPacket *) NULL); 01843 cache_info=(CacheInfo *) cache; 01844 assert(cache_info->signature == MagickSignature); 01845 if (cache_info->debug != MagickFalse) 01846 (void) LogMagickEvent(TraceEvent,GetMagickModule(),cache_info->filename); 01847 if (cache_info->storage_class == UndefinedClass) 01848 return((PixelPacket *) NULL); 01849 nexus_info=cache_info->nexus_info+nexus; 01850 return(nexus_info->pixels); 01851 }

Here is the call graph for this function:

MagickExport Cache ReferenceCache Cache   ) 
 

Definition at line 2920 of file cache.c.

References AcquireSemaphoreInfo(), assert, Cache, _CacheInfo::debug, _CacheInfo::filename, GetMagickModule, LogMagickEvent(), MagickExport, MagickFalse, MagickSignature, _CacheInfo::reference_count, RelinquishSemaphoreInfo(), _CacheInfo::semaphore, _CacheInfo::signature, and TraceEvent.

Referenced by CloneImage(), CloneImageInfo(), and PersistCache().

02921 { 02922 CacheInfo 02923 *cache_info; 02924 02925 assert(cache != (Cache *) NULL); 02926 cache_info=(CacheInfo *) cache; 02927 assert(cache_info->signature == MagickSignature); 02928 if (cache_info->debug != MagickFalse) 02929 (void) LogMagickEvent(TraceEvent,GetMagickModule(),cache_info->filename); 02930 cache_info->semaphore=AcquireSemaphoreInfo(cache_info->semaphore); 02931 cache_info->reference_count++; 02932 RelinquishSemaphoreInfo(cache_info->semaphore); 02933 return(cache_info); 02934 }

Here is the call graph for this function:

MagickExport void SetPixelCacheMethods Cache  ,
AcquirePixelHandler  ,
GetPixelHandler  ,
SetPixelHandler  ,
SyncPixelHandler  ,
GetPixelsFromHandler  ,
GetIndexesFromHandler  ,
AcquireOnePixelFromHandler  ,
GetOnePixelFromHandler  ,
DestroyPixelHandler 
 

Definition at line 3312 of file cache.c.

References _CacheMethods::acquire_one_pixel_from_handler, _CacheMethods::acquire_pixel_handler, AcquireOnePixelFromHandler, AcquirePixelHandler, assert, Cache, _CacheInfo::debug, _CacheMethods::destroy_pixel_handler, DestroyPixelHandler, _CacheInfo::filename, _CacheMethods::get_indexes_from_handler, _CacheMethods::get_one_pixel_from_handler, _CacheMethods::get_pixel_handler, _CacheMethods::get_pixels_from_handler, GetIndexesFromHandler, GetMagickModule, GetOnePixelFromHandler, GetPixelHandler, GetPixelsFromHandler, LogMagickEvent(), MagickExport, MagickFalse, MagickSignature, _CacheInfo::methods, _CacheMethods::set_pixel_handler, SetPixelHandler, _CacheInfo::signature, _CacheMethods::sync_pixel_handler, SyncPixelHandler, and TraceEvent.

Referenced by GetCacheInfo(), and ReadStream().

03318 { 03319 CacheInfo 03320 *cache_info; 03321 03322 /* 03323 Set image pixel methods. 03324 */ 03325 assert(cache != (Cache) NULL); 03326 cache_info=(CacheInfo *) cache; 03327 assert(cache_info->signature == MagickSignature); 03328 if (cache_info->debug != MagickFalse) 03329 (void) LogMagickEvent(TraceEvent,GetMagickModule(),cache_info->filename); 03330 assert(acquire_pixel != (AcquirePixelHandler) NULL); 03331 assert(get_pixel != (GetPixelHandler) NULL); 03332 assert(set_pixel != (SetPixelHandler) NULL); 03333 assert(sync_pixel != (SyncPixelHandler) NULL); 03334 assert(get_pixels_from != (GetPixelsFromHandler) NULL); 03335 assert(get_indexes_from != (GetIndexesFromHandler) NULL); 03336 assert(acquire_one_pixel_from != (AcquireOnePixelFromHandler) NULL); 03337 assert(get_one_pixel_from != (GetOnePixelFromHandler) NULL); 03338 assert(destroy_pixel != (DestroyPixelHandler) NULL); 03339 cache_info->methods.acquire_pixel_handler=acquire_pixel; 03340 cache_info->methods.get_pixel_handler=get_pixel; 03341 cache_info->methods.set_pixel_handler=set_pixel; 03342 cache_info->methods.sync_pixel_handler=sync_pixel; 03343 cache_info->methods.get_pixels_from_handler=get_pixels_from; 03344 cache_info->methods.get_indexes_from_handler=get_indexes_from; 03345 cache_info->methods.acquire_one_pixel_from_handler=acquire_one_pixel_from; 03346 cache_info->methods.get_one_pixel_from_handler=get_one_pixel_from; 03347 cache_info->methods.destroy_pixel_handler=destroy_pixel; 03348 }

Here is the call graph for this function:


Generated on Mon Oct 25 13:43:30 2004 for ImageMagick by doxygen 1.3.7
ImageMagick Copyright © 2004, ImageMagick Studio LLC