210 lines
5.6 KiB
Smali
210 lines
5.6 KiB
Smali
.class public Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20;
|
|
.super Lcom/badlogic/gdx/backends/android/surfaceview/GLTextureView;
|
|
.source "GLSurfaceView20.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20$ConfigChooser;,
|
|
Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20$ContextFactory;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field static a:Ljava/lang/String; = "GL2JNIView"
|
|
|
|
.field static c:I
|
|
|
|
|
|
# instance fields
|
|
.field final b:Lcom/badlogic/gdx/backends/android/surfaceview/ResolutionStrategy;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Lcom/badlogic/gdx/backends/android/surfaceview/ResolutionStrategy;I)V
|
|
.locals 0
|
|
|
|
.line 50
|
|
invoke-direct {p0, p1}, Lcom/badlogic/gdx/backends/android/surfaceview/GLTextureView;-><init>(Landroid/content/Context;)V
|
|
|
|
.line 51
|
|
sput p3, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20;->c:I
|
|
|
|
.line 52
|
|
iput-object p2, p0, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20;->b:Lcom/badlogic/gdx/backends/android/surfaceview/ResolutionStrategy;
|
|
|
|
const/4 p1, 0x0
|
|
|
|
const/16 p2, 0x10
|
|
|
|
.line 53
|
|
invoke-direct {p0, p1, p2, p1}, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20;->a(ZII)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(ZII)V
|
|
.locals 16
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
.line 122
|
|
new-instance v1, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20$ContextFactory;
|
|
|
|
invoke-direct {v1}, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20$ContextFactory;-><init>()V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20;->setEGLContextFactory(Lcom/badlogic/gdx/backends/android/surfaceview/GLTextureView$EGLContextFactory;)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 128
|
|
new-instance v8, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20$ConfigChooser;
|
|
|
|
const/16 v2, 0x8
|
|
|
|
const/16 v3, 0x8
|
|
|
|
const/16 v4, 0x8
|
|
|
|
const/16 v5, 0x8
|
|
|
|
move-object v1, v8
|
|
|
|
move/from16 v6, p2
|
|
|
|
move/from16 v7, p3
|
|
|
|
invoke-direct/range {v1 .. v7}, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20$ConfigChooser;-><init>(IIIIII)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance v1, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20$ConfigChooser;
|
|
|
|
const/4 v10, 0x5
|
|
|
|
const/4 v11, 0x6
|
|
|
|
const/4 v12, 0x5
|
|
|
|
const/4 v13, 0x0
|
|
|
|
move-object v9, v1
|
|
|
|
move/from16 v14, p2
|
|
|
|
move/from16 v15, p3
|
|
|
|
invoke-direct/range {v9 .. v15}, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20$ConfigChooser;-><init>(IIIIII)V
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20;->setEGLConfigChooser(Lcom/badlogic/gdx/backends/android/surfaceview/GLTextureView$EGLConfigChooser;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static a(Ljava/lang/String;Ljavax/microedition/khronos/egl/EGL10;)Z
|
|
.locals 6
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 163
|
|
:goto_0
|
|
invoke-interface {p1}, Ljavax/microedition/khronos/egl/EGL10;->eglGetError()I
|
|
|
|
move-result v3
|
|
|
|
const/16 v4, 0x3000
|
|
|
|
if-eq v3, v4, :cond_0
|
|
|
|
.line 165
|
|
sget-object v2, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20;->a:Ljava/lang/String;
|
|
|
|
const-string v4, "%s: EGL error: 0x%x"
|
|
|
|
const/4 v5, 0x2
|
|
|
|
new-array v5, v5, [Ljava/lang/Object;
|
|
|
|
aput-object p0, v5, v0
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
aput-object v3, v5, v1
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return v2
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onCreateInputConnection(Landroid/view/inputmethod/EditorInfo;)Landroid/view/inputmethod/InputConnection;
|
|
.locals 2
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 78
|
|
iget v0, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I
|
|
|
|
const/high16 v1, 0x10000000
|
|
|
|
or-int/2addr v0, v1
|
|
|
|
iput v0, p1, Landroid/view/inputmethod/EditorInfo;->imeOptions:I
|
|
|
|
.line 81
|
|
:cond_0
|
|
new-instance p1, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20$1;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p1, p0, p0, v0}, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20$1;-><init>(Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20;Landroid/view/View;Z)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method protected onMeasure(II)V
|
|
.locals 1
|
|
|
|
.line 69
|
|
iget-object v0, p0, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20;->b:Lcom/badlogic/gdx/backends/android/surfaceview/ResolutionStrategy;
|
|
|
|
invoke-interface {v0, p1, p2}, Lcom/badlogic/gdx/backends/android/surfaceview/ResolutionStrategy;->a(II)Lcom/badlogic/gdx/backends/android/surfaceview/ResolutionStrategy$MeasuredDimension;
|
|
|
|
move-result-object p1
|
|
|
|
.line 70
|
|
iget p2, p1, Lcom/badlogic/gdx/backends/android/surfaceview/ResolutionStrategy$MeasuredDimension;->a:I
|
|
|
|
iget p1, p1, Lcom/badlogic/gdx/backends/android/surfaceview/ResolutionStrategy$MeasuredDimension;->b:I
|
|
|
|
invoke-virtual {p0, p2, p1}, Lcom/badlogic/gdx/backends/android/surfaceview/GLSurfaceView20;->setMeasuredDimension(II)V
|
|
|
|
return-void
|
|
.end method
|