-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to internal BitmapPool #31
Comments
I'm not necessarily opposed to it, my only hesitation is that the pool is only useful if you not only get bitmaps from, but also put bitmaps back in. Otherwise you just drain the pool and it doesn't really provide any benefits. Have you taken a look at the Transformation interface (https://github.com/bumptech/glide/blob/master/library/src/com/bumptech/glide/resize/load/Transformation.java)? That currently passes in the bitmap pool for you to use if you can apply your transformations as you're loading the images. It has the added benefit of being run asynchronously on Glide's framework. |
I am aware of that. The problem is that at some points in our code, we want to use the transformations directly, not via Glide. It would be nice if we could pass in the same BitmapPool that Glide is using. |
Got it, from our offline discussion, I'll add a Glide.getBitmapPool method with well documented caveats, unless you or anyone else has a better thought. |
Fixed: 0d1005f |
I was wondering if it would be possible to expose the BitmapPool held implicitly by the ImageHandler through the ImageResizer reference.
Basically, what I am after, is to reuse the instance of the pool that Glide is using internally. in my own transformations so that I do not generate Bitmaps that could be reused later on by the system.
The text was updated successfully, but these errors were encountered: