private Resource<Z> transformEncodeAndTranscode(Resource<T> decoded) {
        long startTime = LogTime.getLogTime();
        Resource<T> transformed = transform(decoded);
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            logWithTimeAndKey("Transformed resource from source", startTime);
        }

        writeTransformedToCache(transformed);

        startTime = LogTime.getLogTime();
        Resource<Z> result = transcode(transformed);
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            logWithTimeAndKey("Transcoded transformed from source", startTime);
        }
        return result;
    }
Returns a transformed and transcoded resource decoded from source data, or null if no source data could be
obtained or no resource could be decoded.

<p>
    Depending on the {@link DiskCacheStrategy} used, source data is either decoded
    directly or first written to the disk cache and then decoded from the disk cache.
</p>

@throws Exception
core/src/main/java/com/bumptech/glide/load/engine/DecodeJob.java