.class public Lcom/bumptech/glide/gifdecoder/StandardGifDecoder; .super Ljava/lang/Object; .source "StandardGifDecoder.java" # interfaces .implements Lcom/bumptech/glide/gifdecoder/GifDecoder; # static fields .field private static final BYTES_PER_INTEGER:I = 0x4 .field private static final COLOR_TRANSPARENT_BLACK:I = 0x0 .field private static final INITIAL_FRAME_POINTER:I = -0x1 .field private static final MASK_INT_LOWEST_BYTE:I = 0xff .field private static final MAX_STACK_SIZE:I = 0x1000 .field private static final NULL_CODE:I = -0x1 .field private static final TAG:Ljava/lang/String; = "StandardGifDecoder" # instance fields .field private act:[I .field private bitmapConfig:Landroid/graphics/Bitmap$Config; .field private final bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; .field private block:[B .field private downsampledHeight:I .field private downsampledWidth:I .field private framePointer:I .field private header:Lcom/bumptech/glide/gifdecoder/GifHeader; .field private isFirstFrameTransparent:Ljava/lang/Boolean; .field private mainPixels:[B .field private mainScratch:[I .field private parser:Lcom/bumptech/glide/gifdecoder/GifHeaderParser; .field private final pct:[I .field private pixelStack:[B .field private prefix:[S .field private previousImage:Landroid/graphics/Bitmap; .field private rawData:Ljava/nio/ByteBuffer; .field private sampleSize:I .field private savePrevious:Z .field private status:I .field private suffix:[B # direct methods .method static constructor ()V .registers 0 return-void .end method .method public constructor (Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;)V .registers 3 .line 137 invoke-direct {p0}, Ljava/lang/Object;->()V const/16 v0, 0x100 .line 87 new-array v0, v0, [I iput-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->pct:[I .line 119 sget-object v0, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config; iput-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapConfig:Landroid/graphics/Bitmap$Config; .line 138 iput-object p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; .line 139 new-instance p1, Lcom/bumptech/glide/gifdecoder/GifHeader; invoke-direct {p1}, Lcom/bumptech/glide/gifdecoder/GifHeader;->()V iput-object p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; return-void .end method .method public constructor (Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;Lcom/bumptech/glide/gifdecoder/GifHeader;Ljava/nio/ByteBuffer;)V .registers 5 const/4 v0, 0x1 .line 126 invoke-direct {p0, p1, p2, p3, v0}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->(Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;Lcom/bumptech/glide/gifdecoder/GifHeader;Ljava/nio/ByteBuffer;I)V return-void .end method .method public constructor (Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;Lcom/bumptech/glide/gifdecoder/GifHeader;Ljava/nio/ByteBuffer;I)V .registers 5 .line 132 invoke-direct {p0, p1}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->(Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;)V .line 133 invoke-virtual {p0, p2, p3, p4}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->setData(Lcom/bumptech/glide/gifdecoder/GifHeader;Ljava/nio/ByteBuffer;I)V return-void .end method .method private averageColorsNear(III)I .registers 13 const/4 v0, 0x0 move v1, p1 move v2, v0 move v3, v2 move v4, v3 move v5, v4 move v6, v5 .line 653 :goto_7 iget v7, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I add-int/2addr v7, p1 if-ge v1, v7, :cond_34 iget-object v7, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainPixels:[B array-length v8, v7 if-ge v1, v8, :cond_34 if-ge v1, p2, :cond_34 .line 654 aget-byte v7, v7, v1 and-int/lit16 v7, v7, 0xff .line 655 iget-object v8, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->act:[I aget v7, v8, v7 if-eqz v7, :cond_31 shr-int/lit8 v8, v7, 0x18 and-int/lit16 v8, v8, 0xff add-int/2addr v2, v8 shr-int/lit8 v8, v7, 0x10 and-int/lit16 v8, v8, 0xff add-int/2addr v3, v8 shr-int/lit8 v8, v7, 0x8 and-int/lit16 v8, v8, 0xff add-int/2addr v4, v8 and-int/lit16 v7, v7, 0xff add-int/2addr v5, v7 add-int/lit8 v6, v6, 0x1 :cond_31 add-int/lit8 v1, v1, 0x1 goto :goto_7 :cond_34 add-int/2addr p1, p3 move p3, p1 .line 667 :goto_36 iget v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I add-int/2addr v1, p1 if-ge p3, v1, :cond_63 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainPixels:[B array-length v7, v1 if-ge p3, v7, :cond_63 if-ge p3, p2, :cond_63 .line 668 aget-byte v1, v1, p3 and-int/lit16 v1, v1, 0xff .line 669 iget-object v7, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->act:[I aget v1, v7, v1 if-eqz v1, :cond_60 shr-int/lit8 v7, v1, 0x18 and-int/lit16 v7, v7, 0xff add-int/2addr v2, v7 shr-int/lit8 v7, v1, 0x10 and-int/lit16 v7, v7, 0xff add-int/2addr v3, v7 shr-int/lit8 v7, v1, 0x8 and-int/lit16 v7, v7, 0xff add-int/2addr v4, v7 and-int/lit16 v1, v1, 0xff add-int/2addr v5, v1 add-int/lit8 v6, v6, 0x1 :cond_60 add-int/lit8 p3, p3, 0x1 goto :goto_36 :cond_63 if-nez v6, :cond_66 return v0 .line 681 :cond_66 div-int/2addr v2, v6 shl-int/lit8 p1, v2, 0x18 div-int/2addr v3, v6 shl-int/lit8 p2, v3, 0x10 or-int/2addr p1, p2 div-int/2addr v4, v6 shl-int/lit8 p2, v4, 0x8 or-int/2addr p1, p2 div-int/2addr v5, v6 or-int/2addr p1, v5 return p1 .end method .method private copyCopyIntoScratchRobust(Lcom/bumptech/glide/gifdecoder/GifFrame;)V .registers 26 move-object/from16 v0, p0 move-object/from16 v1, p1 .line 547 iget-object v2, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainScratch:[I .line 548 iget v3, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->ih:I iget v4, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I div-int/2addr v3, v4 .line 549 iget v4, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->iy:I iget v5, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I div-int/2addr v4, v5 .line 550 iget v5, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->iw:I iget v6, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I div-int/2addr v5, v6 .line 551 iget v6, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->ix:I iget v7, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I div-int/2addr v6, v7 .line 556 iget v8, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I const/4 v9, 0x1 .line 610 invoke-static {v9}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object v10 if-nez v8, :cond_25 move v8, v9 goto :goto_26 :cond_25 const/4 v8, 0x0 .line 558 :goto_26 iget v12, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledWidth:I .line 559 iget v13, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledHeight:I .line 560 iget-object v14, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainPixels:[B .line 561 iget-object v15, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->act:[I .line 563 iget-object v11, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->isFirstFrameTransparent:Ljava/lang/Boolean; const/16 v16, 0x8 move/from16 v19, v9 move-object/from16 v18, v10 const/4 v9, 0x0 const/4 v10, 0x0 :goto_38 if-ge v9, v3, :cond_dc move-object/from16 v20, v11 .line 566 iget-boolean v11, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->interlace:Z if-eqz v11, :cond_67 if-lt v10, v3, :cond_62 add-int/lit8 v11, v19, 0x1 move/from16 v21, v3 const/4 v3, 0x2 if-eq v11, v3, :cond_5f const/4 v3, 0x3 if-eq v11, v3, :cond_58 const/4 v3, 0x4 if-eq v11, v3, :cond_52 :goto_4f move/from16 v19, v11 goto :goto_64 :cond_52 move/from16 v19, v11 const/4 v10, 0x1 const/16 v16, 0x2 goto :goto_64 :cond_58 const/4 v3, 0x4 move/from16 v16, v3 move/from16 v19, v11 const/4 v10, 0x2 goto :goto_64 :cond_5f const/4 v3, 0x4 move v10, v3 goto :goto_4f :cond_62 move/from16 v21, v3 :goto_64 add-int v3, v10, v16 goto :goto_6b :cond_67 move/from16 v21, v3 move v3, v10 move v10, v9 :goto_6b add-int/2addr v10, v4 const/4 v11, 0x1 if-ne v7, v11, :cond_72 move/from16 v17, v11 goto :goto_74 :cond_72 const/16 v17, 0x0 :goto_74 if-ge v10, v13, :cond_c8 mul-int/2addr v10, v12 add-int v22, v10, v6 add-int v11, v22, v5 add-int/2addr v10, v12 if-ge v10, v11, :cond_7f move v11, v10 :cond_7f mul-int v10, v9, v7 move/from16 v23, v3 .line 601 iget v3, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->iw:I mul-int/2addr v10, v3 if-eqz v17, :cond_a5 move/from16 v3, v22 :goto_8a if-ge v3, v11, :cond_ca move/from16 v17, v4 .line 605 aget-byte v4, v14, v10 and-int/lit16 v4, v4, 0xff .line 606 aget v4, v15, v4 if-eqz v4, :cond_99 .line 608 aput v4, v2, v3 goto :goto_9f :cond_99 if-eqz v8, :cond_9f if-nez v20, :cond_9f move-object/from16 v20, v18 :cond_9f :goto_9f add-int/2addr v10, v7 add-int/lit8 v3, v3, 0x1 move/from16 v4, v17 goto :goto_8a :cond_a5 move/from16 v17, v4 sub-int v3, v11, v22 mul-int/2addr v3, v7 add-int/2addr v3, v10 move/from16 v4, v22 :goto_ad move/from16 v22, v5 if-ge v4, v11, :cond_ce .line 622 iget v5, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->iw:I invoke-direct {v0, v10, v3, v5}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->averageColorsNear(III)I move-result v5 if-eqz v5, :cond_bc .line 624 aput v5, v2, v4 goto :goto_c2 :cond_bc if-eqz v8, :cond_c2 if-nez v20, :cond_c2 move-object/from16 v20, v18 :cond_c2 :goto_c2 add-int/2addr v10, v7 add-int/lit8 v4, v4, 0x1 move/from16 v5, v22 goto :goto_ad :cond_c8 move/from16 v23, v3 :cond_ca move/from16 v17, v4 move/from16 v22, v5 :cond_ce move-object/from16 v11, v20 add-int/lit8 v9, v9, 0x1 move/from16 v4, v17 move/from16 v3, v21 move/from16 v5, v22 move/from16 v10, v23 goto/16 :goto_38 :cond_dc move-object/from16 v20, v11 .line 635 iget-object v1, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->isFirstFrameTransparent:Ljava/lang/Boolean; if-nez v1, :cond_f0 if-nez v20, :cond_e6 const/4 v11, 0x0 goto :goto_ea .line 637 :cond_e6 invoke-virtual/range {v20 .. v20}, Ljava/lang/Boolean;->booleanValue()Z move-result v11 .line 636 :goto_ea invoke-static {v11}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object v1 iput-object v1, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->isFirstFrameTransparent:Ljava/lang/Boolean; :cond_f0 return-void .end method .method private copyIntoScratchFast(Lcom/bumptech/glide/gifdecoder/GifFrame;)V .registers 20 move-object/from16 v0, p0 move-object/from16 v1, p1 .line 501 iget-object v2, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainScratch:[I .line 502 iget v3, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->ih:I .line 503 iget v4, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->iy:I .line 504 iget v5, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->iw:I .line 505 iget v6, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->ix:I .line 507 iget v7, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I if-nez v7, :cond_14 const/4 v7, 0x1 goto :goto_15 :cond_14 const/4 v7, 0x0 .line 508 :goto_15 iget v10, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledWidth:I .line 509 iget-object v11, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainPixels:[B .line 510 iget-object v12, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->act:[I const/4 v14, 0x0 const/4 v15, -0x1 :goto_1d if-ge v14, v3, :cond_53 add-int v16, v14, v4 mul-int v16, v16, v10 add-int v17, v16, v6 add-int v8, v17, v5 add-int v9, v16, v10 if-ge v9, v8, :cond_2c move v8, v9 .line 524 :cond_2c iget v9, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->iw:I mul-int/2addr v9, v14 move/from16 v13, v17 :goto_31 if-ge v13, v8, :cond_4c .line 527 aget-byte v1, v11, v9 move/from16 v17, v3 and-int/lit16 v3, v1, 0xff if-eq v3, v15, :cond_43 .line 530 aget v3, v12, v3 if-eqz v3, :cond_42 .line 532 aput v3, v2, v13 goto :goto_43 :cond_42 move v15, v1 :cond_43 :goto_43 add-int/lit8 v9, v9, 0x1 add-int/lit8 v13, v13, 0x1 move-object/from16 v1, p1 move/from16 v3, v17 goto :goto_31 :cond_4c move/from16 v17, v3 add-int/lit8 v14, v14, 0x1 move-object/from16 v1, p1 goto :goto_1d .line 542 :cond_53 iget-object v1, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->isFirstFrameTransparent:Ljava/lang/Boolean; if-nez v1, :cond_5e if-eqz v7, :cond_5e const/4 v1, -0x1 if-eq v15, v1, :cond_5e const/4 v8, 0x1 goto :goto_5f :cond_5e const/4 v8, 0x0 .line 543 :goto_5f invoke-static {v8}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object v1 iput-object v1, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->isFirstFrameTransparent:Ljava/lang/Boolean; return-void .end method .method private decodeBitmapData(Lcom/bumptech/glide/gifdecoder/GifFrame;)V .registers 30 move-object/from16 v0, p0 move-object/from16 v1, p1 if-eqz v1, :cond_d .line 694 iget-object v2, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->rawData:Ljava/nio/ByteBuffer; iget v3, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->bufferFrameStart:I invoke-virtual {v2, v3}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer; :cond_d if-nez v1, :cond_19 .line 697 iget-object v1, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v1, v1, Lcom/bumptech/glide/gifdecoder/GifHeader;->width:I iget-object v2, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v2, v2, Lcom/bumptech/glide/gifdecoder/GifHeader;->height:I mul-int/2addr v1, v2 goto :goto_1e :cond_19 iget v2, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->iw:I iget v1, v1, Lcom/bumptech/glide/gifdecoder/GifFrame;->ih:I mul-int/2addr v1, v2 .line 701 :goto_1e iget-object v2, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainPixels:[B if-eqz v2, :cond_25 array-length v2, v2 if-ge v2, v1, :cond_2d .line 703 :cond_25 iget-object v2, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; invoke-interface {v2, v1}, Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;->obtainByteArray(I)[B move-result-object v2 iput-object v2, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainPixels:[B .line 705 :cond_2d iget-object v2, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainPixels:[B .line 706 iget-object v3, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->prefix:[S const/16 v4, 0x1000 if-nez v3, :cond_39 .line 707 new-array v3, v4, [S iput-object v3, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->prefix:[S .line 709 :cond_39 iget-object v3, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->prefix:[S .line 710 iget-object v5, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->suffix:[B if-nez v5, :cond_43 .line 711 new-array v5, v4, [B iput-object v5, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->suffix:[B .line 713 :cond_43 iget-object v5, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->suffix:[B .line 714 iget-object v6, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->pixelStack:[B if-nez v6, :cond_4f const/16 v6, 0x1001 .line 715 new-array v6, v6, [B iput-object v6, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->pixelStack:[B .line 717 :cond_4f iget-object v6, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->pixelStack:[B .line 720 invoke-direct/range {p0 .. p0}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->readByte()I move-result v7 const/4 v8, 0x1 shl-int v9, v8, v7 add-int/lit8 v10, v9, 0x1 add-int/lit8 v11, v9, 0x2 add-int/2addr v7, v8 shl-int v12, v8, v7 sub-int/2addr v12, v8 const/4 v13, 0x0 move v14, v13 :goto_62 if-ge v14, v9, :cond_6c .line 730 aput-short v13, v3, v14 int-to-byte v15, v14 .line 731 aput-byte v15, v5, v14 add-int/lit8 v14, v14, 0x1 goto :goto_62 .line 733 :cond_6c iget-object v14, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->block:[B const/4 v15, -0x1 move/from16 v23, v7 move/from16 v21, v11 move/from16 v22, v12 move/from16 v16, v13 move/from16 v17, v16 move/from16 v18, v17 move/from16 v19, v18 move/from16 v20, v19 move/from16 v25, v20 move/from16 v26, v25 move/from16 v24, v15 :goto_85 if-ge v13, v1, :cond_14e if-nez v16, :cond_96 .line 739 invoke-direct/range {p0 .. p0}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->readBlock()I move-result v16 if-gtz v16, :cond_94 const/4 v3, 0x3 .line 741 iput v3, v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I goto/16 :goto_14e :cond_94 const/16 v17, 0x0 .line 747 :cond_96 aget-byte v4, v14, v17 and-int/lit16 v4, v4, 0xff shl-int v4, v4, v18 add-int v19, v19, v4 add-int/lit8 v18, v18, 0x8 add-int/lit8 v17, v17, 0x1 add-int/lit8 v16, v16, -0x1 move/from16 v4, v18 move/from16 v8, v21 move/from16 v15, v23 move/from16 v0, v24 move/from16 v23, v7 move/from16 v7, v25 :goto_b0 if-lt v4, v15, :cond_138 move/from16 v24, v11 and-int v11, v19, v22 shr-int v19, v19, v15 sub-int/2addr v4, v15 if-ne v11, v9, :cond_c4 move/from16 v22, v12 move/from16 v15, v23 move/from16 v8, v24 move v11, v8 const/4 v0, -0x1 goto :goto_b0 :cond_c4 if-ne v11, v10, :cond_db move/from16 v18, v4 move/from16 v25, v7 move/from16 v21, v8 move/from16 v7, v23 move/from16 v11, v24 const/16 v4, 0x1000 const/4 v8, 0x1 move/from16 v24, v0 move/from16 v23, v15 const/4 v15, -0x1 move-object/from16 v0, p0 goto :goto_85 :cond_db move/from16 v25, v4 const/4 v4, -0x1 if-ne v0, v4, :cond_ef .line 769 aget-byte v0, v5, v11 aput-byte v0, v2, v20 add-int/lit8 v20, v20, 0x1 add-int/lit8 v13, v13, 0x1 move v0, v11 move v7, v0 move/from16 v11, v24 move/from16 v4, v25 goto :goto_b0 :cond_ef if-lt v11, v8, :cond_f8 int-to-byte v7, v7 .line 779 aput-byte v7, v6, v26 add-int/lit8 v26, v26, 0x1 move v7, v0 goto :goto_f9 :cond_f8 move v7, v11 :goto_f9 if-lt v7, v9, :cond_104 .line 785 aget-byte v21, v5, v7 aput-byte v21, v6, v26 add-int/lit8 v26, v26, 0x1 .line 787 aget-short v7, v3, v7 goto :goto_f9 .line 789 :cond_104 aget-byte v7, v5, v7 and-int/lit16 v7, v7, 0xff int-to-byte v4, v7 .line 791 aput-byte v4, v2, v20 :goto_10b add-int/lit8 v20, v20, 0x1 add-int/lit8 v13, v13, 0x1 if-lez v26, :cond_118 add-int/lit8 v26, v26, -0x1 .line 797 aget-byte v27, v6, v26 aput-byte v27, v2, v20 goto :goto_10b :cond_118 move-object/from16 v27, v6 const/16 v6, 0x1000 if-ge v8, v6, :cond_12f int-to-short v0, v0 .line 804 aput-short v0, v3, v8 .line 805 aput-byte v4, v5, v8 add-int/lit8 v8, v8, 0x1 and-int v0, v8, v22 if-nez v0, :cond_12f if-ge v8, v6, :cond_12f add-int/lit8 v15, v15, 0x1 add-int v22, v22, v8 :cond_12f move v0, v11 move/from16 v11, v24 move/from16 v4, v25 move-object/from16 v6, v27 goto/16 :goto_b0 :cond_138 move/from16 v25, v4 move/from16 v24, v0 move/from16 v21, v8 move/from16 v18, v25 const/16 v4, 0x1000 const/4 v8, 0x1 move-object/from16 v0, p0 move/from16 v25, v7 move/from16 v7, v23 move/from16 v23, v15 const/4 v15, -0x1 goto/16 :goto_85 :cond_14e :goto_14e move/from16 v13, v20 const/4 v0, 0x0 .line 817 invoke-static {v2, v13, v1, v0}, Ljava/util/Arrays;->fill([BIIB)V return-void .end method .method private getHeaderParser()Lcom/bumptech/glide/gifdecoder/GifHeaderParser; .registers 2 .line 385 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->parser:Lcom/bumptech/glide/gifdecoder/GifHeaderParser; if-nez v0, :cond_b .line 386 new-instance v0, Lcom/bumptech/glide/gifdecoder/GifHeaderParser; invoke-direct {v0}, Lcom/bumptech/glide/gifdecoder/GifHeaderParser;->()V iput-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->parser:Lcom/bumptech/glide/gifdecoder/GifHeaderParser; .line 388 :cond_b iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->parser:Lcom/bumptech/glide/gifdecoder/GifHeaderParser; return-object v0 .end method .method private getNextBitmap()Landroid/graphics/Bitmap; .registers 5 .line 842 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->isFirstFrameTransparent:Ljava/lang/Boolean; if-eqz v0, :cond_e invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z move-result v0 if-eqz v0, :cond_b goto :goto_e :cond_b iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapConfig:Landroid/graphics/Bitmap$Config; goto :goto_10 :cond_e :goto_e sget-object v0, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config; .line 844 :goto_10 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; iget v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledWidth:I iget v3, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledHeight:I invoke-interface {v1, v2, v3, v0}, Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;->obtain(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap; move-result-object v0 const/4 v1, 0x1 .line 845 invoke-virtual {v0, v1}, Landroid/graphics/Bitmap;->setHasAlpha(Z)V return-object v0 .end method .method private readBlock()I .registers 6 .line 833 invoke-direct {p0}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->readByte()I move-result v0 if-gtz v0, :cond_7 return v0 .line 837 :cond_7 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->rawData:Ljava/nio/ByteBuffer; iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->block:[B invoke-virtual {v1}, Ljava/nio/ByteBuffer;->remaining()I move-result v3 invoke-static {v0, v3}, Ljava/lang/Math;->min(II)I move-result v3 const/4 v4, 0x0 invoke-virtual {v1, v2, v4, v3}, Ljava/nio/ByteBuffer;->get([BII)Ljava/nio/ByteBuffer; return v0 .end method .method private readByte()I .registers 2 .line 824 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->rawData:Ljava/nio/ByteBuffer; invoke-virtual {v0}, Ljava/nio/ByteBuffer;->get()B move-result v0 and-int/lit16 v0, v0, 0xff return v0 .end method .method private setPixels(Lcom/bumptech/glide/gifdecoder/GifFrame;Lcom/bumptech/glide/gifdecoder/GifFrame;)Landroid/graphics/Bitmap; .registers 13 .line 418 iget-object v8, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainScratch:[I const/4 v0, 0x0 if-nez p2, :cond_14 .line 422 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->previousImage:Landroid/graphics/Bitmap; if-eqz v1, :cond_e .line 423 iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; invoke-interface {v2, v1}, Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;->release(Landroid/graphics/Bitmap;)V :cond_e const/4 v1, 0x0 .line 425 iput-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->previousImage:Landroid/graphics/Bitmap; .line 426 invoke-static {v8, v0}, Ljava/util/Arrays;->fill([II)V :cond_14 const/4 v1, 0x3 if-eqz p2, :cond_22 .line 432 iget v2, p2, Lcom/bumptech/glide/gifdecoder/GifFrame;->dispose:I if-ne v2, v1, :cond_22 iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->previousImage:Landroid/graphics/Bitmap; if-nez v2, :cond_22 .line 434 invoke-static {v8, v0}, Ljava/util/Arrays;->fill([II)V :cond_22 const/4 v9, 0x1 if-eqz p2, :cond_8d .line 438 iget v2, p2, Lcom/bumptech/glide/gifdecoder/GifFrame;->dispose:I if-lez v2, :cond_8d .line 441 iget v2, p2, Lcom/bumptech/glide/gifdecoder/GifFrame;->dispose:I const/4 v3, 0x2 if-ne v2, v3, :cond_79 .line 444 iget-boolean v1, p1, Lcom/bumptech/glide/gifdecoder/GifFrame;->transparency:Z if-nez v1, :cond_45 .line 445 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v1, v1, Lcom/bumptech/glide/gifdecoder/GifHeader;->bgColor:I .line 446 iget-object v2, p1, Lcom/bumptech/glide/gifdecoder/GifFrame;->lct:[I if-eqz v2, :cond_43 iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v2, v2, Lcom/bumptech/glide/gifdecoder/GifHeader;->bgIndex:I iget v3, p1, Lcom/bumptech/glide/gifdecoder/GifFrame;->transIndex:I if-ne v2, v3, :cond_43 goto :goto_4f :cond_43 move v0, v1 goto :goto_4f .line 449 :cond_45 iget v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I if-nez v1, :cond_4f .line 453 invoke-static {v9}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object v1 iput-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->isFirstFrameTransparent:Ljava/lang/Boolean; .line 456 :cond_4f :goto_4f iget v1, p2, Lcom/bumptech/glide/gifdecoder/GifFrame;->ih:I iget v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I div-int/2addr v1, v2 .line 457 iget v2, p2, Lcom/bumptech/glide/gifdecoder/GifFrame;->iy:I iget v3, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I div-int/2addr v2, v3 .line 458 iget v3, p2, Lcom/bumptech/glide/gifdecoder/GifFrame;->iw:I iget v4, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I div-int/2addr v3, v4 .line 459 iget p2, p2, Lcom/bumptech/glide/gifdecoder/GifFrame;->ix:I iget v4, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I div-int/2addr p2, v4 .line 460 iget v4, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledWidth:I mul-int/2addr v2, v4 add-int/2addr v2, p2 mul-int/2addr v1, v4 add-int/2addr v1, v2 :goto_69 if-ge v2, v1, :cond_8d add-int p2, v2, v3 move v4, v2 :goto_6e if-ge v4, p2, :cond_75 .line 465 aput v0, v8, v4 add-int/lit8 v4, v4, 0x1 goto :goto_6e .line 462 :cond_75 iget p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledWidth:I add-int/2addr v2, p2 goto :goto_69 .line 468 :cond_79 iget p2, p2, Lcom/bumptech/glide/gifdecoder/GifFrame;->dispose:I if-ne p2, v1, :cond_8d iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->previousImage:Landroid/graphics/Bitmap; if-eqz v0, :cond_8d .line 470 iget v6, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledWidth:I const/4 v5, 0x0 iget v7, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledHeight:I const/4 v2, 0x0 const/4 v4, 0x0 move-object v1, v8 move v3, v6 invoke-virtual/range {v0 .. v7}, Landroid/graphics/Bitmap;->getPixels([IIIIIII)V .line 476 :cond_8d invoke-direct {p0, p1}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->decodeBitmapData(Lcom/bumptech/glide/gifdecoder/GifFrame;)V .line 478 iget-boolean p2, p1, Lcom/bumptech/glide/gifdecoder/GifFrame;->interlace:Z if-nez p2, :cond_9d iget p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I if-eq p2, v9, :cond_99 goto :goto_9d .line 481 :cond_99 invoke-direct {p0, p1}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->copyIntoScratchFast(Lcom/bumptech/glide/gifdecoder/GifFrame;)V goto :goto_a0 .line 479 :cond_9d :goto_9d invoke-direct {p0, p1}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->copyCopyIntoScratchRobust(Lcom/bumptech/glide/gifdecoder/GifFrame;)V .line 485 :goto_a0 iget-boolean p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->savePrevious:Z if-eqz p2, :cond_c4 iget p2, p1, Lcom/bumptech/glide/gifdecoder/GifFrame;->dispose:I if-eqz p2, :cond_ac iget p1, p1, Lcom/bumptech/glide/gifdecoder/GifFrame;->dispose:I if-ne p1, v9, :cond_c4 .line 487 :cond_ac iget-object p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->previousImage:Landroid/graphics/Bitmap; if-nez p1, :cond_b6 .line 488 invoke-direct {p0}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->getNextBitmap()Landroid/graphics/Bitmap; move-result-object p1 iput-object p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->previousImage:Landroid/graphics/Bitmap; .line 490 :cond_b6 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->previousImage:Landroid/graphics/Bitmap; iget v6, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledWidth:I const/4 v5, 0x0 iget v7, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledHeight:I const/4 v2, 0x0 const/4 v4, 0x0 move-object v1, v8 move v3, v6 invoke-virtual/range {v0 .. v7}, Landroid/graphics/Bitmap;->setPixels([IIIIIII)V .line 495 :cond_c4 invoke-direct {p0}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->getNextBitmap()Landroid/graphics/Bitmap; move-result-object p1 .line 496 iget v6, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledWidth:I const/4 v5, 0x0 iget v7, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledHeight:I const/4 v2, 0x0 const/4 v4, 0x0 move-object v0, p1 move-object v1, v8 move v3, v6 invoke-virtual/range {v0 .. v7}, Landroid/graphics/Bitmap;->setPixels([IIIIIII)V return-object p1 .end method # virtual methods .method public advance()V .registers 3 .line 165 iget v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I add-int/lit8 v0, v0, 0x1 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v1, v1, Lcom/bumptech/glide/gifdecoder/GifHeader;->frameCount:I rem-int/2addr v0, v1 iput v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I return-void .end method .method public clear()V .registers 4 const/4 v0, 0x0 .line 321 iput-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; .line 322 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainPixels:[B if-eqz v1, :cond_c .line 323 iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; invoke-interface {v2, v1}, Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;->release([B)V .line 325 :cond_c iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainScratch:[I if-eqz v1, :cond_15 .line 326 iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; invoke-interface {v2, v1}, Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;->release([I)V .line 328 :cond_15 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->previousImage:Landroid/graphics/Bitmap; if-eqz v1, :cond_1e .line 329 iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; invoke-interface {v2, v1}, Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;->release(Landroid/graphics/Bitmap;)V .line 331 :cond_1e iput-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->previousImage:Landroid/graphics/Bitmap; .line 332 iput-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->rawData:Ljava/nio/ByteBuffer; .line 333 iput-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->isFirstFrameTransparent:Ljava/lang/Boolean; .line 334 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->block:[B if-eqz v0, :cond_2d .line 335 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; invoke-interface {v1, v0}, Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;->release([B)V :cond_2d return-void .end method .method public getByteSize()I .registers 3 .line 228 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->rawData:Ljava/nio/ByteBuffer; invoke-virtual {v0}, Ljava/nio/ByteBuffer;->limit()I move-result v0 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainPixels:[B array-length v1, v1 add-int/2addr v0, v1 iget-object v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainScratch:[I array-length v1, v1 mul-int/lit8 v1, v1, 0x4 add-int/2addr v0, v1 return v0 .end method .method public getCurrentFrameIndex()I .registers 2 .line 193 iget v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I return v0 .end method .method public getData()Ljava/nio/ByteBuffer; .registers 2 .line 155 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->rawData:Ljava/nio/ByteBuffer; return-object v0 .end method .method public getDelay(I)I .registers 3 if-ltz p1, :cond_15 .line 171 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->frameCount:I if-ge p1, v0, :cond_15 .line 172 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget-object v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->frames:Ljava/util/List; invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object; move-result-object p1 check-cast p1, Lcom/bumptech/glide/gifdecoder/GifFrame; iget p1, p1, Lcom/bumptech/glide/gifdecoder/GifFrame;->delay:I goto :goto_16 :cond_15 const/4 p1, -0x1 :goto_16 return p1 .end method .method public getFrameCount()I .registers 2 .line 188 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->frameCount:I return v0 .end method .method public getHeight()I .registers 2 .line 149 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->height:I return v0 .end method .method public getLoopCount()I .registers 3 .annotation runtime Ljava/lang/Deprecated; .end annotation .line 204 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->loopCount:I const/4 v1, -0x1 if-ne v0, v1, :cond_9 const/4 v0, 0x1 return v0 .line 207 :cond_9 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->loopCount:I return v0 .end method .method public getNetscapeLoopCount()I .registers 2 .line 212 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->loopCount:I return v0 .end method .method public getNextDelay()I .registers 2 .line 179 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->frameCount:I if-lez v0, :cond_10 iget v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I if-gez v0, :cond_b goto :goto_10 .line 183 :cond_b invoke-virtual {p0, v0}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->getDelay(I)I move-result v0 return v0 :cond_10 :goto_10 const/4 v0, 0x0 return v0 .end method .method public declared-synchronized getNextFrame()Landroid/graphics/Bitmap; .registers 9 const-string v0, "No valid color table found for frame #" const-string v1, "Unable to decode frame, status=" const-string v2, "Unable to decode frame, frameCount=" monitor-enter p0 .line 234 :try_start_7 iget-object v3, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v3, v3, Lcom/bumptech/glide/gifdecoder/GifHeader;->frameCount:I const/4 v4, 0x3 const/4 v5, 0x1 if-lez v3, :cond_13 iget v3, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I if-gez v3, :cond_3d .line 235 :cond_13 sget-object v3, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->TAG:Ljava/lang/String; invoke-static {v3, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z move-result v6 if-eqz v6, :cond_3b .line 236 new-instance v6, Ljava/lang/StringBuilder; invoke-direct {v6, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v2, v2, Lcom/bumptech/glide/gifdecoder/GifHeader;->frameCount:I invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v2 const-string v6, ", framePointer=" invoke-virtual {v2, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 iget v6, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I invoke-virtual {v2, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v2 invoke-static {v3, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 241 :cond_3b iput v5, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I .line 243 :cond_3d iget v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I const/4 v3, 0x0 if-eq v2, v5, :cond_bc const/4 v6, 0x2 if-ne v2, v6, :cond_47 goto/16 :goto_bc :cond_47 const/4 v1, 0x0 .line 249 iput v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I .line 251 iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->block:[B if-nez v2, :cond_58 .line 252 iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; const/16 v6, 0xff invoke-interface {v2, v6}, Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;->obtainByteArray(I)[B move-result-object v2 iput-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->block:[B .line 255 :cond_58 iget-object v2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget-object v2, v2, Lcom/bumptech/glide/gifdecoder/GifHeader;->frames:Ljava/util/List; iget v6, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I invoke-interface {v2, v6}, Ljava/util/List;->get(I)Ljava/lang/Object; move-result-object v2 check-cast v2, Lcom/bumptech/glide/gifdecoder/GifFrame; .line 257 iget v6, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I sub-int/2addr v6, v5 if-ltz v6, :cond_74 .line 259 iget-object v7, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget-object v7, v7, Lcom/bumptech/glide/gifdecoder/GifHeader;->frames:Ljava/util/List; invoke-interface {v7, v6}, Ljava/util/List;->get(I)Ljava/lang/Object; move-result-object v6 check-cast v6, Lcom/bumptech/glide/gifdecoder/GifFrame; goto :goto_75 :cond_74 move-object v6, v3 .line 263 :goto_75 iget-object v7, v2, Lcom/bumptech/glide/gifdecoder/GifFrame;->lct:[I if-eqz v7, :cond_7c iget-object v7, v2, Lcom/bumptech/glide/gifdecoder/GifFrame;->lct:[I goto :goto_80 :cond_7c iget-object v7, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget-object v7, v7, Lcom/bumptech/glide/gifdecoder/GifHeader;->gct:[I :goto_80 iput-object v7, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->act:[I if-nez v7, :cond_a2 .line 265 sget-object v1, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->TAG:Ljava/lang/String; invoke-static {v1, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z move-result v2 if-eqz v2, :cond_9e .line 266 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 269 :cond_9e iput v5, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I :try_end_a0 .catchall {:try_start_7 .. :try_end_a0} :catchall_d8 .line 270 monitor-exit p0 return-object v3 .line 274 :cond_a2 :try_start_a2 iget-boolean v0, v2, Lcom/bumptech/glide/gifdecoder/GifFrame;->transparency:Z if-eqz v0, :cond_b6 .line 276 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->act:[I iget-object v3, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->pct:[I array-length v4, v0 invoke-static {v0, v1, v3, v1, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V .line 278 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->pct:[I iput-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->act:[I .line 280 iget v3, v2, Lcom/bumptech/glide/gifdecoder/GifFrame;->transIndex:I aput v1, v0, v3 .line 284 :cond_b6 invoke-direct {p0, v2, v6}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->setPixels(Lcom/bumptech/glide/gifdecoder/GifFrame;Lcom/bumptech/glide/gifdecoder/GifFrame;)Landroid/graphics/Bitmap; move-result-object v0 :try_end_ba .catchall {:try_start_a2 .. :try_end_ba} :catchall_d8 monitor-exit p0 return-object v0 .line 244 :cond_bc :goto_bc :try_start_bc sget-object v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->TAG:Ljava/lang/String; invoke-static {v0, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z move-result v2 if-eqz v2, :cond_d6 .line 245 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I :try_end_d6 .catchall {:try_start_bc .. :try_end_d6} :catchall_d8 .line 247 :cond_d6 monitor-exit p0 return-object v3 :catchall_d8 move-exception v0 :try_start_d9 monitor-exit p0 :try_end_da .catchall {:try_start_d9 .. :try_end_da} :catchall_d8 throw v0 .end method .method public getStatus()I .registers 2 .line 160 iget v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I return v0 .end method .method public getTotalIterationCount()I .registers 4 .line 217 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->loopCount:I const/4 v1, -0x1 const/4 v2, 0x1 if-ne v0, v1, :cond_9 return v2 .line 220 :cond_9 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->loopCount:I if-nez v0, :cond_11 const/4 v0, 0x0 return v0 .line 223 :cond_11 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->loopCount:I add-int/2addr v0, v2 return v0 .end method .method public getWidth()I .registers 2 .line 144 iget-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifHeader;->width:I return v0 .end method .method public read(Ljava/io/InputStream;I)I .registers 8 if-eqz p1, :cond_31 const/16 v0, 0x4000 if-lez p2, :cond_9 add-int/lit16 p2, p2, 0x1000 goto :goto_a :cond_9 move p2, v0 .line 292 :goto_a :try_start_a new-instance v1, Ljava/io/ByteArrayOutputStream; invoke-direct {v1, p2}, Ljava/io/ByteArrayOutputStream;->(I)V .line 294 new-array p2, v0, [B :goto_11 const/4 v2, 0x0 .line 295 invoke-virtual {p1, p2, v2, v0}, Ljava/io/InputStream;->read([BII)I move-result v3 const/4 v4, -0x1 if-eq v3, v4, :cond_1d .line 296 invoke-virtual {v1, p2, v2, v3}, Ljava/io/ByteArrayOutputStream;->write([BII)V goto :goto_11 .line 298 :cond_1d invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->flush()V .line 300 invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B move-result-object p2 invoke-virtual {p0, p2}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->read([B)I :try_end_27 .catch Ljava/io/IOException; {:try_start_a .. :try_end_27} :catch_28 goto :goto_34 :catch_28 move-exception p2 .line 302 sget-object v0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->TAG:Ljava/lang/String; const-string v1, "Error reading data from stream" invoke-static {v0, v1, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I goto :goto_34 :cond_31 const/4 p2, 0x2 .line 305 iput p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I :goto_34 if-eqz p1, :cond_42 .line 310 :try_start_36 invoke-virtual {p1}, Ljava/io/InputStream;->close()V :try_end_39 .catch Ljava/io/IOException; {:try_start_36 .. :try_end_39} :catch_3a goto :goto_42 :catch_3a move-exception p1 .line 313 sget-object p2, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->TAG:Ljava/lang/String; const-string v0, "Error closing stream" invoke-static {p2, v0, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I .line 316 :cond_42 :goto_42 iget p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I return p1 .end method .method public declared-synchronized read([B)I .registers 3 monitor-enter p0 .line 394 :try_start_1 invoke-direct {p0}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->getHeaderParser()Lcom/bumptech/glide/gifdecoder/GifHeaderParser; move-result-object v0 invoke-virtual {v0, p1}, Lcom/bumptech/glide/gifdecoder/GifHeaderParser;->setData([B)Lcom/bumptech/glide/gifdecoder/GifHeaderParser; move-result-object v0 invoke-virtual {v0}, Lcom/bumptech/glide/gifdecoder/GifHeaderParser;->parseHeader()Lcom/bumptech/glide/gifdecoder/GifHeader; move-result-object v0 iput-object v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; if-eqz p1, :cond_14 .line 396 invoke-virtual {p0, v0, p1}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->setData(Lcom/bumptech/glide/gifdecoder/GifHeader;[B)V .line 399 :cond_14 iget p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I :try_end_16 .catchall {:try_start_1 .. :try_end_16} :catchall_18 monitor-exit p0 return p1 :catchall_18 move-exception p1 :try_start_19 monitor-exit p0 :try_end_1a .catchall {:try_start_19 .. :try_end_1a} :catchall_18 throw p1 .end method .method public resetFrameIndex()V .registers 2 const/4 v0, -0x1 .line 198 iput v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I return-void .end method .method public declared-synchronized setData(Lcom/bumptech/glide/gifdecoder/GifHeader;Ljava/nio/ByteBuffer;)V .registers 4 monitor-enter p0 const/4 v0, 0x1 .line 346 :try_start_2 invoke-virtual {p0, p1, p2, v0}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->setData(Lcom/bumptech/glide/gifdecoder/GifHeader;Ljava/nio/ByteBuffer;I)V :try_end_5 .catchall {:try_start_2 .. :try_end_5} :catchall_7 .line 347 monitor-exit p0 return-void :catchall_7 move-exception p1 :try_start_8 monitor-exit p0 :try_end_9 .catchall {:try_start_8 .. :try_end_9} :catchall_7 throw p1 .end method .method public declared-synchronized setData(Lcom/bumptech/glide/gifdecoder/GifHeader;Ljava/nio/ByteBuffer;I)V .registers 6 const-string v0, "Sample size must be >=0, not: " monitor-enter p0 if-lez p3, :cond_67 .line 356 :try_start_5 invoke-static {p3}, Ljava/lang/Integer;->highestOneBit(I)I move-result p3 const/4 v0, 0x0 .line 357 iput v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->status:I .line 358 iput-object p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->header:Lcom/bumptech/glide/gifdecoder/GifHeader; const/4 v1, -0x1 .line 359 iput v1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->framePointer:I .line 361 invoke-virtual {p2}, Ljava/nio/ByteBuffer;->asReadOnlyBuffer()Ljava/nio/ByteBuffer; move-result-object p2 iput-object p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->rawData:Ljava/nio/ByteBuffer; .line 362 invoke-virtual {p2, v0}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer; .line 363 iget-object p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->rawData:Ljava/nio/ByteBuffer; sget-object v1, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder; invoke-virtual {p2, v1}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer; .line 366 iput-boolean v0, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->savePrevious:Z .line 367 iget-object p2, p1, Lcom/bumptech/glide/gifdecoder/GifHeader;->frames:Ljava/util/List; invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object p2 :cond_29 invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_3d invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/bumptech/glide/gifdecoder/GifFrame; .line 368 iget v0, v0, Lcom/bumptech/glide/gifdecoder/GifFrame;->dispose:I const/4 v1, 0x3 if-ne v0, v1, :cond_29 const/4 p2, 0x1 .line 369 iput-boolean p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->savePrevious:Z .line 374 :cond_3d iput p3, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->sampleSize:I .line 375 iget p2, p1, Lcom/bumptech/glide/gifdecoder/GifHeader;->width:I div-int/2addr p2, p3 iput p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledWidth:I .line 376 iget p2, p1, Lcom/bumptech/glide/gifdecoder/GifHeader;->height:I div-int/2addr p2, p3 iput p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledHeight:I .line 379 iget-object p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; iget p3, p1, Lcom/bumptech/glide/gifdecoder/GifHeader;->width:I iget p1, p1, Lcom/bumptech/glide/gifdecoder/GifHeader;->height:I mul-int/2addr p3, p1 invoke-interface {p2, p3}, Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;->obtainByteArray(I)[B move-result-object p1 iput-object p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainPixels:[B .line 380 iget-object p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapProvider:Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider; iget p2, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledWidth:I iget p3, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->downsampledHeight:I mul-int/2addr p2, p3 invoke-interface {p1, p2}, Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;->obtainIntArray(I)[I move-result-object p1 iput-object p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->mainScratch:[I :try_end_63 .catchall {:try_start_5 .. :try_end_63} :catchall_65 .line 381 monitor-exit p0 return-void :catchall_65 move-exception p1 goto :goto_7a .line 353 :cond_67 :try_start_67 new-instance p1, Ljava/lang/IllegalArgumentException; new-instance p2, Ljava/lang/StringBuilder; invoke-direct {p2, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object p2 invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p2 invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw p1 :goto_7a monitor-exit p0 :try_end_7b .catchall {:try_start_67 .. :try_end_7b} :catchall_65 throw p1 .end method .method public declared-synchronized setData(Lcom/bumptech/glide/gifdecoder/GifHeader;[B)V .registers 3 monitor-enter p0 .line 341 :try_start_1 invoke-static {p2}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer; move-result-object p2 invoke-virtual {p0, p1, p2}, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->setData(Lcom/bumptech/glide/gifdecoder/GifHeader;Ljava/nio/ByteBuffer;)V :try_end_8 .catchall {:try_start_1 .. :try_end_8} :catchall_a .line 342 monitor-exit p0 return-void :catchall_a move-exception p1 :try_start_b monitor-exit p0 :try_end_c .catchall {:try_start_b .. :try_end_c} :catchall_a throw p1 .end method .method public setDefaultBitmapConfig(Landroid/graphics/Bitmap$Config;)V .registers 5 .line 404 sget-object v0, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config; if-eq p1, v0, :cond_36 sget-object v0, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config; if-ne p1, v0, :cond_9 goto :goto_36 .line 405 :cond_9 new-instance v0, Ljava/lang/IllegalArgumentException; new-instance v1, Ljava/lang/StringBuilder; const-string v2, "Unsupported format: " invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p1 const-string v1, ", must be one of " invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 sget-object v1, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config; invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p1 const-string v1, " or " invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 sget-object v1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config; invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v0 .line 409 :cond_36 :goto_36 iput-object p1, p0, Lcom/bumptech/glide/gifdecoder/StandardGifDecoder;->bitmapConfig:Landroid/graphics/Bitmap$Config; return-void .end method