@Beta public class GifTexImage2D extends Object
glTexImage2D(int, int) and glTexImage2D(int, int)seekToFrame(int) (int)}| Constructor and Description |
|---|
GifTexImage2D(InputSource inputSource,
GifOptions options)
Constructs new GifTexImage2D.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
int |
getFrameDuration(int index)
|
int |
getHeight() |
int |
getNumberOfFrames() |
int |
getWidth() |
void |
glTexImage2D(int target,
int level)
|
void |
glTexSubImage2D(int target,
int level)
|
void |
recycle()
|
void |
seekToFrame(int index)
Seeks to given frame
|
void |
startDecoderThread()
Creates frame buffer and starts decoding thread.
|
void |
stopDecoderThread()
Stops decoder thread and releases frame buffer.
|
public GifTexImage2D(InputSource inputSource, @Nullable GifOptions options) throws IOException
startDecoderThread() to start it.inputSource - sourceoptions - null-ok; options controlling parameters like subsampling and opacityIOException - when creation failspublic int getFrameDuration(int index)
index - index of the frameIndexOutOfBoundsException - if index < 0 || index >= <number of frames>public void seekToFrame(int index)
index - index of the frameIndexOutOfBoundsException - if index < 0 || index >= <number of frames>public int getNumberOfFrames()
public void glTexImage2D(int target,
int level)
GLES20.glTexImage2D(int, int, int, int, int, int, int, int, Buffer).
Where Buffer contains pixels of the current frame.level - level-of-detail numbertarget - target texturepublic void glTexSubImage2D(int target,
int level)
GLES20.glTexSubImage2D(int, int, int, int, int, int, int, int, Buffer).
Where Buffer contains pixels of the current frame.level - level-of-detail numbertarget - target texturepublic void startDecoderThread()
public void stopDecoderThread()
public void recycle()
GifDrawable.recycle(). Decoder thread is stopped automatically.public int getWidth()
public int getHeight()