public class

KitKatPurgeableDecoder

extends DalvikPurgeableDecoder
java.lang.Object
   ↳ com.facebook.imagepipeline.nativecode.DalvikPurgeableDecoder
     ↳ com.facebook.imagepipeline.platform.KitKatPurgeableDecoder

Class Overview

Bitmap Decoder implementation for KitKat

The MemoryFile trick used in GingerbreadPurgeableDecoder does not work in KitKat. Here, we instead use Java memory to store the encoded images, but make use of a pool to minimize allocations. We cannot decode from a stream, as that does not support purgeable decodes.

Summary

[Expand]
Inherited Fields
From class com.facebook.imagepipeline.nativecode.DalvikPurgeableDecoder
Public Constructors
KitKatPurgeableDecoder(FlexByteArrayPool flexByteArrayPool)
Protected Methods
Bitmap decodeByteArrayAsPurgeable(CloseableReference<PooledByteBuffer> bytesRef, BitmapFactory.Options options)
Decodes a byteArray into a purgeable bitmap
Bitmap decodeJPEGByteArrayAsPurgeable(CloseableReference<PooledByteBuffer> bytesRef, int length, BitmapFactory.Options options)
Decodes a byteArray containing jpeg encoded bytes into a purgeable bitmap

Adds a JFIF End-Of-Image marker if needed before decoding.

[Expand]
Inherited Methods
From class com.facebook.imagepipeline.nativecode.DalvikPurgeableDecoder
From class java.lang.Object
From interface com.facebook.imagepipeline.platform.PlatformDecoder

Public Constructors

public KitKatPurgeableDecoder (FlexByteArrayPool flexByteArrayPool)

Protected Methods

protected Bitmap decodeByteArrayAsPurgeable (CloseableReference<PooledByteBuffer> bytesRef, BitmapFactory.Options options)

Decodes a byteArray into a purgeable bitmap

Parameters
bytesRef the byte buffer that contains the encoded bytes
options the options passed to the BitmapFactory

protected Bitmap decodeJPEGByteArrayAsPurgeable (CloseableReference<PooledByteBuffer> bytesRef, int length, BitmapFactory.Options options)

Decodes a byteArray containing jpeg encoded bytes into a purgeable bitmap

Adds a JFIF End-Of-Image marker if needed before decoding.

Parameters
bytesRef the byte buffer that contains the encoded bytes
length the number of encoded bytes in the buffer
options the options passed to the BitmapFactory