SF: Fully disable content detection if opted out
Layer history was created but not recorded/traversed on devices without
refresh rate switching. ag/9549429 destroys stale history on traversal,
so the LayerInfo records were leaked.
Bug: 144363590
Test: Layer history is not created on crosshatch
Change-Id: I45ebc7c4f8447b2bc2bfb1af01325d562b4afed1
diff --git a/services/surfaceflinger/BufferQueueLayer.cpp b/services/surfaceflinger/BufferQueueLayer.cpp
index dc61e49..6896da7 100644
--- a/services/surfaceflinger/BufferQueueLayer.cpp
+++ b/services/surfaceflinger/BufferQueueLayer.cpp
@@ -400,11 +400,9 @@
ATRACE_CALL();
// Add this buffer from our internal queue tracker
{ // Autolock scope
- if (mFlinger->mUseSmart90ForVideo) {
- const nsecs_t presentTime = item.mIsAutoTimestamp ? 0 : item.mTimestamp;
- mFlinger->mScheduler->recordLayerHistory(this, presentTime,
- item.mHdrMetadata.validTypes != 0);
- }
+ const nsecs_t presentTime = item.mIsAutoTimestamp ? 0 : item.mTimestamp;
+ const bool isHDR = item.mHdrMetadata.validTypes != 0;
+ mFlinger->mScheduler->recordLayerHistory(this, presentTime, isHDR);
Mutex::Autolock lock(mQueueItemLock);
// Reset the frame number tracker when we receive the first buffer after