summaryrefslogtreecommitdiff
path: root/libs/gui/DisplayEventDispatcher.cpp
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2020-04-27 22:38:19 -0700
committer Alec Mouri <alecmouri@google.com> 2020-05-07 19:17:54 -0700
commit271de040ffc1371251a9741d2f347642a5de0995 (patch)
treeaa3be0c5314fe17229feea1954927602bee3276e /libs/gui/DisplayEventDispatcher.cpp
parent5a1f5498456814a8f4ed364d495792b27ca85104 (diff)
Receive refresh rate callbacks from DMS
AChoreographer will use DMS as the source of truth for these callbacks instead of SurfaceFlinger. Bug: 154874011 Test: ChoreographerNativeTest Tes: Manually verify that HWUI is processing refresh rate callbacks Change-Id: I961a7d1ab335800d3e260ba7564ddca9c0595cfc
Diffstat (limited to 'libs/gui/DisplayEventDispatcher.cpp')
-rw-r--r--libs/gui/DisplayEventDispatcher.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/libs/gui/DisplayEventDispatcher.cpp b/libs/gui/DisplayEventDispatcher.cpp
index 15f966d062..b33bc9e556 100644
--- a/libs/gui/DisplayEventDispatcher.cpp
+++ b/libs/gui/DisplayEventDispatcher.cpp
@@ -36,10 +36,7 @@ static const size_t EVENT_BUFFER_SIZE = 100;
DisplayEventDispatcher::DisplayEventDispatcher(const sp<Looper>& looper,
ISurfaceComposer::VsyncSource vsyncSource,
ISurfaceComposer::ConfigChanged configChanged)
- : mLooper(looper),
- mReceiver(vsyncSource, configChanged),
- mWaitingForVsync(false),
- mConfigChangeFlag(configChanged) {
+ : mLooper(looper), mReceiver(vsyncSource, configChanged), mWaitingForVsync(false) {
ALOGV("dispatcher %p ~ Initializing display event dispatcher.", this);
}
@@ -92,16 +89,12 @@ status_t DisplayEventDispatcher::scheduleVsync() {
return OK;
}
-void DisplayEventDispatcher::toggleConfigEvents(ISurfaceComposer::ConfigChanged configChangeFlag) {
- if (mConfigChangeFlag == configChangeFlag) {
- return;
- }
- status_t status = mReceiver.toggleConfigEvents(configChangeFlag);
+void DisplayEventDispatcher::requestLatestConfig() {
+ status_t status = mReceiver.requestLatestConfig();
if (status) {
ALOGW("Failed enable config events, status=%d", status);
return;
}
- mConfigChangeFlag = configChangeFlag;
}
int DisplayEventDispatcher::getFd() const {