drm_hwcomposer: Deprecate usage of HWC2 setActiveConfig*
Setting a config is currently implemented by queuing a config change to
take effect at the next vsync. Add HwcDisplay::QueueConfig to support
this functionality, which is implemented using the HWC2
setActiveConfigWithConstraints and setActiveConfigInternal as a
reference.
Implement HWC3 setActiveConfig and setActiveConfigWithConstraints in
terms of HwcDisplay::QueueConfig.
Change-Id: I127f569fe889e7370de1987137345b5b75ff04b6
Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/compositor/DisplayInfo.h b/compositor/DisplayInfo.h
index bbcbff8..6ddc66f 100644
--- a/compositor/DisplayInfo.h
+++ b/compositor/DisplayInfo.h
@@ -46,3 +46,12 @@
kModePanelOrientationLeftUp,
kModePanelOrientationRightUp
};
+
+struct QueuedConfigTiming {
+ // In order for the new config to be applied, the client must send a new frame
+ // at this time.
+ int64_t refresh_time_ns;
+
+ // The time when the display will start to refresh at the new vsync period.
+ int64_t new_vsync_time_ns;
+};