Lines Matching refs:cache_info
201 static inline void RelinquishStreamPixels(CacheInfo *cache_info) in RelinquishStreamPixels() argument
203 assert(cache_info != (CacheInfo *) NULL); in RelinquishStreamPixels()
204 if (cache_info->mapped == MagickFalse) in RelinquishStreamPixels()
205 (void) RelinquishAlignedMemory(cache_info->pixels); in RelinquishStreamPixels()
207 (void) UnmapBlob(cache_info->pixels,(size_t) cache_info->length); in RelinquishStreamPixels()
208 cache_info->pixels=(Quantum *) NULL; in RelinquishStreamPixels()
209 cache_info->metacontent=(void *) NULL; in RelinquishStreamPixels()
210 cache_info->length=0; in RelinquishStreamPixels()
211 cache_info->mapped=MagickFalse; in RelinquishStreamPixels()
217 *cache_info; in DestroyPixelStream() local
226 cache_info=(CacheInfo *) image->cache; in DestroyPixelStream()
227 assert(cache_info->signature == MagickCoreSignature); in DestroyPixelStream()
229 LockSemaphoreInfo(cache_info->semaphore); in DestroyPixelStream()
230 cache_info->reference_count--; in DestroyPixelStream()
231 if (cache_info->reference_count == 0) in DestroyPixelStream()
233 UnlockSemaphoreInfo(cache_info->semaphore); in DestroyPixelStream()
236 RelinquishStreamPixels(cache_info); in DestroyPixelStream()
237 if (cache_info->nexus_info != (NexusInfo **) NULL) in DestroyPixelStream()
238 cache_info->nexus_info=DestroyPixelCacheNexus(cache_info->nexus_info, in DestroyPixelStream()
239 cache_info->number_threads); in DestroyPixelStream()
240 if (cache_info->file_semaphore != (SemaphoreInfo *) NULL) in DestroyPixelStream()
241 RelinquishSemaphoreInfo(&cache_info->file_semaphore); in DestroyPixelStream()
242 if (cache_info->semaphore != (SemaphoreInfo *) NULL) in DestroyPixelStream()
243 RelinquishSemaphoreInfo(&cache_info->semaphore); in DestroyPixelStream()
244 cache_info=(CacheInfo *) RelinquishAlignedMemory(cache_info); in DestroyPixelStream()
319 *cache_info; in GetAuthenticMetacontentFromStream() local
325 cache_info=(CacheInfo *) image->cache; in GetAuthenticMetacontentFromStream()
326 assert(cache_info->signature == MagickCoreSignature); in GetAuthenticMetacontentFromStream()
327 return(cache_info->metacontent); in GetAuthenticMetacontentFromStream()
403 *cache_info; in GetAuthenticPixelsFromStream() local
409 cache_info=(CacheInfo *) image->cache; in GetAuthenticPixelsFromStream()
410 assert(cache_info->signature == MagickCoreSignature); in GetAuthenticPixelsFromStream()
411 return(cache_info->pixels); in GetAuthenticPixelsFromStream()
597 *cache_info; in GetVirtualPixelsStream() local
603 cache_info=(CacheInfo *) image->cache; in GetVirtualPixelsStream()
604 assert(cache_info->signature == MagickCoreSignature); in GetVirtualPixelsStream()
605 return(cache_info->pixels); in GetVirtualPixelsStream()
635 *cache_info; in GetVirtualMetacontentFromStream() local
641 cache_info=(CacheInfo *) image->cache; in GetVirtualMetacontentFromStream()
642 assert(cache_info->signature == MagickCoreSignature); in GetVirtualMetacontentFromStream()
643 return(cache_info->metacontent); in GetVirtualMetacontentFromStream()
682 static inline MagickBooleanType AcquireStreamPixels(CacheInfo *cache_info, in AcquireStreamPixels() argument
685 if (cache_info->length != (MagickSizeType) ((size_t) cache_info->length)) in AcquireStreamPixels()
707 cache_info->filename); in AcquireStreamPixels()
714 cache_info->mapped=MagickFalse; in AcquireStreamPixels()
715 cache_info->pixels=(Quantum *) MagickAssumeAligned( in AcquireStreamPixels()
716 AcquireAlignedMemory(1,(size_t) cache_info->length)); in AcquireStreamPixels()
720 cache_info->mapped=MagickTrue; in AcquireStreamPixels()
721 cache_info->pixels=(Quantum *) MapBlob(-1,IOMode,0,(size_t) in AcquireStreamPixels()
722 cache_info->length); in AcquireStreamPixels()
724 if (cache_info->pixels == (Quantum *) NULL) in AcquireStreamPixels()
728 cache_info->filename); in AcquireStreamPixels()
740 *cache_info; in GetVirtualPixelStream() local
769 cache_info=(CacheInfo *) image->cache; in GetVirtualPixelStream()
770 assert(cache_info->signature == MagickCoreSignature); in GetVirtualPixelStream()
775 length=(size_t) number_pixels*cache_info->number_channels*sizeof(Quantum); in GetVirtualPixelStream()
776 if (cache_info->number_channels == 0) in GetVirtualPixelStream()
778 if (cache_info->metacontent_extent != 0) in GetVirtualPixelStream()
779 length+=number_pixels*cache_info->metacontent_extent; in GetVirtualPixelStream()
780 if (cache_info->pixels == (Quantum *) NULL) in GetVirtualPixelStream()
782 cache_info->length=length; in GetVirtualPixelStream()
783 status=AcquireStreamPixels(cache_info,exception); in GetVirtualPixelStream()
786 cache_info->length=0; in GetVirtualPixelStream()
791 if (cache_info->length < length) in GetVirtualPixelStream()
793 RelinquishStreamPixels(cache_info); in GetVirtualPixelStream()
794 cache_info->length=length; in GetVirtualPixelStream()
795 status=AcquireStreamPixels(cache_info,exception); in GetVirtualPixelStream()
798 cache_info->length=0; in GetVirtualPixelStream()
802 cache_info->metacontent=(void *) NULL; in GetVirtualPixelStream()
803 if (cache_info->metacontent_extent != 0) in GetVirtualPixelStream()
804 cache_info->metacontent=(void *) (cache_info->pixels+number_pixels* in GetVirtualPixelStream()
805 cache_info->number_channels); in GetVirtualPixelStream()
806 return(cache_info->pixels); in GetVirtualPixelStream()
886 *cache_info; in QueueAuthenticPixelsStream() local
920 cache_info=(CacheInfo *) image->cache; in QueueAuthenticPixelsStream()
921 assert(cache_info->signature == MagickCoreSignature); in QueueAuthenticPixelsStream()
927 cache_info->columns); in QueueAuthenticPixelsStream()
928 cache_info->storage_class=image->storage_class; in QueueAuthenticPixelsStream()
929 cache_info->colorspace=image->colorspace; in QueueAuthenticPixelsStream()
930 cache_info->columns=image->columns; in QueueAuthenticPixelsStream()
931 cache_info->rows=image->rows; in QueueAuthenticPixelsStream()
932 image->cache=cache_info; in QueueAuthenticPixelsStream()
937 cache_info->columns=columns; in QueueAuthenticPixelsStream()
938 cache_info->rows=rows; in QueueAuthenticPixelsStream()
940 length=(size_t) number_pixels*cache_info->number_channels*sizeof(Quantum); in QueueAuthenticPixelsStream()
941 if (cache_info->number_channels == 0) in QueueAuthenticPixelsStream()
943 if (cache_info->metacontent_extent != 0) in QueueAuthenticPixelsStream()
944 length+=number_pixels*cache_info->metacontent_extent; in QueueAuthenticPixelsStream()
945 if (cache_info->pixels == (Quantum *) NULL) in QueueAuthenticPixelsStream()
947 cache_info->length=length; in QueueAuthenticPixelsStream()
948 status=AcquireStreamPixels(cache_info,exception); in QueueAuthenticPixelsStream()
951 cache_info->length=0; in QueueAuthenticPixelsStream()
956 if (cache_info->length < length) in QueueAuthenticPixelsStream()
958 RelinquishStreamPixels(cache_info); in QueueAuthenticPixelsStream()
959 cache_info->length=length; in QueueAuthenticPixelsStream()
960 status=AcquireStreamPixels(cache_info,exception); in QueueAuthenticPixelsStream()
963 cache_info->length=0; in QueueAuthenticPixelsStream()
967 cache_info->metacontent=(void *) NULL; in QueueAuthenticPixelsStream()
968 if (cache_info->metacontent_extent != 0) in QueueAuthenticPixelsStream()
969 cache_info->metacontent=(void *) (cache_info->pixels+number_pixels* in QueueAuthenticPixelsStream()
970 cache_info->number_channels); in QueueAuthenticPixelsStream()
971 return(cache_info->pixels); in QueueAuthenticPixelsStream()
1210 *cache_info; in WriteStreamImage() local
1238 cache_info=(CacheInfo *) image->cache; in WriteStreamImage()
1239 assert(cache_info->signature == MagickCoreSignature); in WriteStreamImage()
1241 length=packet_size*cache_info->columns*cache_info->rows; in WriteStreamImage()
2747 *cache_info; in SyncAuthenticPixelsStream() local
2759 cache_info=(CacheInfo *) image->cache; in SyncAuthenticPixelsStream()
2760 assert(cache_info->signature == MagickCoreSignature); in SyncAuthenticPixelsStream()
2768 length=stream_handler(image,cache_info->pixels,(size_t) cache_info->columns); in SyncAuthenticPixelsStream()
2769 return(length == cache_info->columns ? MagickTrue : MagickFalse); in SyncAuthenticPixelsStream()