Rabbit-R1/original r1/smali/smali_classes2/com/airbnb/lottie/LottieComposition.smali

708 lines
17 KiB
Smali
Raw Normal View History

2024-05-21 16:08:36 -05:00
.class public Lcom/airbnb/lottie/LottieComposition;
.super Ljava/lang/Object;
.source "LottieComposition.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/airbnb/lottie/LottieComposition$Factory;
}
.end annotation
# instance fields
.field private bounds:Landroid/graphics/Rect;
.field private characters:Landroidx/collection/SparseArrayCompat;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/collection/SparseArrayCompat<",
"Lcom/airbnb/lottie/model/FontCharacter;",
">;"
}
.end annotation
.end field
.field private endFrame:F
.field private fonts:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lcom/airbnb/lottie/model/Font;",
">;"
}
.end annotation
.end field
.field private frameRate:F
.field private hasDashPattern:Z
.field private images:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lcom/airbnb/lottie/LottieImageAsset;",
">;"
}
.end annotation
.end field
.field private imagesDpScale:F
.field private layerMap:Landroidx/collection/LongSparseArray;
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroidx/collection/LongSparseArray<",
"Lcom/airbnb/lottie/model/layer/Layer;",
">;"
}
.end annotation
.end field
.field private layers:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/airbnb/lottie/model/layer/Layer;",
">;"
}
.end annotation
.end field
.field private markers:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/airbnb/lottie/model/Marker;",
">;"
}
.end annotation
.end field
.field private maskAndMatteCount:I
.field private final performanceTracker:Lcom/airbnb/lottie/PerformanceTracker;
.field private precomps:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/util/List<",
"Lcom/airbnb/lottie/model/layer/Layer;",
">;>;"
}
.end annotation
.end field
.field private startFrame:F
.field private final warnings:Ljava/util/HashSet;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashSet<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 1
.line 44
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 46
new-instance v0, Lcom/airbnb/lottie/PerformanceTracker;
invoke-direct {v0}, Lcom/airbnb/lottie/PerformanceTracker;-><init>()V
iput-object v0, p0, Lcom/airbnb/lottie/LottieComposition;->performanceTracker:Lcom/airbnb/lottie/PerformanceTracker;
.line 47
new-instance v0, Ljava/util/HashSet;
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
iput-object v0, p0, Lcom/airbnb/lottie/LottieComposition;->warnings:Ljava/util/HashSet;
const/4 v0, 0x0
iput v0, p0, Lcom/airbnb/lottie/LottieComposition;->maskAndMatteCount:I
return-void
.end method
# virtual methods
.method public addWarning(Ljava/lang/String;)V
.locals 0
.line 97
invoke-static {p1}, Lcom/airbnb/lottie/utils/Logger;->warning(Ljava/lang/String;)V
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->warnings:Ljava/util/HashSet;
.line 98
invoke-virtual {p0, p1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
return-void
.end method
.method public getBounds()Landroid/graphics/Rect;
.locals 0
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->bounds:Landroid/graphics/Rect;
return-object p0
.end method
.method public getCharacters()Landroidx/collection/SparseArrayCompat;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Landroidx/collection/SparseArrayCompat<",
"Lcom/airbnb/lottie/model/FontCharacter;",
">;"
}
.end annotation
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->characters:Landroidx/collection/SparseArrayCompat;
return-object p0
.end method
.method public getDuration()F
.locals 2
.line 149
invoke-virtual {p0}, Lcom/airbnb/lottie/LottieComposition;->getDurationFrames()F
move-result v0
iget p0, p0, Lcom/airbnb/lottie/LottieComposition;->frameRate:F
div-float/2addr v0, p0
const/high16 p0, 0x447a0000 # 1000.0f
mul-float/2addr v0, p0
float-to-long v0, v0
long-to-float p0, v0
return p0
.end method
.method public getDurationFrames()F
.locals 1
iget v0, p0, Lcom/airbnb/lottie/LottieComposition;->endFrame:F
iget p0, p0, Lcom/airbnb/lottie/LottieComposition;->startFrame:F
sub-float/2addr v0, p0
return v0
.end method
.method public getEndFrame()F
.locals 0
iget p0, p0, Lcom/airbnb/lottie/LottieComposition;->endFrame:F
return p0
.end method
.method public getFonts()Ljava/util/Map;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lcom/airbnb/lottie/model/Font;",
">;"
}
.end annotation
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->fonts:Ljava/util/Map;
return-object p0
.end method
.method public getFrameForProgress(F)F
.locals 1
iget v0, p0, Lcom/airbnb/lottie/LottieComposition;->startFrame:F
iget p0, p0, Lcom/airbnb/lottie/LottieComposition;->endFrame:F
.line 161
invoke-static {v0, p0, p1}, Lcom/airbnb/lottie/utils/MiscUtils;->lerp(FFF)F
move-result p0
return p0
.end method
.method public getFrameRate()F
.locals 0
iget p0, p0, Lcom/airbnb/lottie/LottieComposition;->frameRate:F
return p0
.end method
.method public getImages()Ljava/util/Map;
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lcom/airbnb/lottie/LottieImageAsset;",
">;"
}
.end annotation
.line 220
invoke-static {}, Lcom/airbnb/lottie/utils/Utils;->dpScale()F
move-result v0
iget v1, p0, Lcom/airbnb/lottie/LottieComposition;->imagesDpScale:F
cmpl-float v1, v0, v1
if-eqz v1, :cond_0
iput v0, p0, Lcom/airbnb/lottie/LottieComposition;->imagesDpScale:F
iget-object v1, p0, Lcom/airbnb/lottie/LottieComposition;->images:Ljava/util/Map;
.line 223
invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v1
.line 225
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/util/Map$Entry;
iget-object v3, p0, Lcom/airbnb/lottie/LottieComposition;->images:Ljava/util/Map;
.line 226
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/lang/String;
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/airbnb/lottie/LottieImageAsset;
iget v5, p0, Lcom/airbnb/lottie/LottieComposition;->imagesDpScale:F
div-float/2addr v5, v0
invoke-virtual {v2, v5}, Lcom/airbnb/lottie/LottieImageAsset;->copyWithScale(F)Lcom/airbnb/lottie/LottieImageAsset;
move-result-object v2
invoke-interface {v3, v4, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
:cond_0
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->images:Ljava/util/Map;
return-object p0
.end method
.method public getLayers()Ljava/util/List;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/airbnb/lottie/model/layer/Layer;",
">;"
}
.end annotation
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->layers:Ljava/util/List;
return-object p0
.end method
.method public getMarker(Ljava/lang/String;)Lcom/airbnb/lottie/model/Marker;
.locals 4
iget-object v0, p0, Lcom/airbnb/lottie/LottieComposition;->markers:Ljava/util/List;
.line 198
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_1
iget-object v2, p0, Lcom/airbnb/lottie/LottieComposition;->markers:Ljava/util/List;
.line 200
invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/airbnb/lottie/model/Marker;
.line 201
invoke-virtual {v2, p1}, Lcom/airbnb/lottie/model/Marker;->matchesName(Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_0
return-object v2
:cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_1
const/4 p0, 0x0
return-object p0
.end method
.method public getMarkers()Ljava/util/List;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/airbnb/lottie/model/Marker;",
">;"
}
.end annotation
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->markers:Ljava/util/List;
return-object p0
.end method
.method public getMaskAndMatteCount()I
.locals 0
iget p0, p0, Lcom/airbnb/lottie/LottieComposition;->maskAndMatteCount:I
return p0
.end method
.method public getPerformanceTracker()Lcom/airbnb/lottie/PerformanceTracker;
.locals 0
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->performanceTracker:Lcom/airbnb/lottie/PerformanceTracker;
return-object p0
.end method
.method public getPrecomps(Ljava/lang/String;)Ljava/util/List;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Ljava/util/List<",
"Lcom/airbnb/lottie/model/layer/Layer;",
">;"
}
.end annotation
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->precomps:Ljava/util/Map;
.line 181
invoke-interface {p0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Ljava/util/List;
return-object p0
.end method
.method public getProgressForFrame(F)F
.locals 1
iget v0, p0, Lcom/airbnb/lottie/LottieComposition;->startFrame:F
sub-float/2addr p1, v0
iget p0, p0, Lcom/airbnb/lottie/LottieComposition;->endFrame:F
sub-float/2addr p0, v0
div-float/2addr p1, p0
return p1
.end method
.method public getStartFrame()F
.locals 0
iget p0, p0, Lcom/airbnb/lottie/LottieComposition;->startFrame:F
return p0
.end method
.method public getWarnings()Ljava/util/ArrayList;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/ArrayList<",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 128
new-instance v0, Ljava/util/ArrayList;
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->warnings:Ljava/util/HashSet;
invoke-virtual {p0}, Ljava/util/HashSet;->size()I
move-result v1
new-array v1, v1, [Ljava/lang/String;
invoke-virtual {p0, v1}, Ljava/util/HashSet;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p0
check-cast p0, [Ljava/lang/String;
invoke-static {p0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object p0
invoke-direct {v0, p0}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
return-object v0
.end method
.method public hasDashPattern()Z
.locals 0
iget-boolean p0, p0, Lcom/airbnb/lottie/LottieComposition;->hasDashPattern:Z
return p0
.end method
.method public hasImages()Z
.locals 0
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->images:Ljava/util/Map;
.line 209
invoke-interface {p0}, Ljava/util/Map;->isEmpty()Z
move-result p0
xor-int/lit8 p0, p0, 0x1
return p0
.end method
.method public incrementMatteOrMaskCount(I)V
.locals 1
iget v0, p0, Lcom/airbnb/lottie/LottieComposition;->maskAndMatteCount:I
add-int/2addr v0, p1
iput v0, p0, Lcom/airbnb/lottie/LottieComposition;->maskAndMatteCount:I
return-void
.end method
.method public init(Landroid/graphics/Rect;FFFLjava/util/List;Landroidx/collection/LongSparseArray;Ljava/util/Map;Ljava/util/Map;FLandroidx/collection/SparseArrayCompat;Ljava/util/Map;Ljava/util/List;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/graphics/Rect;",
"FFF",
"Ljava/util/List<",
"Lcom/airbnb/lottie/model/layer/Layer;",
">;",
"Landroidx/collection/LongSparseArray<",
"Lcom/airbnb/lottie/model/layer/Layer;",
">;",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/util/List<",
"Lcom/airbnb/lottie/model/layer/Layer;",
">;>;",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lcom/airbnb/lottie/LottieImageAsset;",
">;F",
"Landroidx/collection/SparseArrayCompat<",
"Lcom/airbnb/lottie/model/FontCharacter;",
">;",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lcom/airbnb/lottie/model/Font;",
">;",
"Ljava/util/List<",
"Lcom/airbnb/lottie/model/Marker;",
">;)V"
}
.end annotation
iput-object p1, p0, Lcom/airbnb/lottie/LottieComposition;->bounds:Landroid/graphics/Rect;
iput p2, p0, Lcom/airbnb/lottie/LottieComposition;->startFrame:F
iput p3, p0, Lcom/airbnb/lottie/LottieComposition;->endFrame:F
iput p4, p0, Lcom/airbnb/lottie/LottieComposition;->frameRate:F
iput-object p5, p0, Lcom/airbnb/lottie/LottieComposition;->layers:Ljava/util/List;
iput-object p6, p0, Lcom/airbnb/lottie/LottieComposition;->layerMap:Landroidx/collection/LongSparseArray;
iput-object p7, p0, Lcom/airbnb/lottie/LottieComposition;->precomps:Ljava/util/Map;
iput-object p8, p0, Lcom/airbnb/lottie/LottieComposition;->images:Ljava/util/Map;
iput p9, p0, Lcom/airbnb/lottie/LottieComposition;->imagesDpScale:F
iput-object p10, p0, Lcom/airbnb/lottie/LottieComposition;->characters:Landroidx/collection/SparseArrayCompat;
iput-object p11, p0, Lcom/airbnb/lottie/LottieComposition;->fonts:Ljava/util/Map;
iput-object p12, p0, Lcom/airbnb/lottie/LottieComposition;->markers:Ljava/util/List;
return-void
.end method
.method public layerModelForId(J)Lcom/airbnb/lottie/model/layer/Layer;
.locals 0
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->layerMap:Landroidx/collection/LongSparseArray;
.line 141
invoke-virtual {p0, p1, p2}, Landroidx/collection/LongSparseArray;->get(J)Ljava/lang/Object;
move-result-object p0
check-cast p0, Lcom/airbnb/lottie/model/layer/Layer;
return-object p0
.end method
.method public setHasDashPattern(Z)V
.locals 0
iput-boolean p1, p0, Lcom/airbnb/lottie/LottieComposition;->hasDashPattern:Z
return-void
.end method
.method public setPerformanceTrackingEnabled(Z)V
.locals 0
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->performanceTracker:Lcom/airbnb/lottie/PerformanceTracker;
.line 132
invoke-virtual {p0, p1}, Lcom/airbnb/lottie/PerformanceTracker;->setEnabled(Z)V
return-void
.end method
.method public toString()Ljava/lang/String;
.locals 3
.line 240
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "LottieComposition:\n"
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget-object p0, p0, Lcom/airbnb/lottie/LottieComposition;->layers:Ljava/util/List;
.line 241
invoke-interface {p0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p0
:goto_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/airbnb/lottie/model/layer/Layer;
const-string v2, "\t"
.line 242
invoke-virtual {v1, v2}, Lcom/airbnb/lottie/model/layer/Layer;->toString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
goto :goto_0
.line 244
:cond_0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method