Loading packages/SystemUI/src/com/android/systemui/statusbar/BlurUtils.kt +10 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.statusbar import android.app.ActivityManager import android.content.res.Resources import android.os.SystemProperties import android.os.Trace import android.util.IndentingPrintWriter import android.util.MathUtils import android.view.CrossWindowBlurListeners Loading @@ -42,7 +43,7 @@ open class BlurUtils @Inject constructor( ) : Dumpable { val minBlurRadius = resources.getDimensionPixelSize(R.dimen.min_window_blur_radius) val maxBlurRadius = resources.getDimensionPixelSize(R.dimen.max_window_blur_radius) private val traceCookie = System.identityHashCode(this) private var lastAppliedBlur = 0 init { Loading Loading @@ -85,10 +86,13 @@ open class BlurUtils @Inject constructor( if (supportsBlursOnWindows()) { it.setBackgroundBlurRadius(viewRootImpl.surfaceControl, radius) if (lastAppliedBlur == 0 && radius != 0) { Trace.asyncTraceForTrackBegin(Trace.TRACE_TAG_APP, TRACK_NAME, EARLY_WAKEUP_SLICE_NAME, traceCookie) it.setEarlyWakeupStart() } if (lastAppliedBlur != 0 && radius == 0) { it.setEarlyWakeupEnd() Trace.asyncTraceForTrackEnd(Trace.TRACE_TAG_APP, TRACK_NAME, traceCookie) } lastAppliedBlur = radius } Loading Loading @@ -125,4 +129,9 @@ open class BlurUtils @Inject constructor( it.println("isHighEndGfx: ${ActivityManager.isHighEndGfx()}") } } companion object { const val TRACK_NAME = "BlurUtils" const val EARLY_WAKEUP_SLICE_NAME = "eEarlyWakeup" } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/BlurUtils.kt +10 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.statusbar import android.app.ActivityManager import android.content.res.Resources import android.os.SystemProperties import android.os.Trace import android.util.IndentingPrintWriter import android.util.MathUtils import android.view.CrossWindowBlurListeners Loading @@ -42,7 +43,7 @@ open class BlurUtils @Inject constructor( ) : Dumpable { val minBlurRadius = resources.getDimensionPixelSize(R.dimen.min_window_blur_radius) val maxBlurRadius = resources.getDimensionPixelSize(R.dimen.max_window_blur_radius) private val traceCookie = System.identityHashCode(this) private var lastAppliedBlur = 0 init { Loading Loading @@ -85,10 +86,13 @@ open class BlurUtils @Inject constructor( if (supportsBlursOnWindows()) { it.setBackgroundBlurRadius(viewRootImpl.surfaceControl, radius) if (lastAppliedBlur == 0 && radius != 0) { Trace.asyncTraceForTrackBegin(Trace.TRACE_TAG_APP, TRACK_NAME, EARLY_WAKEUP_SLICE_NAME, traceCookie) it.setEarlyWakeupStart() } if (lastAppliedBlur != 0 && radius == 0) { it.setEarlyWakeupEnd() Trace.asyncTraceForTrackEnd(Trace.TRACE_TAG_APP, TRACK_NAME, traceCookie) } lastAppliedBlur = radius } Loading Loading @@ -125,4 +129,9 @@ open class BlurUtils @Inject constructor( it.println("isHighEndGfx: ${ActivityManager.isHighEndGfx()}") } } companion object { const val TRACK_NAME = "BlurUtils" const val EARLY_WAKEUP_SLICE_NAME = "eEarlyWakeup" } }