2019-02-04 20:08:30 +00:00
|
|
|
.class public final Lcom/airbnb/lottie/e/j;
|
|
|
|
.super Ljava/lang/Object;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "GradientColorParser.java"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lcom/airbnb/lottie/e/af;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
"Lcom/airbnb/lottie/e/af<",
|
|
|
|
"Lcom/airbnb/lottie/c/b/c;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field private mv:I
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(I)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/airbnb/lottie/e/j;->mv:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private a(Lcom/airbnb/lottie/c/b/c;Ljava/util/List;)V
|
|
|
|
.locals 20
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/airbnb/lottie/c/b/c;",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/lang/Float;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
move-object/from16 v0, p1
|
|
|
|
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
|
|
|
|
iget v3, v1, Lcom/airbnb/lottie/e/j;->mv:I
|
|
|
|
|
|
|
|
mul-int/lit8 v3, v3, 0x4
|
|
|
|
|
|
|
|
invoke-interface/range {p2 .. p2}, Ljava/util/List;->size()I
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-gt v4, v3, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-interface/range {p2 .. p2}, Ljava/util/List;->size()I
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
sub-int/2addr v4, v3
|
|
|
|
|
|
|
|
div-int/lit8 v4, v4, 0x2
|
|
|
|
|
|
|
|
new-array v5, v4, [D
|
|
|
|
|
|
|
|
new-array v6, v4, [D
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface/range {p2 .. p2}, Ljava/util/List;->size()I
|
|
|
|
|
|
|
|
move-result v9
|
|
|
|
|
|
|
|
if-ge v3, v9, :cond_2
|
|
|
|
|
|
|
|
rem-int/lit8 v9, v3, 0x2
|
|
|
|
|
|
|
|
if-nez v9, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v9
|
|
|
|
|
|
|
|
check-cast v9, Ljava/lang/Float;
|
|
|
|
|
|
|
|
invoke-virtual {v9}, Ljava/lang/Float;->floatValue()F
|
|
|
|
|
|
|
|
move-result v9
|
|
|
|
|
|
|
|
float-to-double v9, v9
|
|
|
|
|
|
|
|
aput-wide v9, v5, v8
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v9
|
|
|
|
|
|
|
|
check-cast v9, Ljava/lang/Float;
|
|
|
|
|
|
|
|
invoke-virtual {v9}, Ljava/lang/Float;->floatValue()F
|
|
|
|
|
|
|
|
move-result v9
|
|
|
|
|
|
|
|
float-to-double v9, v9
|
|
|
|
|
|
|
|
aput-wide v9, v6, v8
|
|
|
|
|
|
|
|
add-int/lit8 v8, v8, 0x1
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_2
|
|
|
|
iget-object v2, v0, Lcom/airbnb/lottie/c/b/c;->jT:[I
|
|
|
|
|
|
|
|
array-length v2, v2
|
|
|
|
|
|
|
|
if-ge v7, v2, :cond_5
|
|
|
|
|
|
|
|
iget-object v2, v0, Lcom/airbnb/lottie/c/b/c;->jT:[I
|
|
|
|
|
|
|
|
aget v2, v2, v7
|
|
|
|
|
|
|
|
iget-object v3, v0, Lcom/airbnb/lottie/c/b/c;->jS:[F
|
|
|
|
|
|
|
|
aget v3, v3, v7
|
|
|
|
|
|
|
|
float-to-double v8, v3
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
const-wide v10, 0x406fe00000000000L # 255.0
|
|
|
|
|
|
|
|
if-ge v3, v4, :cond_4
|
|
|
|
|
|
|
|
add-int/lit8 v12, v3, -0x1
|
|
|
|
|
|
|
|
aget-wide v13, v5, v12
|
|
|
|
|
|
|
|
aget-wide v15, v5, v3
|
|
|
|
|
|
|
|
aget-wide v17, v5, v3
|
|
|
|
|
|
|
|
cmpl-double v19, v17, v8
|
|
|
|
|
|
|
|
if-ltz v19, :cond_3
|
|
|
|
|
|
|
|
invoke-static {v8, v9}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
|
|
|
|
sub-double/2addr v8, v13
|
|
|
|
|
|
|
|
sub-double/2addr v15, v13
|
|
|
|
|
|
|
|
div-double/2addr v8, v15
|
|
|
|
|
|
|
|
aget-wide v12, v6, v12
|
|
|
|
|
|
|
|
aget-wide v14, v6, v3
|
|
|
|
|
|
|
|
sub-double/2addr v14, v12
|
|
|
|
|
|
|
|
mul-double v8, v8, v14
|
|
|
|
|
|
|
|
add-double/2addr v12, v8
|
|
|
|
|
|
|
|
mul-double v12, v12, v10
|
|
|
|
|
|
|
|
double-to-int v3, v12
|
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
add-int/lit8 v3, v4, -0x1
|
|
|
|
|
|
|
|
aget-wide v8, v6, v3
|
|
|
|
|
|
|
|
mul-double v8, v8, v10
|
|
|
|
|
|
|
|
double-to-int v3, v8
|
|
|
|
|
|
|
|
:goto_4
|
|
|
|
invoke-static {v2}, Landroid/graphics/Color;->red(I)I
|
|
|
|
|
|
|
|
move-result v8
|
|
|
|
|
|
|
|
invoke-static {v2}, Landroid/graphics/Color;->green(I)I
|
|
|
|
|
|
|
|
move-result v9
|
|
|
|
|
|
|
|
invoke-static {v2}, Landroid/graphics/Color;->blue(I)I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
invoke-static {v3, v8, v9, v2}, Landroid/graphics/Color;->argb(IIII)I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
iget-object v3, v0, Lcom/airbnb/lottie/c/b/c;->jT:[I
|
|
|
|
|
|
|
|
aput v2, v3, v7
|
|
|
|
|
|
|
|
add-int/lit8 v7, v7, 0x1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final synthetic a(Landroid/util/JsonReader;F)Ljava/lang/Object;
|
|
|
|
.locals 10
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance p2, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/util/JsonReader;->peek()Landroid/util/JsonToken;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget-object v1, Landroid/util/JsonToken;->BEGIN_ARRAY:Landroid/util/JsonToken;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/util/JsonReader;->beginArray()V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_1
|
|
|
|
invoke-virtual {p1}, Landroid/util/JsonReader;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/util/JsonReader;->nextDouble()D
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
double-to-float v1, v3
|
|
|
|
|
|
|
|
invoke-static {v1}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {p2, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/util/JsonReader;->endArray()V
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
iget p1, p0, Lcom/airbnb/lottie/e/j;->mv:I
|
|
|
|
|
|
|
|
const/4 v0, -0x1
|
|
|
|
|
|
|
|
if-ne p1, v0, :cond_4
|
|
|
|
|
|
|
|
invoke-interface {p2}, Ljava/util/List;->size()I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
div-int/lit8 p1, p1, 0x4
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/airbnb/lottie/e/j;->mv:I
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
iget p1, p0, Lcom/airbnb/lottie/e/j;->mv:I
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
new-array v0, p1, [F
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
new-array p1, p1, [I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
iget v4, p0, Lcom/airbnb/lottie/e/j;->mv:I
|
|
|
|
|
|
|
|
mul-int/lit8 v4, v4, 0x4
|
|
|
|
|
|
|
|
if-ge v2, v4, :cond_5
|
|
|
|
|
|
|
|
div-int/lit8 v4, v2, 0x4
|
|
|
|
|
|
|
|
invoke-interface {p2, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
check-cast v5, Ljava/lang/Float;
|
|
|
|
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Float;->floatValue()F
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
float-to-double v5, v5
|
|
|
|
|
|
|
|
rem-int/lit8 v7, v2, 0x4
|
|
|
|
|
|
|
|
const-wide v8, 0x406fe00000000000L # 255.0
|
|
|
|
|
|
|
|
packed-switch v7, :pswitch_data_0
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:pswitch_0
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
|
|
|
|
mul-double v5, v5, v8
|
|
|
|
|
|
|
|
double-to-int v5, v5
|
|
|
|
|
|
|
|
const/16 v6, 0xff
|
|
|
|
|
|
|
|
invoke-static {v6, v1, v3, v5}, Landroid/graphics/Color;->argb(IIII)I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
aput v5, p1, v4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:pswitch_1
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
|
|
|
|
mul-double v5, v5, v8
|
|
|
|
|
|
|
|
double-to-int v3, v5
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:pswitch_2
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
|
|
|
|
mul-double v5, v5, v8
|
|
|
|
|
|
|
|
double-to-int v1, v5
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:pswitch_3
|
|
|
|
double-to-float v5, v5
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
aput v5, v0, v4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:goto_3
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
new-instance v1, Lcom/airbnb/lottie/c/b/c;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-direct {v1, v0, p1}, Lcom/airbnb/lottie/c/b/c;-><init>([F[I)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, v1, p2}, Lcom/airbnb/lottie/e/j;->a(Lcom/airbnb/lottie/c/b/c;Ljava/util/List;)V
|
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
nop
|
|
|
|
|
|
|
|
:pswitch_data_0
|
|
|
|
.packed-switch 0x0
|
|
|
|
:pswitch_3
|
|
|
|
:pswitch_2
|
|
|
|
:pswitch_1
|
|
|
|
:pswitch_0
|
|
|
|
.end packed-switch
|
|
|
|
.end method
|