mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 09:57:16 +01:00
83 lines
5.3 KiB
Java
83 lines
5.3 KiB
Java
package androidx.compose.foundation;
|
|
|
|
import android.graphics.Matrix;
|
|
import android.graphics.SurfaceTexture;
|
|
import android.view.Surface;
|
|
import android.view.TextureView;
|
|
import androidx.compose.ui.unit.IntSize;
|
|
import expo.modules.interfaces.permissions.PermissionsResponse;
|
|
import kotlin.Metadata;
|
|
import kotlinx.coroutines.CoroutineScope;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000H\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0004\b\u0002\u0018\u00002\u00020\u00012\u00020\u0002B\r\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J \u0010\u0013\u001a\u00020\u00142\u0006\u0010\u0015\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u0018H\u0016J\u0010\u0010\u001a\u001a\u00020\u001b2\u0006\u0010\u0015\u001a\u00020\u0016H\u0016J \u0010\u001c\u001a\u00020\u00142\u0006\u0010\u0015\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u0018H\u0016J\u0010\u0010\u001d\u001a\u00020\u00142\u0006\u0010\u001e\u001a\u00020\u0016H\u0016R\u0011\u0010\u0006\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\tR\"\u0010\n\u001a\u00020\u000bX\u0086\u000eø\u0001\u0000ø\u0001\u0001¢\u0006\u0010\n\u0002\u0010\u0010\u001a\u0004\b\f\u0010\r\"\u0004\b\u000e\u0010\u000fR\u0010\u0010\u0011\u001a\u0004\u0018\u00010\u0012X\u0082\u000e¢\u0006\u0002\n\u0000\u0082\u0002\u000b\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u0006\u001f"}, d2 = {"Landroidx/compose/foundation/AndroidEmbeddedExternalSurfaceState;", "Landroidx/compose/foundation/BaseAndroidExternalSurfaceState;", "Landroid/view/TextureView$SurfaceTextureListener;", PermissionsResponse.SCOPE_KEY, "Lkotlinx/coroutines/CoroutineScope;", "(Lkotlinx/coroutines/CoroutineScope;)V", "matrix", "Landroid/graphics/Matrix;", "getMatrix", "()Landroid/graphics/Matrix;", "surfaceSize", "Landroidx/compose/ui/unit/IntSize;", "getSurfaceSize-YbymL2g", "()J", "setSurfaceSize-ozmzZPI", "(J)V", "J", "surfaceTextureSurface", "Landroid/view/Surface;", "onSurfaceTextureAvailable", "", "surfaceTexture", "Landroid/graphics/SurfaceTexture;", "width", "", "height", "onSurfaceTextureDestroyed", "", "onSurfaceTextureSizeChanged", "onSurfaceTextureUpdated", "surface", "foundation_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
final class AndroidEmbeddedExternalSurfaceState extends BaseAndroidExternalSurfaceState implements TextureView.SurfaceTextureListener {
|
|
|
|
@NotNull
|
|
private final Matrix matrix;
|
|
private long surfaceSize;
|
|
|
|
@Nullable
|
|
private Surface surfaceTextureSurface;
|
|
|
|
public AndroidEmbeddedExternalSurfaceState(@NotNull CoroutineScope coroutineScope) {
|
|
super(coroutineScope);
|
|
this.surfaceSize = IntSize.INSTANCE.m7544getZeroYbymL2g();
|
|
this.matrix = new Matrix();
|
|
}
|
|
|
|
@NotNull
|
|
public final Matrix getMatrix() {
|
|
return this.matrix;
|
|
}
|
|
|
|
/* renamed from: getSurfaceSize-YbymL2g, reason: not valid java name and from getter */
|
|
public final long getSurfaceSize() {
|
|
return this.surfaceSize;
|
|
}
|
|
|
|
@Override // android.view.TextureView.SurfaceTextureListener
|
|
public void onSurfaceTextureAvailable(@NotNull SurfaceTexture surfaceTexture, int width, int height) {
|
|
if (!IntSize.m7537equalsimpl0(this.surfaceSize, IntSize.INSTANCE.m7544getZeroYbymL2g())) {
|
|
width = IntSize.m7539getWidthimpl(this.surfaceSize);
|
|
height = IntSize.m7538getHeightimpl(this.surfaceSize);
|
|
surfaceTexture.setDefaultBufferSize(width, height);
|
|
}
|
|
Surface surface = new Surface(surfaceTexture);
|
|
this.surfaceTextureSurface = surface;
|
|
dispatchSurfaceCreated(surface, width, height);
|
|
}
|
|
|
|
@Override // android.view.TextureView.SurfaceTextureListener
|
|
public boolean onSurfaceTextureDestroyed(@NotNull SurfaceTexture surfaceTexture) {
|
|
Surface surface = this.surfaceTextureSurface;
|
|
surface.getClass();
|
|
dispatchSurfaceDestroyed(surface);
|
|
this.surfaceTextureSurface = null;
|
|
return true;
|
|
}
|
|
|
|
@Override // android.view.TextureView.SurfaceTextureListener
|
|
public void onSurfaceTextureSizeChanged(@NotNull SurfaceTexture surfaceTexture, int width, int height) {
|
|
if (!IntSize.m7537equalsimpl0(this.surfaceSize, IntSize.INSTANCE.m7544getZeroYbymL2g())) {
|
|
width = IntSize.m7539getWidthimpl(this.surfaceSize);
|
|
height = IntSize.m7538getHeightimpl(this.surfaceSize);
|
|
surfaceTexture.setDefaultBufferSize(width, height);
|
|
}
|
|
Surface surface = this.surfaceTextureSurface;
|
|
surface.getClass();
|
|
dispatchSurfaceChanged(surface, width, height);
|
|
}
|
|
|
|
/* renamed from: setSurfaceSize-ozmzZPI, reason: not valid java name */
|
|
public final void m406setSurfaceSizeozmzZPI(long j) {
|
|
this.surfaceSize = j;
|
|
}
|
|
|
|
@Override // android.view.TextureView.SurfaceTextureListener
|
|
public void onSurfaceTextureUpdated(@NotNull SurfaceTexture surface) {
|
|
}
|
|
}
|