summaryrefslogtreecommitdiff
path: root/sdm/libs/hwc2/hwc_display_primary.cpp
diff options
context:
space:
mode:
authorKevin DuBois <kevindubois@google.com>2018-12-13 10:14:59 -0800
committerKevin DuBois <kevindubois@google.com>2019-01-02 11:51:32 -0800
commit88f6ad7bf1bd893aef3b9a2ce48a3be817b03973 (patch)
tree81e115933bfa1881e9f3c3adefeca789a19c9f0d /sdm/libs/hwc2/hwc_display_primary.cpp
parentfa9c97e62a0760ddb147637fa75d911ca894422f (diff)
downloaddisplay-88f6ad7bf1bd893aef3b9a2ce48a3be817b03973.tar.gz
composer: add time filtering to display histogram
Adds the ability to filter the content sample by timestamp and or a framecount. This lets API user limit the returned sample to data most proximate to the time that the user is interested in it. Fixes: 120992129 Test: boot Test: new unit test for ringbuffer logic. Test: color_sampling_tool Test: TestAPI app limiting by maxframes Test: VtsHalGraphicsComposerV2_3Target (32/36 as before) Change-Id: I8dd9efc9935570f0f1ab015476ffa8883651073e
Diffstat (limited to 'sdm/libs/hwc2/hwc_display_primary.cpp')
-rw-r--r--sdm/libs/hwc2/hwc_display_primary.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/sdm/libs/hwc2/hwc_display_primary.cpp b/sdm/libs/hwc2/hwc_display_primary.cpp
index 830549aa..360b5d87 100644
--- a/sdm/libs/hwc2/hwc_display_primary.cpp
+++ b/sdm/libs/hwc2/hwc_display_primary.cpp
@@ -741,10 +741,13 @@ HWC2::Error HWCDisplayPrimary::SetDisplayedContentSamplingEnabled(int32_t enable
api_sampling_vote = false;
}
- if (api_sampling_vote || vndservice_sampling_vote) {
- histogram.start();
+ auto start = api_sampling_vote || vndservice_sampling_vote;
+ if (start && max_frames == 0) {
+ histogram.start();
+ } else if (start) {
+ histogram.start(max_frames);
} else {
- histogram.stop();
+ histogram.stop();
}
return HWC2::Error::None;
}