package com.bumptech.glide.load.resource; import com.bumptech.glide.load.Transformation; import com.bumptech.glide.load.engine.Resource; /** * A noop Transformation that simply returns the given resource. * * @param The type of the resource that will always be returned unmodified. */ public class UnitTransformation implements Transformation { private static final Transformation TRANSFORMATION = new UnitTransformation(); /** * Returns a UnitTransformation for the given type. * * @param The type of the resource to be transformed. */ @SuppressWarnings("unchecked") public static UnitTransformation get() { return (UnitTransformation) TRANSFORMATION; } @Override public Resource transform(Resource resource, int outWidth, int outHeight) { return resource; } @Override public String getId() { return ""; } }