import com.bumptech.glide.gifdecoder.GifDecoder; //導入方法依賴的package包/類
/**
* Constructor for GifDrawable.
*
* @see #setFrameTransformation(com.bumptech.glide.load.Transformation, android.graphics.Bitmap)
*
* @param context A context.
* @param bitmapProvider An {@link com.bumptech.glide.gifdecoder.GifDecoder.BitmapProvider} that can be used to
* retrieve re-usable {@link android.graphics.Bitmap}s.
* @param bitmapPool A {@link com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool} that can be used to return
* the first frame when this gifTexture is recycled.
* @param frameTransformation An {@link com.bumptech.glide.load.Transformation} that can be applied to each frame.
* @param targetFrameWidth The desired width of the frames displayed by this gifTexture (the width of the view or
* {@link com.bumptech.glide.request.target.Target} this gifTexture is being loaded into).
* @param targetFrameHeight The desired height of the frames displayed by this gifTexture (the height of the view or
* {@link com.bumptech.glide.request.target.Target} this gifTexture is being loaded into).
* @param gifHeader The header data for this gif.
* @param data The full bytes of the gif.
* @param firstFrame The decoded and transformed first frame of this gif.
*/
public GifTexture(Context context, GifDecoder.BitmapProvider bitmapProvider, BitmapPool bitmapPool,
Transformation frameTransformation, int targetFrameWidth, int targetFrameHeight,
GifHeader gifHeader, byte[] data, Bitmap firstFrame) {
this(new GifState(gifHeader, data, context, frameTransformation, targetFrameWidth, targetFrameHeight,
bitmapProvider, bitmapPool, firstFrame));
}