apkfuckery/com.discord/smali/com/camerakit/preview/CameraSurfaceView.smali

251 lines
5.6 KiB
Smali
Raw Normal View History

2019-10-03 02:31:26 +00:00
.class public final Lcom/camerakit/preview/CameraSurfaceView;
.super Landroid/opengl/GLSurfaceView;
.source "CameraSurfaceView.kt"
# interfaces
.implements Landroid/opengl/GLSurfaceView$Renderer;
# instance fields
2020-04-17 16:36:30 +00:00
.field public d:Le/g/i/a;
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
.field public e:Lcom/camerakit/preview/CameraSurfaceTexture;
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
.field public nativeHandle:J
.annotation build Landroidx/annotation/Keep;
.end annotation
.end field
2019-10-03 02:31:26 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public static constructor <clinit>()V
.locals 1
2019-10-03 02:31:26 +00:00
const-string v0, "camerakit"
invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
2019-12-06 03:29:40 +00:00
.locals 0
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
if-eqz p1, :cond_0
2019-10-03 02:31:26 +00:00
invoke-direct {p0, p1}, Landroid/opengl/GLSurfaceView;-><init>(Landroid/content/Context;)V
const/4 p1, 0x2
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p1}, Landroid/opengl/GLSurfaceView;->setEGLContextClientVersion(I)V
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p0}, Landroid/opengl/GLSurfaceView;->setRenderer(Landroid/opengl/GLSurfaceView$Renderer;)V
2019-10-03 02:31:26 +00:00
const/4 p1, 0x0
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p1}, Landroid/opengl/GLSurfaceView;->setRenderMode(I)V
2019-10-03 02:31:26 +00:00
invoke-direct {p0}, Lcom/camerakit/preview/CameraSurfaceView;->nativeInit()V
return-void
2019-12-06 03:29:40 +00:00
:cond_0
const-string p1, "context"
2019-10-03 02:31:26 +00:00
2020-04-17 16:36:30 +00:00
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
const/4 p1, 0x0
throw p1
2019-10-03 02:31:26 +00:00
.end method
.method private final native nativeDrawTexture(III)V
.end method
.method private final native nativeFinalize()V
.end method
.method private final native nativeInit()V
.end method
.method private final native nativeOnDrawFrame()V
.end method
.method private final native nativeOnSurfaceChanged(II)V
.end method
.method private final native nativeOnSurfaceCreated()V
.end method
.method private final native nativeRelease()V
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public finalize()V
2019-10-03 02:31:26 +00:00
.locals 0
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/Keep;
.end annotation
2019-10-03 02:31:26 +00:00
invoke-super {p0}, Landroid/opengl/GLSurfaceView;->finalize()V
:try_start_0
invoke-direct {p0}, Lcom/camerakit/preview/CameraSurfaceView;->nativeFinalize()V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-void
.end method
2020-04-17 16:36:30 +00:00
.method public final getCameraSurfaceTextureListener()Le/g/i/a;
2019-10-03 02:31:26 +00:00
.locals 1
2020-04-17 16:36:30 +00:00
iget-object v0, p0, Lcom/camerakit/preview/CameraSurfaceView;->d:Le/g/i/a;
2019-10-03 02:31:26 +00:00
return-object v0
.end method
2019-12-06 03:29:40 +00:00
.method public onDrawFrame(Ljavax/microedition/khronos/opengles/GL10;)V
2019-10-03 02:31:26 +00:00
.locals 2
2019-12-06 03:29:40 +00:00
if-eqz p1, :cond_1
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
iget-object p1, p0, Lcom/camerakit/preview/CameraSurfaceView;->e:Lcom/camerakit/preview/CameraSurfaceTexture;
2019-10-03 02:31:26 +00:00
if-eqz p1, :cond_0
invoke-direct {p0}, Lcom/camerakit/preview/CameraSurfaceView;->nativeOnDrawFrame()V
invoke-virtual {p1}, Lcom/camerakit/preview/CameraSurfaceTexture;->updateTexImage()V
2019-12-06 03:29:40 +00:00
invoke-virtual {p1}, Lcom/camerakit/preview/CameraSurfaceTexture;->a()I
move-result v0
2020-04-17 16:36:30 +00:00
invoke-virtual {p1}, Lcom/camerakit/preview/CameraSurfaceTexture;->b()Le/g/j/c;
2019-12-06 03:29:40 +00:00
move-result-object v1
2019-10-03 02:31:26 +00:00
2020-04-17 16:36:30 +00:00
iget v1, v1, Le/g/j/c;->d:I
2019-10-03 02:31:26 +00:00
2020-04-17 16:36:30 +00:00
invoke-virtual {p1}, Lcom/camerakit/preview/CameraSurfaceTexture;->b()Le/g/j/c;
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
move-result-object p1
2019-10-03 02:31:26 +00:00
2020-04-17 16:36:30 +00:00
iget p1, p1, Le/g/j/c;->e:I
2019-10-03 02:31:26 +00:00
invoke-direct {p0, v0, v1, p1}, Lcom/camerakit/preview/CameraSurfaceView;->nativeDrawTexture(III)V
:cond_0
return-void
2019-12-06 03:29:40 +00:00
:cond_1
const-string p1, "gl"
2020-04-17 16:36:30 +00:00
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
const/4 p1, 0x0
throw p1
2019-10-03 02:31:26 +00:00
.end method
2019-12-06 03:29:40 +00:00
.method public onPause()V
2019-10-03 02:31:26 +00:00
.locals 0
invoke-super {p0}, Landroid/opengl/GLSurfaceView;->onPause()V
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public onResume()V
2019-10-03 02:31:26 +00:00
.locals 0
invoke-super {p0}, Landroid/opengl/GLSurfaceView;->onResume()V
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public onSurfaceChanged(Ljavax/microedition/khronos/opengles/GL10;II)V
.locals 0
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
if-eqz p1, :cond_0
2019-10-03 02:31:26 +00:00
invoke-direct {p0, p2, p3}, Lcom/camerakit/preview/CameraSurfaceView;->nativeOnSurfaceChanged(II)V
return-void
2019-12-06 03:29:40 +00:00
:cond_0
const-string p1, "gl"
2020-04-17 16:36:30 +00:00
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
const/4 p1, 0x0
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
throw p1
.end method
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
.method public onSurfaceCreated(Ljavax/microedition/khronos/opengles/GL10;Ljavax/microedition/khronos/egl/EGLConfig;)V
.locals 2
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
const/4 v0, 0x0
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
if-eqz p1, :cond_1
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
if-eqz p2, :cond_0
2019-10-03 02:31:26 +00:00
2019-12-06 03:29:40 +00:00
new-instance p1, Lcom/camerakit/preview/CameraSurfaceView$a;
invoke-direct {p1, p0}, Lcom/camerakit/preview/CameraSurfaceView$a;-><init>(Lcom/camerakit/preview/CameraSurfaceView;)V
2019-10-03 02:31:26 +00:00
const/4 p2, 0x2
new-array v0, p2, [I
const/4 v1, 0x0
invoke-static {p2, v0, v1}, Landroid/opengl/GLES20;->glGenTextures(I[II)V
aget p2, v0, v1
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p2
const/4 v1, 0x1
aget v0, v0, v1
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
invoke-interface {p1, p2, v0}, Lkotlin/jvm/functions/Function2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
invoke-direct {p0}, Lcom/camerakit/preview/CameraSurfaceView;->nativeOnSurfaceCreated()V
return-void
2019-12-06 03:29:40 +00:00
:cond_0
const-string p1, "config"
2020-04-17 16:36:30 +00:00
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
throw v0
:cond_1
const-string p1, "gl"
2020-04-17 16:36:30 +00:00
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
throw v0
2019-10-03 02:31:26 +00:00
.end method
2020-04-17 16:36:30 +00:00
.method public final setCameraSurfaceTextureListener(Le/g/i/a;)V
2019-10-03 02:31:26 +00:00
.locals 0
2020-04-17 16:36:30 +00:00
iput-object p1, p0, Lcom/camerakit/preview/CameraSurfaceView;->d:Le/g/i/a;
2019-10-03 02:31:26 +00:00
return-void
.end method