[SurfaceFlinger] add setDisplayContentSamplingEnabled i/f
Add interface to ISurfaceComposer that can enable or disable
the graphics.composer's collection of the displayed content
statistics.
Bug: 116028618
Test: Boot
Test: ran test client against prototype, see enable/disable working.
Test: Ran new tests './libgui_test --gtest_filter="DisplayedContentSamp*"'
Test: on hwc with and without new function hook.
Change-Id: Ifb487e2bfbd8e0db6178ccbf762aa968c34576b9
diff --git a/services/surfaceflinger/DisplayHardware/HWC2.h b/services/surfaceflinger/DisplayHardware/HWC2.h
index 8c0f50c..2d65051 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2.h
+++ b/services/surfaceflinger/DisplayHardware/HWC2.h
@@ -240,6 +240,9 @@
[[clang::warn_unused_result]] Error getDisplayedContentSamplingAttributes(
android::ui::PixelFormat* outFormat, android::ui::Dataspace* outDataspace,
uint8_t* outComponentMask) const;
+ [[clang::warn_unused_result]] Error setDisplayContentSamplingEnabled(bool enabled,
+ uint8_t componentMask,
+ uint64_t maxFrames) const;
[[clang::warn_unused_result]] Error getReleaseFences(
std::unordered_map<Layer*,
android::sp<android::Fence>>* outFences) const;