private void updateSourceImageRef(
        @Nullable CloseableReference<CloseableImage> sourceImageRef, int status) {
      CloseableReference<CloseableImage> oldSourceImageRef;
      boolean shouldSubmit;
      synchronized (PostprocessorConsumer.this) {
        if (mIsClosed) {
          return;
        }
        oldSourceImageRef = mSourceImageRef;
        mSourceImageRef = CloseableReference.cloneOrNull(sourceImageRef);
        mStatus = status;
        mIsDirty = true;
        shouldSubmit = setRunningIfDirtyAndNotRunning();
      }
      CloseableReference.closeSafely(oldSourceImageRef);
      if (shouldSubmit) {
        submitPostprocessing();
      }
    }
Performs postprocessing and takes care of scheduling.
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/PostprocessorProducer.java