350 lines
7.9 KiB
Smali
350 lines
7.9 KiB
Smali
.class public final Lcom/linecorp/apng/decoder/Apng;
|
|
.super Ljava/lang/Object;
|
|
.source "Apng.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/linecorp/apng/decoder/Apng$DecodeResult;,
|
|
Lcom/linecorp/apng/decoder/Apng$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/linecorp/apng/decoder/Apng$Companion;
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Landroid/graphics/Bitmap;
|
|
|
|
.field public final b:I
|
|
.annotation build Landroidx/annotation/IntRange;
|
|
from = 0x0L
|
|
to = 0x7fffffffL
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final c:I
|
|
|
|
.field public final d:I
|
|
|
|
.field public final e:I
|
|
|
|
.field public final f:I
|
|
|
|
.field public final g:[I
|
|
|
|
.field public final h:I
|
|
|
|
.field public final i:J
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/linecorp/apng/decoder/Apng$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/linecorp/apng/decoder/Apng$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/linecorp/apng/decoder/Apng;->Companion:Lcom/linecorp/apng/decoder/Apng$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(IIII[IIJ)V
|
|
.locals 1
|
|
.param p4 # I
|
|
.annotation build Landroidx/annotation/IntRange;
|
|
from = 0x1L
|
|
to = 0x7fffffffL
|
|
.end annotation
|
|
.end param
|
|
.param p6 # I
|
|
.annotation build Landroidx/annotation/IntRange;
|
|
from = 0x0L
|
|
to = 0x7fffffffL
|
|
.end annotation
|
|
.end param
|
|
.param p7 # J
|
|
.annotation build Landroidx/annotation/IntRange;
|
|
from = 0x0L
|
|
to = 0x7fffffffL
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput p1, p0, Lcom/linecorp/apng/decoder/Apng;->c:I
|
|
|
|
iput p2, p0, Lcom/linecorp/apng/decoder/Apng;->d:I
|
|
|
|
iput p3, p0, Lcom/linecorp/apng/decoder/Apng;->e:I
|
|
|
|
iput p4, p0, Lcom/linecorp/apng/decoder/Apng;->f:I
|
|
|
|
iput-object p5, p0, Lcom/linecorp/apng/decoder/Apng;->g:[I
|
|
|
|
iput p6, p0, Lcom/linecorp/apng/decoder/Apng;->h:I
|
|
|
|
iput-wide p7, p0, Lcom/linecorp/apng/decoder/Apng;->i:J
|
|
|
|
sget-object p1, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
|
|
|
|
invoke-static {p2, p3, p1}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "Bitmap.createBitmap(widt\u2026 Bitmap.Config.ARGB_8888)"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/linecorp/apng/decoder/Apng;->a:Landroid/graphics/Bitmap;
|
|
|
|
const-string p1, "Apng#draw"
|
|
|
|
invoke-static {p1}, Landroid/os/Trace;->beginSection(Ljava/lang/String;)V
|
|
|
|
iget p1, p0, Lcom/linecorp/apng/decoder/Apng;->c:I
|
|
|
|
iget-object p2, p0, Lcom/linecorp/apng/decoder/Apng;->a:Landroid/graphics/Bitmap;
|
|
|
|
const/4 p3, 0x0
|
|
|
|
invoke-static {p1, p3, p2}, Lcom/linecorp/apng/decoder/ApngDecoderJni;->draw(IILandroid/graphics/Bitmap;)V
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
iget-object p1, p0, Lcom/linecorp/apng/decoder/Apng;->g:[I
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
array-length p2, p1
|
|
|
|
const/4 p4, 0x0
|
|
|
|
:goto_0
|
|
if-ge p3, p2, :cond_0
|
|
|
|
aget p5, p1, p3
|
|
|
|
add-int/2addr p4, p5
|
|
|
|
add-int/lit8 p3, p3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iput p4, p0, Lcom/linecorp/apng/decoder/Apng;->b:I
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "$this$sum"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "frameDurations"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getId$p(Lcom/linecorp/apng/decoder/Apng;)I
|
|
.locals 0
|
|
|
|
iget p0, p0, Lcom/linecorp/apng/decoder/Apng;->c:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final copy()Lcom/linecorp/apng/decoder/Apng;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/linecorp/apng/decoder/Apng;->Companion:Lcom/linecorp/apng/decoder/Apng$Companion;
|
|
|
|
invoke-virtual {v0, p0}, Lcom/linecorp/apng/decoder/Apng$Companion;->copy(Lcom/linecorp/apng/decoder/Apng;)Lcom/linecorp/apng/decoder/Apng;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final drawWithIndex(ILandroid/graphics/Canvas;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const-string v0, "Apng#draw"
|
|
|
|
invoke-static {v0}, Landroid/os/Trace;->beginSection(Ljava/lang/String;)V
|
|
|
|
iget v0, p0, Lcom/linecorp/apng/decoder/Apng;->c:I
|
|
|
|
iget-object v1, p0, Lcom/linecorp/apng/decoder/Apng;->a:Landroid/graphics/Bitmap;
|
|
|
|
invoke-static {v0, p1, v1}, Lcom/linecorp/apng/decoder/ApngDecoderJni;->draw(IILandroid/graphics/Bitmap;)V
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
iget-object p1, p0, Lcom/linecorp/apng/decoder/Apng;->a:Landroid/graphics/Bitmap;
|
|
|
|
invoke-virtual {p2, p1, p3, p4, p5}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "paint"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "dst"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "canvas"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final finalize()V
|
|
.locals 0
|
|
|
|
invoke-virtual {p0}, Lcom/linecorp/apng/decoder/Apng;->recycle()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getAllFrameByteCount()J
|
|
.locals 2
|
|
|
|
iget-wide v0, p0, Lcom/linecorp/apng/decoder/Apng;->i:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final getByteCount()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/linecorp/apng/decoder/Apng;->a:Landroid/graphics/Bitmap;
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getAllocationByteCount()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getConfig()Landroid/graphics/Bitmap$Config;
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/linecorp/apng/decoder/Apng;->a:Landroid/graphics/Bitmap;
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getConfig()Landroid/graphics/Bitmap$Config;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "bitmap.config"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getDuration()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/linecorp/apng/decoder/Apng;->b:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getFrameCount()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/linecorp/apng/decoder/Apng;->f:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getFrameDurations()[I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/linecorp/apng/decoder/Apng;->g:[I
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getHeight()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/linecorp/apng/decoder/Apng;->e:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getLoopCount()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/linecorp/apng/decoder/Apng;->h:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getWidth()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/linecorp/apng/decoder/Apng;->d:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final isRecycled()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/linecorp/apng/decoder/Apng;->a:Landroid/graphics/Bitmap;
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->isRecycled()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final recycle()V
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/linecorp/apng/decoder/Apng;->c:I
|
|
|
|
invoke-static {v0}, Lcom/linecorp/apng/decoder/ApngDecoderJni;->recycle(I)I
|
|
|
|
return-void
|
|
.end method
|