diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-06-17 01:21:09 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-06-17 01:21:09 +0000 |
commit | f3b51d7a4748fe62cb6b8c06fe35950522b3948a (patch) | |
tree | 972235c555b82d23bd826a02d64e821352248e4d /libhwc2.1/histogram_mediator.h | |
parent | 6d98f62745fa3b4296ee749df7aadf18e278966f (diff) | |
parent | f1de980659b0ad327efef954a98cfc616c805d77 (diff) |
Snap for 10338099 from f1de980659b0ad327efef954a98cfc616c805d77 to udc-release
Change-Id: I9dc7f953edaf953681b8a72f0bc21d0f9f5f4069
Diffstat (limited to 'libhwc2.1/histogram_mediator.h')
-rw-r--r-- | libhwc2.1/histogram_mediator.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libhwc2.1/histogram_mediator.h b/libhwc2.1/histogram_mediator.h index fa81e0b..54d28c9 100644 --- a/libhwc2.1/histogram_mediator.h +++ b/libhwc2.1/histogram_mediator.h @@ -73,10 +73,38 @@ public: bool mHistReq_pending = false; std::mutex mDataCollectingMutex; // for data collecting operations }; + + struct HistogramConfig { + RoiRect mRoi; + Weight mWeights; + HistogramPos mPos; + + HistogramConfig() {} + + HistogramConfig(const RoiRect &roi, const Weight &weights, const HistogramPos &pos) { + mRoi = roi; + mWeights = weights; + mPos = pos; + } + + bool operator!=(const HistogramConfig &rhs) { + return mRoi != rhs.mRoi || mWeights != rhs.mWeights || mPos != rhs.mPos; + } + + HistogramConfig &operator=(const HistogramConfig &rhs) { + mRoi = rhs.mRoi; + mWeights = rhs.mWeights; + mPos = rhs.mPos; + return *this; + } + }; + uint32_t getFrameCount(); void setSampleFrameCounter(int32_t id) { mSampledFrameCounter = id; } uint32_t getSampleFrameCounter() { return mSampledFrameCounter; } bool histRequested() { return mIDLHistogram->mHistReq_pending; } + std::mutex mConfigMutex; + HistogramConfig mConfig GUARDED_BY(mConfigMutex); private: int calculateThreshold(const RoiRect &roi); |