提交 1fabbe4c 编写于 作者: S Sam Judd

Document Bitmap recycling in BitmapTransformation.

Fixes #422.
上级 ad9c91c3
......@@ -68,6 +68,15 @@ public abstract class BitmapTransformation implements Transformation<Bitmap> {
* result.
*
* <p>
* The provided Bitmap, toTransform, should not be recycled or returned to the pool. Glide will automatically
* recycle and/or reuse toTransform if the transformation returns a different Bitmap. Similarly implementations
* should never recycle or return Bitmaps that are returned as the result of this method. Recycling or returning
* the provided and/or the returned Bitmap to the pool will lead to a variety of runtime exceptions and drawing
* errors. See #408 for an example. If the implementation obtains and discards intermediate Bitmaps, they may
* safely be returned to the BitmapPool and/or recycled.
* </p>
*
* <p>
* outWidth and outHeight will never be {@link com.bumptech.glide.request.target.Target#SIZE_ORIGINAL}, this
* class converts them to be the size of the Bitmap we're going to transform before calling this method.
* </p>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册