% %
% %
% %
-+ C l o n e P i x e l C a c h e P i x e l s %
++ C l o n e P i x e l C a c h e M e t h o d s %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% ClonePixelCacheMethods() clones the pixel cache methods from one cache to
+% another.
+%
+% The format of the ClonePixelCacheMethods() method is:
+%
+% void ClonePixelCacheMethods(Cache clone,const Cache cache)
+%
+% A description of each parameter follows:
+%
+% o clone: Specifies a pointer to a Cache structure.
+%
+% o cache: the pixel cache.
+%
+*/
+MagickPrivate void ClonePixelCacheMethods(Cache clone,const Cache cache)
+{
+ CacheInfo
+ *cache_info,
+ *source_info;
+
+ assert(clone != (Cache) NULL);
+ source_info=(CacheInfo *) clone;
+ assert(source_info->signature == MagickSignature);
+ if (source_info->debug != MagickFalse)
+ (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
+ source_info->filename);
+ assert(cache != (Cache) NULL);
+ cache_info=(CacheInfo *) cache;
+ assert(cache_info->signature == MagickSignature);
+ source_info->methods=cache_info->methods;
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
++ C l o n e P i x e l C a c h e R e p o s i t o r y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %
-% ClonePixelCachePixels() clones the source pixel cache to the destination
+% ClonePixelCacheRepository() clones the source pixel cache to the destination
% cache.
%
-% The format of the ClonePixelCachePixels() method is:
+% The format of the ClonePixelCacheRepository() method is:
%
-% MagickBooleanType ClonePixelCachePixels(CacheInfo *cache_info,
+% MagickBooleanType ClonePixelCacheRepository(CacheInfo *cache_info,
% CacheInfo *source_info,ExceptionInfo *exception)
%
% A description of each parameter follows:
return(y);
}
-static MagickBooleanType ClonePixelCachePixels(CacheInfo *clone_info,
+static MagickBooleanType ClonePixelCacheRepository(CacheInfo *clone_info,
CacheInfo *cache_info,ExceptionInfo *exception)
{
MagickBooleanType
% %
% %
% %
-+ C l o n e P i x e l C a c h e M e t h o d s %
-% %
-% %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% ClonePixelCacheMethods() clones the pixel cache methods from one cache to
-% another.
-%
-% The format of the ClonePixelCacheMethods() method is:
-%
-% void ClonePixelCacheMethods(Cache clone,const Cache cache)
-%
-% A description of each parameter follows:
-%
-% o clone: Specifies a pointer to a Cache structure.
-%
-% o cache: the pixel cache.
-%
-*/
-MagickPrivate void ClonePixelCacheMethods(Cache clone,const Cache cache)
-{
- CacheInfo
- *cache_info,
- *source_info;
-
- assert(clone != (Cache) NULL);
- source_info=(CacheInfo *) clone;
- assert(source_info->signature == MagickSignature);
- if (source_info->debug != MagickFalse)
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
- source_info->filename);
- assert(cache != (Cache) NULL);
- cache_info=(CacheInfo *) cache;
- assert(cache_info->signature == MagickSignature);
- source_info->methods=cache_info->methods;
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% %
-% %
+ D e s t r o y I m a g e P i x e l C a c h e %
% %
% %
if (status != MagickFalse)
{
if (clone != MagickFalse)
- status=ClonePixelCachePixels(clone_info,cache_info,exception);
+ status=ClonePixelCacheRepository(clone_info,cache_info,exception);
if (status != MagickFalse)
{
if (cache_info->reference_count == 1)
if ((source_info.storage_class != UndefinedClass) &&
(mode != ReadMode))
{
- status=ClonePixelCachePixels(cache_info,&source_info,
+ status=ClonePixelCacheRepository(cache_info,&source_info,
exception);
RelinquishPixelCachePixels(&source_info);
}
if ((source_info.storage_class != UndefinedClass) &&
(mode != ReadMode))
{
- status=ClonePixelCachePixels(cache_info,&source_info,
+ status=ClonePixelCacheRepository(cache_info,&source_info,
exception);
RelinquishPixelCachePixels(&source_info);
}
if ((source_info.storage_class != UndefinedClass) &&
(mode != ReadMode))
{
- status=ClonePixelCachePixels(cache_info,&source_info,
+ status=ClonePixelCacheRepository(cache_info,&source_info,
exception);
RelinquishPixelCachePixels(&source_info);
}
status=MagickTrue;
if ((source_info.storage_class != UndefinedClass) && (mode != ReadMode))
{
- status=ClonePixelCachePixels(cache_info,&source_info,exception);
+ status=ClonePixelCacheRepository(cache_info,&source_info,exception);
RelinquishPixelCachePixels(&source_info);
}
if (image->debug != MagickFalse)
cache_info=(CacheInfo *) image->cache;
status=OpenPixelCache(image,IOMode,exception);
if (status != MagickFalse)
- status=ClonePixelCachePixels(cache_info,clone_info,exception);
+ status=ClonePixelCacheRepository(cache_info,clone_info,exception);
*offset+=cache_info->length+page_size-(cache_info->length % page_size);
clone_info=(CacheInfo *) DestroyPixelCache(clone_info);
return(status);