Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e83b5800 authored by Surbhi Kadam's avatar Surbhi Kadam
Browse files

Add tracing to BlurUtils with different tokens for prepareblur and applyblur

Flag: EXEMPT; log only
Bug: 423953389
Test: presubmit

Change-Id: I310b3ce0e4f1a69d2da1328a58ccc213f71f295f
parent 10f0f245
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ constructor(
    init {
        dumpManager.registerDumpable(this)
        earlyWakeupInfo.token = Binder()
        earlyWakeupInfo.trace = BlurUtils::class.java.getName()
    }

    @VisibleForTesting
@@ -134,6 +133,7 @@ constructor(
        updateTransactionApplier(viewRootImpl)
        val builder =
            SyncRtSurfaceTransactionApplier.SurfaceParams.Builder(viewRootImpl.surfaceControl)
        earlyWakeupInfo.trace = PREPARE_BLUR_TRACE_NAME
        if (lastAppliedBlur == 0 && radius != 0) {
            earlyWakeupStart(builder, "eEarlyWakeup (prepareBlur)")
            transactionApplier.scheduleApply(builder.build())
@@ -155,6 +155,7 @@ constructor(
        updateTransactionApplier(viewRootImpl)
        val builder =
            SyncRtSurfaceTransactionApplier.SurfaceParams.Builder(viewRootImpl.surfaceControl)
        earlyWakeupInfo.trace = APPLY_BLUR_TRACE_NAME
        if (shouldBlur(radius)) {
            builder.withBackgroundBlurRadius(radius)
            if (shouldScaleWithTransaction()) {
@@ -287,6 +288,7 @@ constructor(
            } else {
                null
            }
        earlyWakeupInfo.trace = SET_PERSISTENT_EARLY_WAKEUP_TRACE_NAME
        if (persistentEarlyWakeupRequired) {
            if (earlyWakeupEnabled) return
            earlyWakeupStart(builder, "setEarlyWakeup")
@@ -308,6 +310,10 @@ constructor(
    companion object {
        const val TRACK_NAME = "BlurUtils"
        private const val TAG = "BlurUtils"
        private val PREPARE_BLUR_TRACE_NAME = BlurUtils::class.java.name + "::prepareBlur"
        private val APPLY_BLUR_TRACE_NAME = BlurUtils::class.java.name + "::applyBlur"
        private val SET_PERSISTENT_EARLY_WAKEUP_TRACE_NAME =
            BlurUtils::class.java.name + "::setPersistentEarlyWakeup"
        private val isLoggable = Log.isLoggable(TAG, Log.VERBOSE) || Build.IS_ENG
    }
}