Package 

Class BasePostprocessor

  • All Implemented Interfaces:
    com.facebook.imagepipeline.request.Postprocessor

    
    public abstract class BasePostprocessor
     implements Postprocessor
                        

    Base implementation of Postprocessor interface.

    Clients should override exactly one of the three provided process methods.

    • Method Summary

      Modifier and Type Method Description
      String getName() Returns the name of this postprocessor.
      CloseableReference<Bitmap> process(Bitmap sourceBitmap, PlatformBitmapFactory bitmapFactory) Clients should override this method only if the post-processed bitmap has to be of a differentsize than the source bitmap.
      void process(Bitmap destBitmap, Bitmap sourceBitmap) Clients should override this method if the post-processing cannot be done in place.
      void process(Bitmap bitmap) Clients should override this method if the post-processing can be done in place.
      CacheKey getPostprocessorCacheKey() The default implementation of the CacheKey for a Postprocessor is null
      • Methods inherited from class com.facebook.imagepipeline.request.Postprocessor

        process
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getName

         String getName()

        Returns the name of this postprocessor.

        Used for logging and analytics.

      • process

         CloseableReference<Bitmap> process(Bitmap sourceBitmap, PlatformBitmapFactory bitmapFactory)

        Clients should override this method only if the post-processed bitmap has to be of a differentsize than the source bitmap. If the post-processed bitmap is of the same size, clients shouldoverride one of the other two methods.

        The source bitmap must not be modified as it may be shared by the other clients. Theimplementation must create a new bitmap that is safe to be modified and return a reference toit. Clients should use bitmapFactory to create a new bitmap.

        Parameters:
        sourceBitmap - The source bitmap.
        bitmapFactory - The factory to create a destination bitmap.
      • process

         void process(Bitmap destBitmap, Bitmap sourceBitmap)

        Clients should override this method if the post-processing cannot be done in place. If thepost-processing can be done in place, clients should override the process method.

        The provided destination bitmap is of the same size as the source bitmap. There are noguarantees on the initial content of the destination bitmap, so the implementation has to makesure that it properly populates it.

        The source bitmap must not be modified as it may be shared by the other clients. Theimplementation must use the provided destination bitmap as its output.

        Parameters:
        destBitmap - the destination bitmap to be used as output
        sourceBitmap - the source bitmap to be used as input
      • process

         void process(Bitmap bitmap)

        Clients should override this method if the post-processing can be done in place.

        The provided bitmap is a copy of the source bitmap and the implementation is free to modifyit.

        Parameters:
        bitmap - the bitmap to be used both as input and as output