167 lines
4.3 KiB
Smali
167 lines
4.3 KiB
Smali
.class public final Lcom/facebook/drawee/drawable/h;
|
|
.super Lcom/facebook/drawee/drawable/g;
|
|
.source "MatrixDrawable.java"
|
|
|
|
|
|
# instance fields
|
|
.field private IY:Landroid/graphics/Matrix;
|
|
|
|
.field private IZ:I
|
|
|
|
.field private Ja:I
|
|
|
|
.field private mMatrix:Landroid/graphics/Matrix;
|
|
|
|
|
|
# direct methods
|
|
.method private gr()V
|
|
.locals 4
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/h;->getCurrent()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/h;->getBounds()Landroid/graphics/Rect;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I
|
|
|
|
move-result v2
|
|
|
|
iput v2, p0, Lcom/facebook/drawee/drawable/h;->IZ:I
|
|
|
|
invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
|
|
|
|
move-result v3
|
|
|
|
iput v3, p0, Lcom/facebook/drawee/drawable/h;->Ja:I
|
|
|
|
if-lez v2, :cond_1
|
|
|
|
if-gtz v3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1, v1, v2, v3}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V
|
|
|
|
iget-object v0, p0, Lcom/facebook/drawee/drawable/h;->mMatrix:Landroid/graphics/Matrix;
|
|
|
|
iput-object v0, p0, Lcom/facebook/drawee/drawable/h;->IY:Landroid/graphics/Matrix;
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setBounds(Landroid/graphics/Rect;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lcom/facebook/drawee/drawable/h;->IY:Landroid/graphics/Matrix;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final b(Landroid/graphics/Matrix;)V
|
|
.locals 1
|
|
|
|
invoke-super {p0, p1}, Lcom/facebook/drawee/drawable/g;->b(Landroid/graphics/Matrix;)V
|
|
|
|
iget-object v0, p0, Lcom/facebook/drawee/drawable/h;->IY:Landroid/graphics/Matrix;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/Matrix;->preConcat(Landroid/graphics/Matrix;)Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final draw(Landroid/graphics/Canvas;)V
|
|
.locals 2
|
|
|
|
iget v0, p0, Lcom/facebook/drawee/drawable/h;->IZ:I
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/h;->getCurrent()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I
|
|
|
|
move-result v1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
iget v0, p0, Lcom/facebook/drawee/drawable/h;->Ja:I
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/h;->getCurrent()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I
|
|
|
|
move-result v1
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/facebook/drawee/drawable/h;->gr()V
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/facebook/drawee/drawable/h;->IY:Landroid/graphics/Matrix;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p0}, Lcom/facebook/drawee/drawable/h;->getBounds()Landroid/graphics/Rect;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1, v1}, Landroid/graphics/Canvas;->clipRect(Landroid/graphics/Rect;)Z
|
|
|
|
iget-object v1, p0, Lcom/facebook/drawee/drawable/h;->IY:Landroid/graphics/Matrix;
|
|
|
|
invoke-virtual {p1, v1}, Landroid/graphics/Canvas;->concat(Landroid/graphics/Matrix;)V
|
|
|
|
invoke-super {p0, p1}, Lcom/facebook/drawee/drawable/g;->draw(Landroid/graphics/Canvas;)V
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/Canvas;->restoreToCount(I)V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
invoke-super {p0, p1}, Lcom/facebook/drawee/drawable/g;->draw(Landroid/graphics/Canvas;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final e(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
|
.locals 0
|
|
|
|
invoke-super {p0, p1}, Lcom/facebook/drawee/drawable/g;->e(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0}, Lcom/facebook/drawee/drawable/h;->gr()V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method protected final onBoundsChange(Landroid/graphics/Rect;)V
|
|
.locals 0
|
|
|
|
invoke-super {p0, p1}, Lcom/facebook/drawee/drawable/g;->onBoundsChange(Landroid/graphics/Rect;)V
|
|
|
|
invoke-direct {p0}, Lcom/facebook/drawee/drawable/h;->gr()V
|
|
|
|
return-void
|
|
.end method
|