Lines Matching refs:cache_info
204 static inline void RelinquishStreamPixels(CacheInfo *cache_info)
206 assert(cache_info != (CacheInfo *) NULL);
207 if (cache_info->mapped == MagickFalse)
208 (void) RelinquishAlignedMemory(cache_info->pixels);
210 (void) UnmapBlob(cache_info->pixels,(size_t) cache_info->length);
211 cache_info->pixels=(Quantum *) NULL;
212 cache_info->metacontent=(void *) NULL;
213 cache_info->length=0;
214 cache_info->mapped=MagickFalse;
220 *cache_info;
229 cache_info=(CacheInfo *) image->cache;
230 assert(cache_info->signature == MagickCoreSignature);
232 LockSemaphoreInfo(cache_info->semaphore);
233 cache_info->reference_count--;
234 if (cache_info->reference_count == 0)
236 UnlockSemaphoreInfo(cache_info->semaphore);
239 RelinquishStreamPixels(cache_info);
240 if (cache_info->nexus_info != (NexusInfo **) NULL)
241 cache_info->nexus_info=DestroyPixelCacheNexus(cache_info->nexus_info,
242 cache_info->number_threads);
243 if (cache_info->file_semaphore != (SemaphoreInfo *) NULL)
244 RelinquishSemaphoreInfo(&cache_info->file_semaphore);
245 if (cache_info->semaphore != (SemaphoreInfo *) NULL)
246 RelinquishSemaphoreInfo(&cache_info->semaphore);
247 cache_info=(CacheInfo *) RelinquishMagickMemory(cache_info);
324 *cache_info;
330 cache_info=(CacheInfo *) image->cache;
331 assert(cache_info->signature == MagickCoreSignature);
332 return(cache_info->metacontent);
410 *cache_info;
416 cache_info=(CacheInfo *) image->cache;
417 assert(cache_info->signature == MagickCoreSignature);
418 return(cache_info->pixels);
608 *cache_info;
614 cache_info=(CacheInfo *) image->cache;
615 assert(cache_info->signature == MagickCoreSignature);
616 return(cache_info->pixels);
647 *cache_info;
653 cache_info=(CacheInfo *) image->cache;
654 assert(cache_info->signature == MagickCoreSignature);
655 return(cache_info->metacontent);
695 static inline MagickBooleanType AcquireStreamPixels(CacheInfo *cache_info,
698 if (cache_info->length != (MagickSizeType) ((size_t) cache_info->length))
700 cache_info->mapped=MagickFalse;
701 cache_info->pixels=(Quantum *) AcquireAlignedMemory(1,(size_t)
702 cache_info->length);
703 if (cache_info->pixels == (Quantum *) NULL)
705 cache_info->mapped=MagickTrue;
706 cache_info->pixels=(Quantum *) MapBlob(-1,IOMode,0,(size_t)
707 cache_info->length);
709 if (cache_info->pixels == (Quantum *) NULL)
713 cache_info->filename);
725 *cache_info;
754 cache_info=(CacheInfo *) image->cache;
755 assert(cache_info->signature == MagickCoreSignature);
760 length=(size_t) number_pixels*cache_info->number_channels*sizeof(Quantum);
761 if (cache_info->number_channels == 0)
763 if (cache_info->metacontent_extent != 0)
764 length+=number_pixels*cache_info->metacontent_extent;
765 if (cache_info->pixels == (Quantum *) NULL)
767 cache_info->length=length;
768 status=AcquireStreamPixels(cache_info,exception);
771 cache_info->length=0;
776 if (cache_info->length < length)
778 RelinquishStreamPixels(cache_info);
779 cache_info->length=length;
780 status=AcquireStreamPixels(cache_info,exception);
783 cache_info->length=0;
787 cache_info->metacontent=(void *) NULL;
788 if (cache_info->metacontent_extent != 0)
789 cache_info->metacontent=(void *) (cache_info->pixels+number_pixels*
790 cache_info->number_channels);
791 return(cache_info->pixels);
872 *cache_info;
906 cache_info=(CacheInfo *) image->cache;
907 assert(cache_info->signature == MagickCoreSignature);
913 cache_info->columns);
914 cache_info->storage_class=image->storage_class;
915 cache_info->colorspace=image->colorspace;
916 cache_info->columns=image->columns;
917 cache_info->rows=image->rows;
918 image->cache=cache_info;
923 cache_info->columns=columns;
924 cache_info->rows=rows;
926 length=(size_t) number_pixels*cache_info->number_channels*sizeof(Quantum);
927 if (cache_info->number_channels == 0)
929 if (cache_info->metacontent_extent != 0)
930 length+=number_pixels*cache_info->metacontent_extent;
931 if (cache_info->pixels == (Quantum *) NULL)
933 cache_info->length=length;
934 status=AcquireStreamPixels(cache_info,exception);
937 cache_info->length=0;
942 if (cache_info->length < length)
944 RelinquishStreamPixels(cache_info);
945 cache_info->length=length;
946 status=AcquireStreamPixels(cache_info,exception);
949 cache_info->length=0;
953 cache_info->metacontent=(void *) NULL;
954 if (cache_info->metacontent_extent != 0)
955 cache_info->metacontent=(void *) (cache_info->pixels+number_pixels*
956 cache_info->number_channels);
957 return(cache_info->pixels);
1175 *cache_info;
1203 cache_info=(CacheInfo *) image->cache;
1204 assert(cache_info->signature == MagickCoreSignature);
1206 length=packet_size*cache_info->columns*cache_info->rows;
2708 *cache_info;
2720 cache_info=(CacheInfo *) image->cache;
2721 assert(cache_info->signature == MagickCoreSignature);
2729 length=stream_handler(image,cache_info->pixels,(size_t) cache_info->columns);
2730 return(length == cache_info->columns ? MagickTrue : MagickFalse);