package io.flutter.embedding.engine.mutatorsstack; import android.graphics.Matrix; import android.graphics.Path; import android.graphics.Rect; import android.graphics.RectF; import java.util.ArrayList; import java.util.List; /* loaded from: classes6.dex */ public class FlutterMutatorsStack { private List mutators = new ArrayList(); private Matrix finalMatrix = new Matrix(); private List finalClippingPaths = new ArrayList(); /* loaded from: classes6.dex */ public enum FlutterMutatorType { CLIP_RECT, CLIP_RRECT, CLIP_PATH, TRANSFORM, OPACITY } public List getFinalClippingPaths() { return this.finalClippingPaths; } public Matrix getFinalMatrix() { return this.finalMatrix; } public List getMutators() { return this.mutators; } /* loaded from: classes6.dex */ public class FlutterMutator { private Matrix matrix; private Path path; private float[] radiis; private Rect rect; final FlutterMutatorsStack this$0; private FlutterMutatorType type; public Matrix getMatrix() { return this.matrix; } public Path getPath() { return this.path; } public Rect getRect() { return this.rect; } public FlutterMutatorType getType() { return this.type; } public FlutterMutator(FlutterMutatorsStack flutterMutatorsStack, Rect rect) { this.this$0 = flutterMutatorsStack; this.type = FlutterMutatorType.CLIP_RECT; this.rect = rect; } public FlutterMutator(FlutterMutatorsStack flutterMutatorsStack, Rect rect, float[] fArr) { this.this$0 = flutterMutatorsStack; this.type = FlutterMutatorType.CLIP_RRECT; this.rect = rect; this.radiis = fArr; } public FlutterMutator(FlutterMutatorsStack flutterMutatorsStack, Path path) { this.this$0 = flutterMutatorsStack; this.type = FlutterMutatorType.CLIP_PATH; this.path = path; } public FlutterMutator(FlutterMutatorsStack flutterMutatorsStack, Matrix matrix) { this.this$0 = flutterMutatorsStack; this.type = FlutterMutatorType.TRANSFORM; this.matrix = matrix; } } public void pushTransform(float[] fArr) { Matrix matrix = new Matrix(); matrix.setValues(fArr); FlutterMutator flutterMutator = new FlutterMutator(this, matrix); this.mutators.add(flutterMutator); this.finalMatrix.preConcat(flutterMutator.getMatrix()); } public void pushClipRect(int i, int i2, int i3, int i4) { Rect rect = new Rect(i, i2, i3, i4); this.mutators.add(new FlutterMutator(this, rect)); Path path = new Path(); path.addRect(new RectF(rect), Path.Direction.CCW); path.transform(this.finalMatrix); this.finalClippingPaths.add(path); } public void pushClipRRect(int i, int i2, int i3, int i4, float[] fArr) { Rect rect = new Rect(i, i2, i3, i4); this.mutators.add(new FlutterMutator(this, rect, fArr)); Path path = new Path(); path.addRoundRect(new RectF(rect), fArr, Path.Direction.CCW); path.transform(this.finalMatrix); this.finalClippingPaths.add(path); } }