package com.facebook.animated.webp;

import X.QJB;
import android.graphics.Bitmap;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;

public class WebPFrame implements QJB {
    public long mNativeContext;

    static {
        Covode.recordClassIndex(41028);
    }

    private native void nativeDispose();

    private native void nativeFinalize();

    private native int nativeGetDurationMs();

    private native int nativeGetHeight();

    private native int nativeGetWidth();

    private native int nativeGetXOffset();

    private native int nativeGetYOffset();

    private native void nativeRenderFrame(int i, int i2, Bitmap bitmap);

    public native boolean nativeIsBlendWithPreviousFrame();

    public native boolean nativeShouldDisposeToBackgroundColor();

    public void dispose() {
        MethodCollector.i(8130);
        nativeDispose();
        MethodCollector.o(8130);
    }

    public void finalize() {
        MethodCollector.i(7906);
        nativeFinalize();
        MethodCollector.o(7906);
    }

    public int getHeight() {
        MethodCollector.i(8528);
        int nativeGetHeight = nativeGetHeight();
        MethodCollector.o(8528);
        return nativeGetHeight;
    }

    public int getWidth() {
        MethodCollector.i(8338);
        int nativeGetWidth = nativeGetWidth();
        MethodCollector.o(8338);
        return nativeGetWidth;
    }

    public int getXOffset() {
        MethodCollector.i(8710);
        int nativeGetXOffset = nativeGetXOffset();
        MethodCollector.o(8710);
        return nativeGetXOffset;
    }

    public int getYOffset() {
        MethodCollector.i(8904);
        int nativeGetYOffset = nativeGetYOffset();
        MethodCollector.o(8904);
        return nativeGetYOffset;
    }

    public WebPFrame(long j) {
        this.mNativeContext = j;
    }

    public void renderFrame(int i, int i2, Bitmap bitmap) {
        MethodCollector.i(8336);
        nativeRenderFrame(i, i2, bitmap);
        MethodCollector.o(8336);
    }
}
