Rabbit-R1/switch port/java/sources/androidx/compose/ui/draw/CacheDrawScope.java
2024-05-21 17:08:36 -04:00

89 lines
5.8 KiB
Java

package androidx.compose.ui.draw;
import androidx.compose.ui.graphics.drawscope.ContentDrawScope;
import androidx.compose.ui.graphics.drawscope.DrawScope;
import androidx.compose.ui.unit.Density;
import androidx.compose.ui.unit.LayoutDirection;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
/* compiled from: DrawModifier.kt */
@Metadata(d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0007\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\b\u0007\u0018\u00002\u00020\u0001B\u0007\b\u0000¢\u0006\u0002\u0010\u0002J\u001f\u0010\u001d\u001a\u00020\u000e2\u0017\u0010\u001e\u001a\u0013\u0012\u0004\u0012\u00020 \u0012\u0004\u0012\u00020!0\u001f¢\u0006\u0002\b\"J\u001f\u0010#\u001a\u00020\u000e2\u0017\u0010\u001e\u001a\u0013\u0012\u0004\u0012\u00020$\u0012\u0004\u0012\u00020!0\u001f¢\u0006\u0002\b\"R\u001a\u0010\u0003\u001a\u00020\u0004X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0005\u0010\u0006\"\u0004\b\u0007\u0010\bR\u0014\u0010\t\u001a\u00020\n8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u000b\u0010\fR\u001c\u0010\r\u001a\u0004\u0018\u00010\u000eX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u000f\u0010\u0010\"\u0004\b\u0011\u0010\u0012R\u0014\u0010\u0013\u001a\u00020\n8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0014\u0010\fR\u0011\u0010\u0015\u001a\u00020\u00168F¢\u0006\u0006\u001a\u0004\b\u0017\u0010\u0018R\u001a\u0010\u0019\u001a\u00020\u001a8Fø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0006\u001a\u0004\b\u001b\u0010\u001c\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\\u001e0\u0001\n\u0002\b!¨\u0006%"}, d2 = {"Landroidx/compose/ui/draw/CacheDrawScope;", "Landroidx/compose/ui/unit/Density;", "()V", "cacheParams", "Landroidx/compose/ui/draw/BuildDrawCacheParams;", "getCacheParams$ui_release", "()Landroidx/compose/ui/draw/BuildDrawCacheParams;", "setCacheParams$ui_release", "(Landroidx/compose/ui/draw/BuildDrawCacheParams;)V", "density", "", "getDensity", "()F", "drawResult", "Landroidx/compose/ui/draw/DrawResult;", "getDrawResult$ui_release", "()Landroidx/compose/ui/draw/DrawResult;", "setDrawResult$ui_release", "(Landroidx/compose/ui/draw/DrawResult;)V", "fontScale", "getFontScale", "layoutDirection", "Landroidx/compose/ui/unit/LayoutDirection;", "getLayoutDirection", "()Landroidx/compose/ui/unit/LayoutDirection;", "size", "Landroidx/compose/ui/geometry/Size;", "getSize-NH-jbRc", "()J", "onDrawBehind", "block", "Lkotlin/Function1;", "Landroidx/compose/ui/graphics/drawscope/DrawScope;", "", "Lkotlin/ExtensionFunctionType;", "onDrawWithContent", "Landroidx/compose/ui/graphics/drawscope/ContentDrawScope;", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class CacheDrawScope implements Density {
public static final int $stable = 0;
private BuildDrawCacheParams cacheParams = EmptyBuildDrawCacheParams.INSTANCE;
private DrawResult drawResult;
/* renamed from: getCacheParams$ui_release, reason: from getter */
public final BuildDrawCacheParams getCacheParams() {
return this.cacheParams;
}
/* renamed from: getDrawResult$ui_release, reason: from getter */
public final DrawResult getDrawResult() {
return this.drawResult;
}
public final void setCacheParams$ui_release(BuildDrawCacheParams buildDrawCacheParams) {
Intrinsics.checkNotNullParameter(buildDrawCacheParams, "<set-?>");
this.cacheParams = buildDrawCacheParams;
}
public final void setDrawResult$ui_release(DrawResult drawResult) {
this.drawResult = drawResult;
}
/* renamed from: getSize-NH-jbRc, reason: not valid java name */
public final long m2306getSizeNHjbRc() {
return this.cacheParams.mo2305getSizeNHjbRc();
}
public final LayoutDirection getLayoutDirection() {
return this.cacheParams.getLayoutDirection();
}
public final DrawResult onDrawBehind(final Function1<? super DrawScope, Unit> block) {
Intrinsics.checkNotNullParameter(block, "block");
return onDrawWithContent(new Function1<ContentDrawScope, Unit>() { // from class: androidx.compose.ui.draw.CacheDrawScope$onDrawBehind$1
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(ContentDrawScope contentDrawScope) {
invoke2(contentDrawScope);
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(ContentDrawScope onDrawWithContent) {
Intrinsics.checkNotNullParameter(onDrawWithContent, "$this$onDrawWithContent");
block.invoke(onDrawWithContent);
onDrawWithContent.drawContent();
}
});
}
public final DrawResult onDrawWithContent(Function1<? super ContentDrawScope, Unit> block) {
Intrinsics.checkNotNullParameter(block, "block");
DrawResult drawResult = new DrawResult(block);
this.drawResult = drawResult;
return drawResult;
}
@Override // androidx.compose.ui.unit.Density
public float getDensity() {
return this.cacheParams.getDensity().getDensity();
}
@Override // androidx.compose.ui.unit.Density
public float getFontScale() {
return this.cacheParams.getDensity().getFontScale();
}
}