DebugControllerOverlayDrawable.smali
.class public Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;
.super Landroid/graphics/drawable/Drawable;
.source "DebugControllerOverlayDrawable.java"
# interfaces
.implements Lcom/facebook/drawee/debug/listener/ImageLoadingTimeListener;
# static fields
.field private static final IMAGE_SIZE_THRESHOLD_NOT_OK:F = 0.5f
.field private static final IMAGE_SIZE_THRESHOLD_OK:F = 0.1f
.field private static final MAX_LINE_WIDTH_EM:I = 0x8
.field private static final MAX_NUMBER_OF_LINES:I = 0x9
.field private static final MAX_TEXT_SIZE_PX:I = 0x28
.field private static final MIN_TEXT_SIZE_PX:I = 0xa
.field private static final NO_CONTROLLER_ID:Ljava/lang/String; = "none"
.field private static final OUTLINE_COLOR:I = -0x6800
.field private static final OUTLINE_STROKE_WIDTH_PX:I = 0x2
.field private static final TEXT_BACKGROUND_COLOR:I = 0x66000000
.field private static final TEXT_COLOR:I = -0x1
.field static final TEXT_COLOR_IMAGE_ALMOST_OK:I = -0x100
.field static final TEXT_COLOR_IMAGE_NOT_OK:I = -0x10000
.field static final TEXT_COLOR_IMAGE_OK:I = -0xff0100
.field private static final TEXT_LINE_SPACING_PX:I = 0x8
.field private static final TEXT_PADDING_PX:I = 0xa
# instance fields
.field private mAdditionalData:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashMap<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field private mControllerId:Ljava/lang/String;
.field private mCurrentTextXPx:I
.field private mCurrentTextYPx:I
.field private mFinalImageTimeMs:J
.field private mFrameCount:I
.field private mHeightPx:I
.field private mImageFormat:Ljava/lang/String;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field private mImageId:Ljava/lang/String;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field private mImageSizeBytes:I
.field private mLineIncrementPx:I
.field private mLoopCount:I
.field private final mMatrix:Landroid/graphics/Matrix;
.field private mOriginColor:I
.field private mOriginText:Ljava/lang/String;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field private mOverlayColor:I
.field private final mPaint:Landroid/graphics/Paint;
.field private final mRect:Landroid/graphics/Rect;
.field private final mRectF:Landroid/graphics/RectF;
.field private mScaleType:Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field private mStartTextXPx:I
.field private mStartTextYPx:I
.field private mTextGravity:I
.field private mWidthPx:I
# direct methods
.method public constructor <init>()V
.registers 3
.line 93
invoke-direct {p0}, Landroid/graphics/drawable/Drawable;-><init>()V
.line 67
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mAdditionalData:Ljava/util/HashMap;
const/16 v0, 0x50
.line 74
iput v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mTextGravity:I
.line 77
new-instance v0, Landroid/graphics/Paint;
const/4 v1, 0x1
invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V
iput-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
.line 78
new-instance v0, Landroid/graphics/Matrix;
invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V
iput-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mMatrix:Landroid/graphics/Matrix;
.line 79
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
iput-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRect:Landroid/graphics/Rect;
.line 80
new-instance v0, Landroid/graphics/RectF;
invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V
iput-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRectF:Landroid/graphics/RectF;
const/4 v0, -0x1
.line 90
iput v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mOriginColor:I
const/4 v0, 0x0
.line 91
iput v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mOverlayColor:I
.line 94
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->reset()V
return-void
.end method
.method private addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/Object;)V
.registers 5
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0,
0x0
}
names = {
"canvas",
"label",
"value"
}
.end annotation
.line 271
invoke-static {p3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p3
const/4 v0, -0x1
invoke-direct {p0, p1, p2, p3, v0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;I)V
return-void
.end method
.method private addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;)V
.registers 5
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0,
0x0
}
names = {
"canvas",
"label",
"value"
}
.end annotation
const/4 v0, -0x1
.line 275
invoke-direct {p0, p1, p2, p3, v0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;I)V
return-void
.end method
.method private addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;I)V
.registers 15
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0,
0x0,
0x0
}
names = {
"canvas",
"label",
"value",
"valueColor"
}
.end annotation
.line 279
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p2, ": "
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
.line 280
iget-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
invoke-virtual {v0, p2}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F
move-result v0
.line 281
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
invoke-virtual {v1, p3}, Landroid/graphics/Paint;->measureText(Ljava/lang/String;)F
move-result v1
.line 285
iget-object v2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
const/high16 v3, 0x66000000
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColor(I)V
.line 286
iget v2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mCurrentTextXPx:I
add-int/lit8 v3, v2, -0x4
int-to-float v5, v3
iget v3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mCurrentTextYPx:I
add-int/lit8 v4, v3, 0x8
int-to-float v6, v4
int-to-float v2, v2
add-float/2addr v2, v0
add-float/2addr v2, v1
const/high16 v1, 0x40800000 # 4.0f
add-float v7, v2, v1
iget v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mLineIncrementPx:I
add-int/2addr v3, v1
add-int/lit8 v3, v3, 0x8
int-to-float v8, v3
iget-object v9, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
move-object v4, p1
invoke-virtual/range {v4 .. v9}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
.line 293
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
const/4 v2, -0x1
invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V
.line 294
iget v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mCurrentTextXPx:I
int-to-float v1, v1
iget v2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mCurrentTextYPx:I
int-to-float v2, v2
iget-object v3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
invoke-virtual {p1, p2, v1, v2, v3}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
.line 295
iget-object p2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
invoke-virtual {p2, p4}, Landroid/graphics/Paint;->setColor(I)V
.line 296
iget p2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mCurrentTextXPx:I
int-to-float p2, p2
add-float/2addr p2, v0
iget p4, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mCurrentTextYPx:I
int-to-float p4, p4
iget-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
invoke-virtual {p1, p3, p2, p4, v0}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
.line 298
iget p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mCurrentTextYPx:I
iget p2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mLineIncrementPx:I
add-int/2addr p1, p2
iput p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mCurrentTextYPx:I
return-void
.end method
.method private static varargs format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
.registers 3
.param p1 # [Ljava/lang/Object;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0
}
names = {
"text",
"args"
}
.end annotation
if-nez p1, :cond_3
goto :goto_9
.line 267
:cond_3
sget-object v0, Ljava/util/Locale;->US:Ljava/util/Locale;
invoke-static {v0, p0, p1}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
:goto_9
return-object p0
.end method
.method private prepareDebugTextParameters(Landroid/graphics/Rect;II)V
.registers 6
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0,
0x0
}
names = {
"bounds",
"numberOfLines",
"maxLineLengthEm"
}
.end annotation
.line 251
invoke-virtual {p1}, Landroid/graphics/Rect;->width()I
move-result v0
div-int/2addr v0, p3
invoke-virtual {p1}, Landroid/graphics/Rect;->height()I
move-result p3
div-int/2addr p3, p2
invoke-static {v0, p3}, Ljava/lang/Math;->min(II)I
move-result p2
const/16 p3, 0xa
.line 252
invoke-static {p3, p2}, Ljava/lang/Math;->max(II)I
move-result p2
const/16 v0, 0x28
invoke-static {v0, p2}, Ljava/lang/Math;->min(II)I
move-result p2
.line 253
iget-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
int-to-float v1, p2
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V
add-int/lit8 p2, p2, 0x8
.line 255
iput p2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mLineIncrementPx:I
.line 256
iget v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mTextGravity:I
const/16 v1, 0x50
if-ne v0, v1, :cond_2e
mul-int/lit8 p2, p2, -0x1
.line 257
iput p2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mLineIncrementPx:I
.line 259
:cond_2e
iget p2, p1, Landroid/graphics/Rect;->left:I
add-int/2addr p2, p3
iput p2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mStartTextXPx:I
.line 260
iget p2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mTextGravity:I
if-ne p2, v1, :cond_3b
iget p1, p1, Landroid/graphics/Rect;->bottom:I
sub-int/2addr p1, p3
goto :goto_3f
:cond_3b
iget p1, p1, Landroid/graphics/Rect;->top:I
add-int/2addr p1, p3
add-int/2addr p1, p3
:goto_3f
iput p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mStartTextYPx:I
return-void
.end method
# virtual methods
.method public addAdditionalData(Ljava/lang/String;Ljava/lang/String;)V
.registers 4
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0
}
names = {
"key",
"value"
}
.end annotation
.line 158
iget-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mAdditionalData:Ljava/util/HashMap;
invoke-virtual {v0, p1, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
return-void
.end method
.method determineSizeHintColor(IILcom/facebook/drawee/drawable/ScalingUtils$ScaleType;)I
.registers 15
.param p3 # Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0,
0x0
}
names = {
"imageWidth",
"imageHeight",
"scaleType"
}
.end annotation
.line 303
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->getBounds()Landroid/graphics/Rect;
move-result-object v0
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v0
.line 304
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->getBounds()Landroid/graphics/Rect;
move-result-object v1
invoke-virtual {v1}, Landroid/graphics/Rect;->height()I
move-result v1
const/high16 v2, -0x10000
if-lez v0, :cond_9c
if-lez v1, :cond_9c
if-lez p1, :cond_9c
if-gtz p2, :cond_1c
goto/16 :goto_9c
:cond_1c
if-eqz p3, :cond_6c
.line 315
iget-object v3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRect:Landroid/graphics/Rect;
const/4 v4, 0x0
iput v4, v3, Landroid/graphics/Rect;->top:I
iput v4, v3, Landroid/graphics/Rect;->left:I
.line 316
iget-object v3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRect:Landroid/graphics/Rect;
iput v0, v3, Landroid/graphics/Rect;->right:I
.line 317
iget-object v3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRect:Landroid/graphics/Rect;
iput v1, v3, Landroid/graphics/Rect;->bottom:I
.line 319
iget-object v3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mMatrix:Landroid/graphics/Matrix;
invoke-virtual {v3}, Landroid/graphics/Matrix;->reset()V
.line 322
iget-object v5, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mMatrix:Landroid/graphics/Matrix;
iget-object v6, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRect:Landroid/graphics/Rect;
const/4 v9, 0x0
const/4 v10, 0x0
move-object v4, p3
move v7, p1
move v8, p2
invoke-interface/range {v4 .. v10}, Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;->getTransform(Landroid/graphics/Matrix;Landroid/graphics/Rect;IIFF)Landroid/graphics/Matrix;
.line 324
iget-object p3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRectF:Landroid/graphics/RectF;
const/4 v3, 0x0
iput v3, p3, Landroid/graphics/RectF;->top:F
iput v3, p3, Landroid/graphics/RectF;->left:F
.line 325
iget-object p3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRectF:Landroid/graphics/RectF;
int-to-float v3, p1
iput v3, p3, Landroid/graphics/RectF;->right:F
.line 326
iget-object p3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRectF:Landroid/graphics/RectF;
int-to-float v3, p2
iput v3, p3, Landroid/graphics/RectF;->bottom:F
.line 328
iget-object p3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mMatrix:Landroid/graphics/Matrix;
iget-object v3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRectF:Landroid/graphics/RectF;
invoke-virtual {p3, v3}, Landroid/graphics/Matrix;->mapRect(Landroid/graphics/RectF;)Z
.line 330
iget-object p3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRectF:Landroid/graphics/RectF;
invoke-virtual {p3}, Landroid/graphics/RectF;->width()F
move-result p3
float-to-int p3, p3
.line 331
iget-object v3, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mRectF:Landroid/graphics/RectF;
invoke-virtual {v3}, Landroid/graphics/RectF;->height()F
move-result v3
float-to-int v3, v3
.line 333
invoke-static {v0, p3}, Ljava/lang/Math;->min(II)I
move-result v0
.line 334
invoke-static {v1, v3}, Ljava/lang/Math;->min(II)I
move-result v1
:cond_6c
int-to-float p3, v0
const v3, 0x3dcccccd # 0.1f
mul-float v4, p3, v3
const/high16 v5, 0x3f000000 # 0.5f
mul-float/2addr p3, v5
int-to-float v6, v1
mul-float/2addr v3, v6
mul-float/2addr v6, v5
sub-int/2addr p1, v0
.line 344
invoke-static {p1}, Ljava/lang/Math;->abs(I)I
move-result p1
sub-int/2addr p2, v1
.line 345
invoke-static {p2}, Ljava/lang/Math;->abs(I)I
move-result p2
int-to-float p1, p1
cmpg-float v0, p1, v4
if-gez v0, :cond_90
int-to-float v0, p2
cmpg-float v0, v0, v3
if-gez v0, :cond_90
const p1, -0xff0100
return p1
:cond_90
cmpg-float p1, p1, p3
if-gez p1, :cond_9c
int-to-float p1, p2
cmpg-float p1, p1, v6
if-gez p1, :cond_9c
const/16 p1, -0x100
return p1
:cond_9c
:goto_9c
return v2
.end method
.method public draw(Landroid/graphics/Canvas;)V
.registers 10
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"canvas"
}
.end annotation
.line 186
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->getBounds()Landroid/graphics/Rect;
move-result-object v0
.line 189
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
sget-object v2, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;
invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
.line 190
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
const/high16 v2, 0x40000000 # 2.0f
invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStrokeWidth(F)V
.line 191
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
const/16 v2, -0x6800
invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V
.line 192
iget v1, v0, Landroid/graphics/Rect;->left:I
int-to-float v3, v1
iget v1, v0, Landroid/graphics/Rect;->top:I
int-to-float v4, v1
iget v1, v0, Landroid/graphics/Rect;->right:I
int-to-float v5, v1
iget v1, v0, Landroid/graphics/Rect;->bottom:I
int-to-float v6, v1
iget-object v7, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
move-object v2, p1
invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
.line 195
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
sget-object v2, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;
invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
.line 196
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
iget v2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mOverlayColor:I
invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V
.line 197
iget v1, v0, Landroid/graphics/Rect;->left:I
int-to-float v3, v1
iget v1, v0, Landroid/graphics/Rect;->top:I
int-to-float v4, v1
iget v1, v0, Landroid/graphics/Rect;->right:I
int-to-float v5, v1
iget v1, v0, Landroid/graphics/Rect;->bottom:I
int-to-float v6, v1
iget-object v7, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
move-object v2, p1
invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
.line 200
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
sget-object v2, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;
invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
.line 201
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
const/4 v2, 0x0
invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setStrokeWidth(F)V
.line 202
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mPaint:Landroid/graphics/Paint;
const/4 v2, -0x1
invoke-virtual {v1, v2}, Landroid/graphics/Paint;->setColor(I)V
.line 204
iget v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mStartTextXPx:I
iput v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mCurrentTextXPx:I
.line 205
iget v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mStartTextYPx:I
iput v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mCurrentTextYPx:I
.line 207
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mImageId:Ljava/lang/String;
const/4 v2, 0x2
const/4 v3, 0x1
const/4 v4, 0x0
if-eqz v1, :cond_81
new-array v5, v2, [Ljava/lang/Object;
.line 208
iget-object v6, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mControllerId:Ljava/lang/String;
aput-object v6, v5, v4
aput-object v1, v5, v3
const-string v1, "%s, %s"
invoke-static {v1, v5}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
const-string v5, "IDs"
invoke-direct {p0, p1, v5, v1}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_88
.line 210
:cond_81
iget-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mControllerId:Ljava/lang/String;
const-string v5, "ID"
invoke-direct {p0, p1, v5, v1}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;)V
:goto_88
new-array v1, v2, [Ljava/lang/Object;
.line 212
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v5
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
aput-object v5, v1, v4
invoke-virtual {v0}, Landroid/graphics/Rect;->height()I
move-result v0
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
aput-object v0, v1, v3
const-string v0, "%dx%d"
invoke-static {v0, v1}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
const-string v5, "D"
invoke-direct {p0, p1, v5, v1}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;)V
.line 215
iget v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mWidthPx:I
iget v5, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mHeightPx:I
iget-object v6, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mScaleType:Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;
invoke-virtual {p0, v1, v5, v6}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->determineSizeHintColor(IILcom/facebook/drawee/drawable/ScalingUtils$ScaleType;)I
move-result v1
new-array v5, v2, [Ljava/lang/Object;
.line 216
iget v6, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mWidthPx:I
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v6
aput-object v6, v5, v4
iget v6, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mHeightPx:I
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v6
aput-object v6, v5, v3
invoke-static {v0, v5}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
const-string v5, "I"
invoke-direct {p0, p1, v5, v0, v1}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;I)V
new-array v0, v3, [Ljava/lang/Object;
.line 218
iget v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mImageSizeBytes:I
div-int/lit16 v1, v1, 0x400
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v4
const-string v1, "%d KiB"
invoke-static {v1, v0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-direct {p0, p1, v5, v0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;)V
.line 219
iget-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mImageFormat:Ljava/lang/String;
if-eqz v0, :cond_ec
const-string v1, "i format"
.line 220
invoke-direct {p0, p1, v1, v0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;)V
.line 222
:cond_ec
iget v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mFrameCount:I
if-lez v0, :cond_10b
new-array v1, v2, [Ljava/lang/Object;
.line 223
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
aput-object v0, v1, v4
iget v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mLoopCount:I
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
aput-object v0, v1, v3
const-string v0, "f %d, l %d"
invoke-static {v0, v1}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
const-string v1, "anim"
invoke-direct {p0, p1, v1, v0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;)V
.line 225
:cond_10b
iget-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mScaleType:Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;
if-eqz v0, :cond_114
const-string v1, "scale"
.line 226
invoke-direct {p0, p1, v1, v0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/Object;)V
.line 228
:cond_114
iget-wide v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mFinalImageTimeMs:J
const-wide/16 v5, 0x0
cmp-long v2, v0, v5
if-ltz v2, :cond_12f
new-array v2, v3, [Ljava/lang/Object;
.line 229
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
aput-object v0, v2, v4
const-string v0, "%d ms"
invoke-static {v0, v2}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
const-string v1, "t"
invoke-direct {p0, p1, v1, v0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;)V
.line 231
:cond_12f
iget-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mOriginText:Ljava/lang/String;
if-eqz v0, :cond_13a
.line 232
iget v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mOriginColor:I
const-string v2, "origin"
invoke-direct {p0, p1, v2, v0, v1}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;I)V
.line 234
:cond_13a
iget-object v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mAdditionalData:Ljava/util/HashMap;
invoke-virtual {v0}, Ljava/util/HashMap;->entrySet()Ljava/util/Set;
move-result-object v0
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_144
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_160
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/util/Map$Entry;
.line 235
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
invoke-direct {p0, p1, v2, v1}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->addDebugText(Landroid/graphics/Canvas;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_144
:cond_160
return-void
.end method
.method public getOpacity()I
.registers 2
const/4 v0, -0x3
return v0
.end method
.method protected onBoundsChange(Landroid/graphics/Rect;)V
.registers 4
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"bounds"
}
.end annotation
.line 176
invoke-super {p0, p1}, Landroid/graphics/drawable/Drawable;->onBoundsChange(Landroid/graphics/Rect;)V
const/16 v0, 0x9
const/16 v1, 0x8
.line 181
invoke-direct {p0, p1, v0, v1}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->prepareDebugTextParameters(Landroid/graphics/Rect;II)V
return-void
.end method
.method public onFinalImageSet(J)V
.registers 3
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"finalImageTimeMs"
}
.end annotation
.line 364
iput-wide p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mFinalImageTimeMs:J
.line 365
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->invalidateSelf()V
return-void
.end method
.method public reset()V
.registers 5
const/4 v0, -0x1
.line 98
iput v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mWidthPx:I
.line 99
iput v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mHeightPx:I
.line 100
iput v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mImageSizeBytes:I
.line 101
new-instance v1, Ljava/util/HashMap;
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
iput-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mAdditionalData:Ljava/util/HashMap;
.line 102
iput v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mFrameCount:I
.line 103
iput v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mLoopCount:I
const/4 v1, 0x0
.line 104
iput-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mImageFormat:Ljava/lang/String;
.line 105
invoke-virtual {p0, v1}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->setControllerId(Ljava/lang/String;)V
const-wide/16 v2, -0x1
.line 106
iput-wide v2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mFinalImageTimeMs:J
.line 107
iput-object v1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mOriginText:Ljava/lang/String;
.line 108
iput v0, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mOriginColor:I
.line 109
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->invalidateSelf()V
return-void
.end method
.method public setAlpha(I)V
.registers 2
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"alpha"
}
.end annotation
return-void
.end method
.method public setAnimationInfo(II)V
.registers 3
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0
}
names = {
"frameCount",
"loopCount"
}
.end annotation
.line 141
iput p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mFrameCount:I
.line 142
iput p2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mLoopCount:I
.line 143
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->invalidateSelf()V
return-void
.end method
.method public setColorFilter(Landroid/graphics/ColorFilter;)V
.registers 2
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"cf"
}
.end annotation
return-void
.end method
.method public setControllerId(Ljava/lang/String;)V
.registers 2
.param p1 # Ljava/lang/String;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"controllerId"
}
.end annotation
if-eqz p1, :cond_3
goto :goto_5
:cond_3
const-string p1, "none"
.line 125
:goto_5
iput-object p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mControllerId:Ljava/lang/String;
.line 126
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->invalidateSelf()V
return-void
.end method
.method public setDimensions(II)V
.registers 3
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0
}
names = {
"widthPx",
"heightPx"
}
.end annotation
.line 135
iput p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mWidthPx:I
.line 136
iput p2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mHeightPx:I
.line 137
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->invalidateSelf()V
return-void
.end method
.method public setFinalImageTimeMs(J)V
.registers 3
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"finalImageTimeMs"
}
.end annotation
.line 359
iput-wide p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mFinalImageTimeMs:J
return-void
.end method
.method public setImageFormat(Ljava/lang/String;)V
.registers 2
.param p1 # Ljava/lang/String;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"imageFormat"
}
.end annotation
.line 162
iput-object p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mImageFormat:Ljava/lang/String;
return-void
.end method
.method public setImageId(Ljava/lang/String;)V
.registers 2
.param p1 # Ljava/lang/String;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"imageId"
}
.end annotation
.line 130
iput-object p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mImageId:Ljava/lang/String;
.line 131
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->invalidateSelf()V
return-void
.end method
.method public setImageSize(I)V
.registers 2
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"imageSizeBytes"
}
.end annotation
.line 154
iput p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mImageSizeBytes:I
return-void
.end method
.method public setOrigin(Ljava/lang/String;I)V
.registers 3
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0
}
names = {
"text",
"color"
}
.end annotation
.line 147
iput-object p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mOriginText:Ljava/lang/String;
.line 148
iput p2, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mOriginColor:I
.line 149
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->invalidateSelf()V
return-void
.end method
.method public setOverlayColor(I)V
.registers 2
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"overlayColor"
}
.end annotation
.line 171
iput p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mOverlayColor:I
return-void
.end method
.method public setScaleType(Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;)V
.registers 2
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"scaleType"
}
.end annotation
.line 166
iput-object p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mScaleType:Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;
return-void
.end method
.method public setTextGravity(I)V
.registers 2
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"textGravity"
}
.end annotation
.line 120
iput p1, p0, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->mTextGravity:I
.line 121
invoke-virtual {p0}, Lcom/facebook/drawee/debug/DebugControllerOverlayDrawable;->invalidateSelf()V
return-void
.end method