/// <summary>
        /// encoded cache multiplex -> encoded cache -> data fetch.
        /// </summary>
        private IProducer <CloseableReference <IPooledByteBuffer> > GetEncodedDataFetchSequence()
        {
            lock (_gate)
            {
                if (_encodedDataFetchSequence == null)
                {
                    DataFetchProducer dataFetchProducer =
                        _producerFactory.NewDataFetchProducer();

                    _encodedDataFetchSequence = new RemoveImageTransformMetaDataProducer(
                        NewEncodedCacheMultiplexToTranscodeSequence(dataFetchProducer));
                }

                return(_encodedDataFetchSequence);
            }
        }
示例#2
0
        /// <summary>
        /// bitmap cache get ->
        /// background thread hand-off -> bitmap cache -> decode ->
        /// resize and rotate -> (webp transcode) -> data fetch.
        /// </summary>
        private IProducer <CloseableReference <CloseableImage> > GetDataFetchSequence()
        {
            lock (_gate)
            {
                if (_dataFetchSequence == null)
                {
                    IProducer <EncodedImage> inputProducer = _producerFactory.NewDataFetchProducer();
                    inputProducer = ProducerFactory.NewAddImageTransformMetaDataProducer(inputProducer);
                    if (!_downsampleEnabled)
                    {
                        inputProducer = _producerFactory.NewResizeAndRotateProducer(inputProducer);
                    }

                    _dataFetchSequence = NewBitmapCacheGetToDecodeSequence(inputProducer);
                }

                return(_dataFetchSequence);
            }
        }