-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
//fbandroid/libraries/fresco/animated-base/src/main/java/com/facebook…
…/fresco/animation/bitmap:bitmap Reviewed By: ermattt Differential Revision: D64037023 fbshipit-source-id: bd5ddedf36e7dd0ca22948aa26b9f8be5a054cde
- Loading branch information
1 parent
cc1dcc6
commit 93cfbe6
Showing
8 changed files
with
380 additions
and
458 deletions.
There are no files selected for viewing
73 changes: 0 additions & 73 deletions
73
...base/src/main/java/com/facebook/fresco/animation/bitmap/cache/AnimationFrameCacheKey.java
This file was deleted.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
...d-base/src/main/java/com/facebook/fresco/animation/bitmap/cache/AnimationFrameCacheKey.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
package com.facebook.fresco.animation.bitmap.cache | ||
|
||
import android.net.Uri | ||
import com.facebook.cache.common.CacheKey | ||
|
||
/* Frame cache key for animation */ | ||
|
||
class AnimationFrameCacheKey | ||
@JvmOverloads | ||
constructor(imageId: Int, private val deepEquals: Boolean = false) : CacheKey { | ||
|
||
private val animationUriString: String = URI_PREFIX + imageId | ||
|
||
override fun containsUri(uri: Uri): Boolean = uri.toString().startsWith(animationUriString) | ||
|
||
override fun getUriString(): String = animationUriString | ||
|
||
override fun isResourceIdForDebugging(): Boolean = false | ||
|
||
override fun equals(o: Any?): Boolean { | ||
if (!deepEquals) { | ||
return super.equals(o) | ||
} | ||
|
||
if (this === o) { | ||
return true | ||
} | ||
if (o == null || javaClass != o.javaClass) { | ||
return false | ||
} | ||
|
||
val that = o as AnimationFrameCacheKey | ||
return animationUriString == that.animationUriString | ||
} | ||
|
||
override fun hashCode(): Int { | ||
if (!deepEquals) { | ||
return super.hashCode() | ||
} | ||
return animationUriString.hashCode() | ||
} | ||
|
||
companion object { | ||
private const val URI_PREFIX = "anim://" | ||
} | ||
} |
242 changes: 0 additions & 242 deletions
242
animated-base/src/main/java/com/facebook/fresco/animation/bitmap/cache/FrescoFrameCache.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.