Loading packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/ripple/RippleShader.kt +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ class RippleShader(rippleShape: RippleShape = RippleShape.CIRCLE) : vec2 p_distorted = distort(p, in_time, in_distort_radial, in_distort_xy); float radius = in_size.x * 0.5; float sparkleRing = soften(circleRing(p_distorted-in_center, radius), in_blur); float inside = soften(sdCircle(p_distorted-in_center, radius * 1.2), in_blur); float inside = soften(sdCircle(p_distorted-in_center, radius * 1.25), in_blur); float sparkle = sparkles(p - mod(p, in_pixelDensity * 0.8), in_time * 0.00175) * (1.-sparkleRing) * in_fadeSparkle; Loading packages/SystemUI/src/com/android/systemui/media/taptotransfer/receiver/ReceiverChipRippleView.kt +8 −2 Original line number Diff line number Diff line Loading @@ -119,13 +119,19 @@ class ReceiverChipRippleView(context: Context?, attrs: AttributeSet?) : RippleVi private fun removeRippleFill() { with(rippleShader) { // Set back to default because we modified them in [setupRippleFadeParams]. baseRingFadeParams.fadeOutStart = RippleShader.DEFAULT_BASE_RING_FADE_OUT_START baseRingFadeParams.fadeOutEnd = RippleShader.DEFAULT_FADE_OUT_END centerFillFadeParams.fadeInStart = RippleShader.DEFAULT_FADE_IN_START centerFillFadeParams.fadeInEnd = RippleShader.DEFAULT_CENTER_FILL_FADE_IN_END centerFillFadeParams.fadeOutStart = RippleShader.DEFAULT_CENTER_FILL_FADE_OUT_START centerFillFadeParams.fadeOutEnd = RippleShader.DEFAULT_CENTER_FILL_FADE_OUT_END // To avoid a seam showing up, we should match either: // 1. baseRingFadeParams#fadeInEnd and centerFillFadeParams#fadeOutStart // 2. baseRingFadeParams#fadeOutStart and centerFillFadeOutStart // Here we go with 1 to fade in the centerFill faster. centerFillFadeParams.fadeOutStart = baseRingFadeParams.fadeInEnd centerFillFadeParams.fadeOutEnd = RippleShader.DEFAULT_FADE_OUT_END } } Loading Loading
packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/ripple/RippleShader.kt +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ class RippleShader(rippleShape: RippleShape = RippleShape.CIRCLE) : vec2 p_distorted = distort(p, in_time, in_distort_radial, in_distort_xy); float radius = in_size.x * 0.5; float sparkleRing = soften(circleRing(p_distorted-in_center, radius), in_blur); float inside = soften(sdCircle(p_distorted-in_center, radius * 1.2), in_blur); float inside = soften(sdCircle(p_distorted-in_center, radius * 1.25), in_blur); float sparkle = sparkles(p - mod(p, in_pixelDensity * 0.8), in_time * 0.00175) * (1.-sparkleRing) * in_fadeSparkle; Loading
packages/SystemUI/src/com/android/systemui/media/taptotransfer/receiver/ReceiverChipRippleView.kt +8 −2 Original line number Diff line number Diff line Loading @@ -119,13 +119,19 @@ class ReceiverChipRippleView(context: Context?, attrs: AttributeSet?) : RippleVi private fun removeRippleFill() { with(rippleShader) { // Set back to default because we modified them in [setupRippleFadeParams]. baseRingFadeParams.fadeOutStart = RippleShader.DEFAULT_BASE_RING_FADE_OUT_START baseRingFadeParams.fadeOutEnd = RippleShader.DEFAULT_FADE_OUT_END centerFillFadeParams.fadeInStart = RippleShader.DEFAULT_FADE_IN_START centerFillFadeParams.fadeInEnd = RippleShader.DEFAULT_CENTER_FILL_FADE_IN_END centerFillFadeParams.fadeOutStart = RippleShader.DEFAULT_CENTER_FILL_FADE_OUT_START centerFillFadeParams.fadeOutEnd = RippleShader.DEFAULT_CENTER_FILL_FADE_OUT_END // To avoid a seam showing up, we should match either: // 1. baseRingFadeParams#fadeInEnd and centerFillFadeParams#fadeOutStart // 2. baseRingFadeParams#fadeOutStart and centerFillFadeOutStart // Here we go with 1 to fade in the centerFill faster. centerFillFadeParams.fadeOutStart = baseRingFadeParams.fadeInEnd centerFillFadeParams.fadeOutEnd = RippleShader.DEFAULT_FADE_OUT_END } } Loading