mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-17 03:17:17 +01:00
103 lines
5.8 KiB
Java
103 lines
5.8 KiB
Java
package androidx.compose.ui.graphics;
|
|
|
|
import androidx.compose.ui.geometry.Offset;
|
|
import java.util.List;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\u0014\n\u0002\b\u0003\n\u0002\u0010\u0015\n\u0002\b\u0002\n\u0002\u0010\u0017\n\u0002\b\u0006\u0018\u00002\u00020\u0001BG\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005\u0012\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005\u0012\f\u0010\b\u001a\b\u0012\u0004\u0012\u00020\t0\u0005\u0012\f\u0010\n\u001a\b\u0012\u0004\u0012\u00020\u000b0\u0005¢\u0006\u0004\b\f\u0010\rJ\u0016\u0010\u001b\u001a\u00020\u00152\f\u0010\b\u001a\b\u0012\u0004\u0012\u00020\t0\u0005H\u0002J\u0016\u0010\u001c\u001a\u00020\u00112\f\u0010\u001d\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005H\u0002R\u0013\u0010\u0002\u001a\u00020\u0003¢\u0006\n\n\u0002\u0010\u0010\u001a\u0004\b\u000e\u0010\u000fR\u0011\u0010\u0004\u001a\u00020\u0011¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\u0013R\u0011\u0010\u0007\u001a\u00020\u0011¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u0013R\u0011\u0010\b\u001a\u00020\u0015¢\u0006\b\n\u0000\u001a\u0004\b\u0016\u0010\u0017R\u0011\u0010\n\u001a\u00020\u0018¢\u0006\b\n\u0000\u001a\u0004\b\u0019\u0010\u001a¨\u0006\u001e"}, d2 = {"Landroidx/compose/ui/graphics/Vertices;", "", "vertexMode", "Landroidx/compose/ui/graphics/VertexMode;", "positions", "", "Landroidx/compose/ui/geometry/Offset;", "textureCoordinates", "colors", "Landroidx/compose/ui/graphics/Color;", "indices", "", "<init>", "(ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V", "getVertexMode-c2xauaI", "()I", "I", "", "getPositions", "()[F", "getTextureCoordinates", "", "getColors", "()[I", "", "getIndices", "()[S", "encodeColorList", "encodePointList", "points", "ui-graphics_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nVertices.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Vertices.kt\nandroidx/compose/ui/graphics/Vertices\n+ 2 ListUtils.kt\nandroidx/compose/ui/util/ListUtilsKt\n+ 3 Offset.kt\nandroidx/compose/ui/geometry/Offset\n+ 4 InlineClassHelper.kt\nandroidx/compose/ui/util/InlineClassHelperKt\n+ 5 InlineClassHelper.jvm.kt\nandroidx/compose/ui/util/InlineClassHelper_jvmKt\n*L\n1#1,68:1\n103#2:69\n35#2,5:70\n104#2:75\n65#3:76\n69#3:79\n60#4:77\n70#4:80\n22#5:78\n22#5:81\n*S KotlinDebug\n*F\n+ 1 Vertices.kt\nandroidx/compose/ui/graphics/Vertices\n*L\n41#1:69\n41#1:70,5\n41#1:75\n61#1:76\n63#1:79\n61#1:77\n63#1:80\n61#1:78\n63#1:81\n*E\n"})
|
|
/* loaded from: classes13.dex */
|
|
public final class Vertices {
|
|
|
|
@NotNull
|
|
private final int[] colors;
|
|
|
|
@NotNull
|
|
private final short[] indices;
|
|
|
|
@NotNull
|
|
private final float[] positions;
|
|
|
|
@NotNull
|
|
private final float[] textureCoordinates;
|
|
private final int vertexMode;
|
|
|
|
private Vertices(int i, List<Offset> list, List<Offset> list2, List<Color> list3, List<Integer> list4) {
|
|
this.vertexMode = i;
|
|
if (list2.size() != list.size()) {
|
|
InlineClassHelperKt.throwIllegalArgumentException("positions and textureCoordinates lengths must match.");
|
|
}
|
|
if (list3.size() != list.size()) {
|
|
InlineClassHelperKt.throwIllegalArgumentException("positions and colors lengths must match.");
|
|
}
|
|
int size = list4.size();
|
|
for (int i2 = 0; i2 < size; i2++) {
|
|
int intValue = list4.get(i2).intValue();
|
|
if (intValue < 0 || intValue >= list.size()) {
|
|
InlineClassHelperKt.throwIllegalArgumentException("indices values must be valid indices in the positions list.");
|
|
break;
|
|
}
|
|
}
|
|
this.positions = encodePointList(list);
|
|
this.textureCoordinates = encodePointList(list2);
|
|
this.colors = encodeColorList(list3);
|
|
int size2 = list4.size();
|
|
short[] sArr = new short[size2];
|
|
for (int i3 = 0; i3 < size2; i3++) {
|
|
sArr[i3] = (short) list4.get(i3).intValue();
|
|
}
|
|
this.indices = sArr;
|
|
}
|
|
|
|
private final int[] encodeColorList(List<Color> colors) {
|
|
int size = colors.size();
|
|
int[] iArr = new int[size];
|
|
for (int i = 0; i < size; i++) {
|
|
iArr[i] = ColorKt.m4698toArgb8_81llA(colors.get(i).m4654unboximpl());
|
|
}
|
|
return iArr;
|
|
}
|
|
|
|
private final float[] encodePointList(List<Offset> points) {
|
|
int size = points.size() * 2;
|
|
float[] fArr = new float[size];
|
|
for (int i = 0; i < size; i++) {
|
|
long m4410unboximpl = points.get(i / 2).m4410unboximpl();
|
|
fArr[i] = i % 2 == 0 ? Float.intBitsToFloat((int) (m4410unboximpl >> 32)) : Float.intBitsToFloat((int) (m4410unboximpl & 4294967295L));
|
|
}
|
|
return fArr;
|
|
}
|
|
|
|
@NotNull
|
|
public final int[] getColors() {
|
|
return this.colors;
|
|
}
|
|
|
|
@NotNull
|
|
public final short[] getIndices() {
|
|
return this.indices;
|
|
}
|
|
|
|
@NotNull
|
|
public final float[] getPositions() {
|
|
return this.positions;
|
|
}
|
|
|
|
@NotNull
|
|
public final float[] getTextureCoordinates() {
|
|
return this.textureCoordinates;
|
|
}
|
|
|
|
/* renamed from: getVertexMode-c2xauaI, reason: not valid java name and from getter */
|
|
public final int getVertexMode() {
|
|
return this.vertexMode;
|
|
}
|
|
|
|
public /* synthetic */ Vertices(int i, List list, List list2, List list3, List list4, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(i, list, list2, list3, list4);
|
|
}
|
|
}
|