const size_t,ExceptionInfo *),
*QueueAuthenticPixelsCache(Image *,const ssize_t,const ssize_t,const size_t,
const size_t,ExceptionInfo *),
- *SetPixelCacheNexusPixels(const Image *,const RectangleInfo *,NexusInfo *,
- ExceptionInfo *) magick_hot_spot;
+ *SetPixelCacheNexusPixels(const Image *,const MapMode,const RectangleInfo *,
+ NexusInfo *,ExceptionInfo *) magick_hot_spot;
#if defined(__cplusplus) || defined(c_plusplus)
}
region.y=y;
region.width=columns;
region.height=rows;
- pixels=SetPixelCacheNexusPixels(image,®ion,nexus_info,exception);
+ pixels=SetPixelCacheNexusPixels(image,ReadMode,®ion,nexus_info,exception);
if (pixels == (Quantum *) NULL)
return((const Quantum *) NULL);
q=pixels;
region.y=y;
region.width=columns;
region.height=rows;
- return(SetPixelCacheNexusPixels(image,®ion,nexus_info,exception));
+ return(SetPixelCacheNexusPixels(image,WriteMode,®ion,nexus_info,exception));
}
\f
/*
%
% The format of the SetPixelCacheNexusPixels() method is:
%
-% Quantum SetPixelCacheNexusPixels(const Image *image,
+% Quantum SetPixelCacheNexusPixels(const Image *image,const MapMode mode,
% const RectangleInfo *region,NexusInfo *nexus_info,
% ExceptionInfo *exception)
%
%
% o image: the image.
%
+% o mode: ReadMode, WriteMode, or IOMode.
+%
% o region: A pointer to the RectangleInfo structure that defines the
% region of this particular cache nexus.
%
return(MagickTrue);
}
-static Quantum *SetPixelCacheNexusPixels(const Image *image,
+static Quantum *SetPixelCacheNexusPixels(const Image *image,const MapMode mode,
const RectangleInfo *region,NexusInfo *nexus_info,ExceptionInfo *exception)
{
CacheInfo
nexus_info->region.x;
nexus_info->pixels=cache_info->pixels+cache_info->number_channels*
offset;
+ if (mode == ReadMode)
+ MagickCachePrefetch(nexus_info->pixels,0,0);
+ else
+ MagickCachePrefetch(nexus_info->pixels,1,1);
nexus_info->metacontent=(void *) NULL;
if (cache_info->metacontent_extent != 0)
nexus_info->metacontent=(unsigned char *) cache_info->metacontent+
}
}
nexus_info->pixels=nexus_info->cache;
+ if (mode == ReadMode)
+ MagickCachePrefetch(nexus_info->pixels,0,0);
+ else
+ MagickCachePrefetch(nexus_info->pixels,1,1);
nexus_info->metacontent=(void *) NULL;
if (cache_info->metacontent_extent != 0)
nexus_info->metacontent=(void *) (nexus_info->pixels+number_pixels*