% MagickCore Pixel Cache Methods %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% July 1999 %
% %
% %
-% Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
MagickPrivate Cache AcquirePixelCache(const size_t number_threads)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
char
*synchronize;
cache_info->synchronize=IsStringTrue(synchronize);
synchronize=DestroyString(synchronize);
}
- cache_info->semaphore=AllocateSemaphoreInfo();
+ cache_info->semaphore=AcquireSemaphoreInfo();
cache_info->reference_count=1;
- cache_info->file_semaphore=AllocateSemaphoreInfo();
+ cache_info->file_semaphore=AcquireSemaphoreInfo();
cache_info->debug=IsEventLogging();
cache_info->signature=MagickSignature;
return((Cache ) cache_info);
MagickPrivate NexusInfo **AcquirePixelCacheNexus(const size_t number_threads)
{
NexusInfo
- **nexus_info;
+ **restrict nexus_info;
register ssize_t
i;
MagickSizeType *length,ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
*/
MagickPrivate MagickBooleanType CacheComponentGenesis(void)
{
- AcquireSemaphoreInfo(&cache_semaphore);
+ if (cache_semaphore == (SemaphoreInfo *) NULL)
+ cache_semaphore=AcquireSemaphoreInfo();
return(MagickTrue);
}
\f
MagickPrivate void CacheComponentTerminus(void)
{
if (cache_semaphore == (SemaphoreInfo *) NULL)
- AcquireSemaphoreInfo(&cache_semaphore);
+ ActivateSemaphoreInfo(&cache_semaphore);
LockSemaphoreInfo(cache_semaphore);
instantiate_cache=MagickFalse;
UnlockSemaphoreInfo(cache_semaphore);
- DestroySemaphoreInfo(&cache_semaphore);
+ RelinquishSemaphoreInfo(&cache_semaphore);
}
\f
/*
MagickPrivate Cache ClonePixelCache(const Cache cache)
{
CacheInfo
- *clone_info;
+ *restrict clone_info;
const CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(cache != NULL);
cache_info=(const CacheInfo *) cache;
MagickPrivate void ClonePixelCacheMethods(Cache clone,const Cache cache)
{
CacheInfo
- *cache_info,
- *source_info;
+ *restrict cache_info,
+ *restrict source_info;
assert(clone != (Cache) NULL);
source_info=(CacheInfo *) clone;
%
*/
+static inline void CopyPixels(Quantum *destination,const Quantum *source,
+ const MagickSizeType number_pixels)
+{
+#if !defined(MAGICKCORE_OPENMP_SUPPORT) || (MAGICKCORE_QUANTUM_DEPTH <= 8)
+ (void) memcpy(destination,source,(size_t) number_pixels*sizeof(*source));
+#else
+ {
+ register MagickOffsetType
+ i;
+
+ if ((number_pixels*sizeof(*source)) < MagickMaxBufferExtent)
+ {
+ (void) memcpy(destination,source,(size_t) number_pixels*
+ sizeof(*source));
+ return;
+ }
+ #pragma omp parallel for
+ for (i=0; i < (MagickOffsetType) number_pixels; i++)
+ destination[i]=source[i];
+ }
+#endif
+}
+
static inline MagickSizeType MagickMin(const MagickSizeType x,
const MagickSizeType y)
{
return(y);
}
-static MagickBooleanType ClonePixelCacheRepository(CacheInfo *clone_info,
- CacheInfo *cache_info,ExceptionInfo *exception)
+static MagickBooleanType ClonePixelCacheRepository(
+ CacheInfo *restrict clone_info,CacheInfo *restrict cache_info,
+ ExceptionInfo *exception)
{
#define MaxCacheThreads 2
#define cache_threads(source,destination,chunk) \
status;
NexusInfo
- **cache_nexus,
- **clone_nexus;
+ **restrict cache_nexus,
+ **restrict clone_nexus;
size_t
length;
(memcmp(cache_info->channel_map,clone_info->channel_map,length) == 0) &&
(cache_info->metacontent_extent == clone_info->metacontent_extent))
{
- /*
- Identical pixel cache morphology.
- */
- (void) memcpy(clone_info->pixels,cache_info->pixels,cache_info->columns*
- cache_info->number_channels*cache_info->rows*
- sizeof(*cache_info->pixels));
+ CopyPixels(clone_info->pixels,cache_info->pixels,cache_info->columns*
+ cache_info->number_channels*cache_info->rows);
if (cache_info->metacontent_extent != 0)
(void) memcpy(clone_info->metacontent,cache_info->metacontent,
cache_info->columns*cache_info->rows*clone_info->metacontent_extent*
clone_nexus[id],exception);
if (pixels == (Quantum *) NULL)
continue;
+ (void) ResetMagickMemory(clone_nexus[id]->pixels,0,clone_nexus[id]->length);
if (optimize != MagickFalse)
(void) memcpy(clone_nexus[id]->pixels,cache_nexus[id]->pixels,length*
sizeof(Quantum));
clone_nexus[id],exception);
if (pixels == (Quantum *) NULL)
continue;
- (void) memcpy(clone_nexus[id]->metacontent,cache_nexus[id]->metacontent,
- length*sizeof(cache_nexus[id]->metacontent));
+ if (clone_nexus[id]->metacontent != (void *) NULL)
+ (void) memcpy(clone_nexus[id]->metacontent,
+ cache_nexus[id]->metacontent,length*
+ sizeof(cache_nexus[id]->metacontent));
status=WritePixelCacheMetacontent(clone_info,clone_nexus[id],exception);
}
}
MagickExport void DestroyImagePixels(Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
cache_info->pixels=(Quantum *) RelinquishAlignedMemory(
cache_info->pixels);
else
- cache_info->pixels=(Quantum *) UnmapBlob(cache_info->pixels,
- (size_t) cache_info->length);
+ {
+ (void) UnmapBlob(cache_info->pixels,(size_t) cache_info->length);
+ cache_info->pixels=(Quantum *) NULL;
+ }
RelinquishMagickResource(MemoryResource,cache_info->length);
break;
}
case MapCache:
{
- cache_info->pixels=(Quantum *) UnmapBlob(cache_info->pixels,(size_t)
- cache_info->length);
+ (void) UnmapBlob(cache_info->pixels,(size_t) cache_info->length);
+ cache_info->pixels=(Quantum *) NULL;
if (cache_info->mode != ReadMode)
(void) RelinquishUniqueFileResource(cache_info->cache_filename);
*cache_info->cache_filename='\0';
MagickPrivate Cache DestroyPixelCache(Cache cache)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(cache != (Cache) NULL);
cache_info=(CacheInfo *) cache;
if (cache_info->random_info != (RandomInfo *) NULL)
cache_info->random_info=DestroyRandomInfo(cache_info->random_info);
if (cache_info->file_semaphore != (SemaphoreInfo *) NULL)
- DestroySemaphoreInfo(&cache_info->file_semaphore);
+ RelinquishSemaphoreInfo(&cache_info->file_semaphore);
if (cache_info->semaphore != (SemaphoreInfo *) NULL)
- DestroySemaphoreInfo(&cache_info->semaphore);
+ RelinquishSemaphoreInfo(&cache_info->semaphore);
cache_info->signature=(~MagickSignature);
cache_info=(CacheInfo *) RelinquishMagickMemory(cache_info);
cache=(Cache) NULL;
MagickExport void *GetAuthenticMetacontent(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
static void *GetAuthenticMetacontentFromCache(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
Quantum
- *pixels;
+ *restrict pixels;
/*
Transfer pixels from the cache.
return((Quantum *) NULL);
cache_info=(CacheInfo *) image->cache;
assert(cache_info->signature == MagickSignature);
- if (nexus_info->authentic_cache != MagickFalse)
+ if (nexus_info->authentic_pixel_cache != MagickFalse)
return(pixels);
if (ReadPixelCachePixels(cache_info,nexus_info,exception) == MagickFalse)
return((Quantum *) NULL);
static Quantum *GetAuthenticPixelsFromCache(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
MagickExport Quantum *GetAuthenticPixelQueue(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
Quantum
- *pixels;
+ *restrict pixels;
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
MagickExport MagickSizeType GetImageExtent(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
MagickBooleanType
destroy,
}
if ((time_limit != MagickResourceInfinity) &&
((MagickSizeType) (time((time_t *) NULL)-cache_timestamp) >= time_limit))
- ThrowFatalException(ResourceLimitFatalError,"TimeLimitExceeded");
+ {
+#if defined(ECANCELED)
+ errno=ECANCELED;
+#endif
+ ThrowFatalException(ResourceLimitFatalError,"TimeLimitExceeded");
+ }
assert(image->cache != (Cache) NULL);
cache_info=(CacheInfo *) image->cache;
destroy=MagickFalse;
Clone pixel cache.
*/
clone_image=(*image);
- clone_image.semaphore=AllocateSemaphoreInfo();
+ clone_image.semaphore=AcquireSemaphoreInfo();
clone_image.reference_count=1;
clone_image.cache=ClonePixelCache(cache_info);
clone_info=(CacheInfo *) clone_image.cache;
image->cache=clone_image.cache;
}
}
- DestroySemaphoreInfo(&clone_image.semaphore);
+ RelinquishSemaphoreInfo(&clone_image.semaphore);
}
UnlockSemaphoreInfo(cache_info->semaphore);
}
MagickExport CacheType GetImagePixelCacheType(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
const ssize_t x,const ssize_t y,Quantum *pixel,ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
register Quantum
*restrict q;
const ssize_t x,const ssize_t y,Quantum *pixel,ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
const ssize_t x,const ssize_t y,Quantum *pixel,ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
Quantum *pixel,ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
PixelInfo *pixel,ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
register const Quantum
- *p;
+ *restrict p;
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
MagickPrivate ColorspaceType GetPixelCacheColorspace(const Cache cache)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(cache != (Cache) NULL);
cache_info=(CacheInfo *) cache;
%
*/
MagickPrivate MagickSizeType GetPixelCacheNexusExtent(const Cache cache,
- NexusInfo *nexus_info)
+ NexusInfo *restrict nexus_info)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
MagickSizeType
extent;
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
MagickPrivate ClassType GetPixelCacheStorageClass(const Cache cache)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(cache != (Cache) NULL);
cache_info=(CacheInfo *) cache;
size_t *height)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
MagickPrivate VirtualPixelMethod GetPixelCacheVirtualMethod(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
static const void *GetVirtualMetacontentFromCache(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
const void
- *metacontent;
+ *restrict metacontent;
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
%
*/
MagickPrivate const void *GetVirtualMetacontentFromNexus(const Cache cache,
- NexusInfo *nexus_info)
+ NexusInfo *restrict nexus_info)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(cache != (Cache) NULL);
cache_info=(CacheInfo *) cache;
MagickExport const void *GetVirtualMetacontent(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
const void
- *metacontent;
+ *restrict metacontent;
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
MagickOffsetType
offset;
number_pixels;
NexusInfo
- **virtual_nexus;
+ **restrict virtual_nexus;
Quantum
- *pixels,
+ *restrict pixels,
virtual_pixel[MaxPixelChannels];
RectangleInfo
v;
void
- *virtual_metacontent;
+ *restrict virtual_metacontent;
/*
Acquire pixels.
/*
Pixel request is inside cache extents.
*/
- if (nexus_info->authentic_cache != MagickFalse)
+ if (nexus_info->authentic_pixel_cache != MagickFalse)
return(q);
status=ReadPixelCachePixels(cache_info,nexus_info,exception);
if (status == MagickFalse)
const size_t columns,const size_t rows,ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
const Quantum
- *p;
+ *restrict p;
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
MagickExport const Quantum *GetVirtualPixelQueue(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
const Quantum
- *p;
+ *restrict p;
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
static const Quantum *GetVirtualPixelsCache(const Image *image)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
%
*/
MagickPrivate const Quantum *GetVirtualPixelsNexus(const Cache cache,
- NexusInfo *nexus_info)
+ NexusInfo *restrict nexus_info)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(cache != (Cache) NULL);
cache_info=(CacheInfo *) cache;
}
}
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+#if defined(SIGBUS)
+static void CacheSignalHandler(int status)
+{
+ ThrowFatalException(CacheFatalError,"UnableToExtendPixelCache");
+}
+#endif
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
static MagickBooleanType OpenPixelCacheOnDisk(CacheInfo *cache_info,
const MapMode mode)
{
static MagickBooleanType SetPixelCacheExtent(Image *image,MagickSizeType length)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
MagickOffsetType
count,
if (status != 0)
return(MagickFalse);
}
+#endif
+#if defined(SIGBUS)
+ (void) signal(SIGBUS,CacheSignalHandler);
#endif
return(count != (MagickOffsetType) 1 ? MagickFalse : MagickTrue);
}
ExceptionInfo *exception)
{
CacheInfo
- *cache_info,
+ *restrict cache_info,
source_info;
char
return(MagickTrue);
}
}
+ RelinquishMagickResource(DiskResource,cache_info->length);
(void) ThrowMagickException(exception,GetMagickModule(),CacheError,
"CacheResourcesExhausted","`%s'",image->filename);
return(MagickFalse);
ExceptionInfo *exception)
{
CacheInfo
- *cache_info,
- *clone_info;
+ *restrict cache_info,
+ *restrict clone_info;
Image
clone_image;
const MagickBooleanType clone,NexusInfo *nexus_info,ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
MagickOffsetType
offset;
number_pixels;
Quantum
- *pixels;
+ *restrict pixels;
RectangleInfo
region;
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
Quantum
- *pixels;
+ *restrict pixels;
assert(image != (const Image *) NULL);
assert(image->signature == MagickSignature);
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
Quantum
- *pixels;
+ *restrict pixels;
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
return(i);
}
-static MagickBooleanType ReadPixelCacheMetacontent(CacheInfo *cache_info,
- NexusInfo *nexus_info,ExceptionInfo *exception)
+static MagickBooleanType ReadPixelCacheMetacontent(
+ CacheInfo *restrict cache_info,NexusInfo *restrict nexus_info,
+ ExceptionInfo *exception)
{
MagickOffsetType
count,
if (cache_info->metacontent_extent == 0)
return(MagickFalse);
- if (nexus_info->authentic_cache != MagickFalse)
+ if (nexus_info->authentic_pixel_cache != MagickFalse)
return(MagickTrue);
offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns+
nexus_info->region.x;
% o exception: return any errors or warnings in this structure.
%
*/
-static MagickBooleanType ReadPixelCachePixels(CacheInfo *cache_info,
- NexusInfo *nexus_info,ExceptionInfo *exception)
+static MagickBooleanType ReadPixelCachePixels(CacheInfo *restrict cache_info,
+ NexusInfo *restrict nexus_info,ExceptionInfo *exception)
{
MagickOffsetType
count,
size_t
rows;
- if (nexus_info->authentic_cache != MagickFalse)
+ if (nexus_info->authentic_pixel_cache != MagickFalse)
return(MagickTrue);
offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns+
nexus_info->region.x;
MagickPrivate Cache ReferencePixelCache(Cache cache)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(cache != (Cache *) NULL);
cache_info=(CacheInfo *) cache;
MagickPrivate void SetPixelCacheMethods(Cache cache,CacheMethods *cache_methods)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
GetOneAuthenticPixelFromHandler
get_one_authentic_pixel_from_handler;
return(MagickTrue);
}
+static inline MagickBooleanType IsPixelCacheAuthentic(
+ const CacheInfo *restrict cache_info,const NexusInfo *restrict nexus_info)
+{
+ MagickBooleanType
+ status;
+
+ MagickOffsetType
+ offset;
+
+ /*
+ Does nexus pixels point directly to in-core cache pixels or is it buffered?
+ */
+ if (cache_info->type == PingCache)
+ return(MagickTrue);
+ offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns+
+ nexus_info->region.x;
+ status=nexus_info->pixels == (cache_info->pixels+offset*
+ cache_info->number_channels) ? MagickTrue : MagickFalse;
+ return(status);
+}
+
static inline void PrefetchPixelCacheNexusPixels(const NexusInfo *nexus_info,
const MapMode mode)
{
/*
Pixels are accessed directly from memory.
*/
- nexus_info->authentic_cache=MagickTrue;
offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns+
nexus_info->region.x;
nexus_info->pixels=cache_info->pixels+cache_info->number_channels*
nexus_info->metacontent=(unsigned char *) cache_info->metacontent+
offset*cache_info->metacontent_extent;
PrefetchPixelCacheNexusPixels(nexus_info,mode);
+ nexus_info->authentic_pixel_cache=IsPixelCacheAuthentic(cache_info,
+ nexus_info);
return(nexus_info->pixels);
}
}
/*
Pixels are stored in a staging region until they are synced to the cache.
*/
- nexus_info->authentic_cache=MagickFalse;
number_pixels=(MagickSizeType) nexus_info->region.width*
nexus_info->region.height;
length=number_pixels*cache_info->number_channels*sizeof(Quantum);
nexus_info->metacontent=(void *) (nexus_info->pixels+number_pixels*
cache_info->number_channels);
PrefetchPixelCacheNexusPixels(nexus_info,mode);
+ nexus_info->authentic_pixel_cache=IsPixelCacheAuthentic(cache_info,
+ nexus_info);
return(nexus_info->pixels);
}
\f
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
CacheView
- *image_view;
+ *restrict image_view;
MagickBooleanType
status;
const VirtualPixelMethod virtual_pixel_method,ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
VirtualPixelMethod
method;
%
*/
MagickPrivate MagickBooleanType SyncAuthenticPixelCacheNexus(Image *image,
- NexusInfo *nexus_info,ExceptionInfo *exception)
+ NexusInfo *restrict nexus_info,ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
MagickBooleanType
status;
assert(cache_info->signature == MagickSignature);
if (cache_info->type == UndefinedCache)
return(MagickFalse);
- if (nexus_info->authentic_cache != MagickFalse)
+ if (nexus_info->authentic_pixel_cache != MagickFalse)
return(MagickTrue);
assert(cache_info->signature == MagickSignature);
status=WritePixelCachePixels(cache_info,nexus_info,exception);
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
const int
id = GetOpenMPThreadId();
ExceptionInfo *exception)
{
CacheInfo
- *cache_info;
+ *restrict cache_info;
assert(image != (Image *) NULL);
assert(exception != (ExceptionInfo *) NULL);
%
*/
static MagickBooleanType WritePixelCacheMetacontent(CacheInfo *cache_info,
- NexusInfo *nexus_info,ExceptionInfo *exception)
+ NexusInfo *restrict nexus_info,ExceptionInfo *exception)
{
MagickOffsetType
count,
if (cache_info->metacontent_extent == 0)
return(MagickFalse);
- if (nexus_info->authentic_cache != MagickFalse)
+ if (nexus_info->authentic_pixel_cache != MagickFalse)
return(MagickTrue);
offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns+
nexus_info->region.x;
% o exception: return any errors or warnings in this structure.
%
*/
-static MagickBooleanType WritePixelCachePixels(CacheInfo *cache_info,
- NexusInfo *nexus_info,ExceptionInfo *exception)
+static MagickBooleanType WritePixelCachePixels(CacheInfo *restrict cache_info,
+ NexusInfo *restrict nexus_info,ExceptionInfo *exception)
{
MagickOffsetType
count,
size_t
rows;
- if (nexus_info->authentic_cache != MagickFalse)
+ if (nexus_info->authentic_pixel_cache != MagickFalse)
return(MagickTrue);
offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns+
nexus_info->region.x;