86 lines
2.3 KiB
Smali
86 lines
2.3 KiB
Smali
.class public final Lcom/discord/utilities/fresco/GrayscalePostprocessor;
|
|
.super Lf/g/j/q/a;
|
|
.source "GrayscalePostprocessor.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lf/g/j/q/a;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getName()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const-class v0, Lcom/discord/utilities/fresco/GrayscalePostprocessor;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "javaClass.simpleName"
|
|
|
|
invoke-static {v0, v1}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getPostprocessorCacheKey()Lcom/facebook/cache/common/CacheKey;
|
|
.locals 2
|
|
|
|
new-instance v0, Lf/g/b/a/f;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/fresco/GrayscalePostprocessor;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Lf/g/b/a/f;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public process(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;)V
|
|
.locals 4
|
|
|
|
invoke-super {p0, p1, p2}, Lf/g/j/q/a;->process(Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;)V
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance v0, Landroid/graphics/ColorMatrix;
|
|
|
|
invoke-direct {v0}, Landroid/graphics/ColorMatrix;-><init>()V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/ColorMatrix;->setSaturation(F)V
|
|
|
|
new-instance v2, Landroid/graphics/Paint;
|
|
|
|
invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V
|
|
|
|
new-instance v3, Landroid/graphics/ColorMatrixColorFilter;
|
|
|
|
invoke-direct {v3, v0}, Landroid/graphics/ColorMatrixColorFilter;-><init>(Landroid/graphics/ColorMatrix;)V
|
|
|
|
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColorFilter(Landroid/graphics/ColorFilter;)Landroid/graphics/ColorFilter;
|
|
|
|
new-instance v0, Landroid/graphics/Canvas;
|
|
|
|
invoke-direct {v0, p1}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
|
|
|
|
invoke-virtual {v0, p2, v1, v1, v2}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|