hwc2: Fix FB tonemap session management in HWC tonemapper
1. Initialize FB session index to invalid value to fix the validation.
2. If a tonemap session gets deleted, update FB tonemap session index.
CRs-Fixed: 2082400
Change-Id: I110b7158b80bf2bc11e64588ec15ab88b5640f2d
diff --git a/sdm/libs/hwc2/hwc_tonemapper.h b/sdm/libs/hwc2/hwc_tonemapper.h
index e2c8ef4..8bef3b1 100644
--- a/sdm/libs/hwc2/hwc_tonemapper.h
+++ b/sdm/libs/hwc2/hwc_tonemapper.h
@@ -118,7 +118,7 @@
HWCBufferAllocator *buffer_allocator_ = nullptr;
uint32_t dump_frame_count_ = 0;
uint32_t dump_frame_index_ = 0;
- uint32_t fb_session_index_ = 0;
+ int fb_session_index_ = -1;
};
} // namespace sdm