diff options
author | susi_su <susisu@google.com> | 2022-05-22 19:59:19 +0800 |
---|---|---|
committer | Susi Su <susisu@google.com> | 2022-06-08 02:17:32 +0000 |
commit | 54bfb43b2840a69bb345d67b94fb6b6138ea0b2c (patch) | |
tree | 6321ed2524d448026f9c3673699c17dfbaf286fa /libhwc2.1/pixel-display.cpp | |
parent | b67d3b4ae5d243995c710b373d1160e0bceb8f66 (diff) |
libhwc2.1: add roi calculation for display RRS
This patch calculates roi for histogram sampling
accoring to display RRS mode setups
Bug: 233136164
Test: local test with a hist_client code by setting
different display resolution switch
Change-Id: I35aab6b776b1687c8ae1d37ca439a9409205932c
Diffstat (limited to 'libhwc2.1/pixel-display.cpp')
-rw-r--r-- | libhwc2.1/pixel-display.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libhwc2.1/pixel-display.cpp b/libhwc2.1/pixel-display.cpp index 80673b8..e575ad1 100644 --- a/libhwc2.1/pixel-display.cpp +++ b/libhwc2.1/pixel-display.cpp @@ -222,8 +222,8 @@ ndk::ScopedAStatus Display::histogramSample(const RoiRect &roi, const Weight &we ALOGE("histogram error, BAD_PRIORITY(%d)\n", (int)pri); return ndk::ScopedAStatus::ok(); } - - runMediator(roi, weight, pos, histogrambuffer); + RoiRect roiCaled = mMediator.calRoi(roi); // fit roi coordinates to RRS + runMediator(roiCaled, weight, pos, histogrambuffer); if (mMediator.isSecureContentPresenting() == true) { memset(histogrambuffer, 0, histogram::HISTOGRAM_BINS_SIZE * sizeof(histogrambuffer[0])); *_aidl_return = HistogramErrorCode::DRM_PLAYING; // panel is playing DRM content |