Skip to content

Commit 8768421

Browse files
Sebastian Barrosofacebook-github-bot
authored andcommitted
Bulk run (7 units)
Differential Revision: D109861653
1 parent 5be5e84 commit 8768421

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

imagepipeline/src/main/java/com/facebook/imagepipeline/memory/BitmapPoolBackend.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ open class BitmapPoolBackend : LruBucketsPoolBackend<Bitmap>() {
2929
return null
3030
}
3131

32+
@Suppress("PARAMETER_NAME_CHANGED_ON_OVERRIDE")
3233
override fun getSize(bitmap: Bitmap): Int = BitmapUtil.getSizeInBytes(bitmap)
3334

3435
protected fun isReusable(bitmap: Bitmap?): Boolean {

imagepipeline/src/main/java/com/facebook/imagepipeline/memory/BucketsBitmapPool.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ class BucketsBitmapPool(
4242
* Allocate a bitmap that has a backing memory allocation of 'size' bytes. This is configuration
4343
* agnostic so the size is the actual size in bytes of the bitmap.
4444
*
45-
* @param size the 'size' in bytes of the bitmap
45+
* @param bucketedSize the 'size' in bytes of the bitmap
4646
* @return a new bitmap with the specified size in memory
4747
*/
48-
public override fun alloc(size: Int): Bitmap {
48+
public override fun alloc(bucketedSize: Int): Bitmap {
4949
return Bitmap.createBitmap(
5050
1,
51-
ceil(size / BitmapUtil.RGB_565_BYTES_PER_PIXEL.toDouble()).toInt(),
51+
ceil(bucketedSize / BitmapUtil.RGB_565_BYTES_PER_PIXEL.toDouble()).toInt(),
5252
Bitmap.Config.RGB_565,
5353
)
5454
}

imagepipeline/src/main/java/com/facebook/imagepipeline/producers/DiskCacheWriteProducer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class DiskCacheWriteProducer(
3737
private val cacheKeyFactory: CacheKeyFactory,
3838
private val inputProducer: Producer<EncodedImage>,
3939
) : Producer<EncodedImage> {
40-
override fun produceResults(consumer: Consumer<EncodedImage>, producerContext: ProducerContext) {
41-
maybeStartInputProducer(consumer, producerContext)
40+
override fun produceResults(consumer: Consumer<EncodedImage>, context: ProducerContext) {
41+
maybeStartInputProducer(consumer, context)
4242
}
4343

4444
private fun maybeStartInputProducer(

imagepipeline/src/main/java/com/facebook/imagepipeline/producers/ThreadHandoffProducer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ class ThreadHandoffProducer<T>(
2929

3030
val statefulRunnable: StatefulProducerRunnable<T> =
3131
object : StatefulProducerRunnable<T>(consumer, producerListener, context, PRODUCER_NAME) {
32-
override fun onSuccess(ignored: T?) {
32+
override fun onSuccess(result: T?) {
3333
producerListener.onProducerFinishWithSuccess(context, PRODUCER_NAME, null)
3434
inputProducer.produceResults(consumer, context)
3535
}
3636

37-
override fun disposeResult(ignored: T?) = Unit
37+
override fun disposeResult(result: T?) = Unit
3838

3939
@Throws(Exception::class)
4040
override fun getResult(): T? {

0 commit comments

Comments
 (0)