Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,13 @@ class CircularImageView @JvmOverloads constructor(
if (field != value) {
field = value
if (field != null) {
civDrawable = null // To force re-update shader
invalidate()
}
}
}

// Object used to draw
private var civImage: Bitmap? = null
private var civDrawable: Drawable? = null

init {
init(context, attrs, defStyleAttr)
Expand Down Expand Up @@ -323,10 +321,7 @@ class CircularImageView @JvmOverloads constructor(
}

private fun loadBitmap() {
if (civDrawable == drawable) return

civDrawable = drawable
civImage = drawableToBitmap(civDrawable)
civImage = drawableToBitmap(drawable)
updateShader()
}

Expand Down