summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLong Ling <longling@google.com>2021-06-11 09:27:50 -0700
committerLong Ling <longling@google.com>2021-07-07 15:49:16 -0700
commit3458109c9c6925c27e2d48b6b8f1493495908938 (patch)
treefba342cc882d46a29d45c618f4402f4cea3d1c3e /include
parent78c74f33b8f8e04583a37d9fadba1974df4293fd (diff)
libhwc2.1: enable smooth display compensation
1. Update displaycolor the scene changes during presentDisplay. 2. early wakeup DPU if frame compensation is needed. Bug: 187763532 Change-Id: I70793641bed2bf17a809b676d22c02f10b596dec
Diffstat (limited to 'include')
-rw-r--r--include/displaycolor/displaycolor.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/include/displaycolor/displaycolor.h b/include/displaycolor/displaycolor.h
index e8020f3..b439e71 100644
--- a/include/displaycolor/displaycolor.h
+++ b/include/displaycolor/displaycolor.h
@@ -177,7 +177,8 @@ struct DisplayScene {
force_hdr == rhs.force_hdr &&
bm == rhs.bm &&
lhbm_on == rhs.lhbm_on &&
- (lhbm_on && dbv == rhs.dbv);
+ (lhbm_on && dbv == rhs.dbv) &&
+ refresh_rate == rhs.refresh_rate;
}
/// A vector of layer color data.
@@ -209,6 +210,9 @@ struct DisplayScene {
/// lhbm status
bool lhbm_on;
+
+ /// refresh rate
+ float refresh_rate;
};
/// An interface specifying functions that are HW-agnostic.
@@ -247,7 +251,7 @@ class IDisplayColorGeneric {
/**
* @brief Update display color data. This function is expected to be called
- * before querying display color data, if the display scene has changed.
+ * in the context of HWC::validateDisplay, if the display scene has changed.
*
* @param display The display relating to the scene.
* @param scene Display scene data to use during the update.
@@ -256,6 +260,25 @@ class IDisplayColorGeneric {
virtual int Update(DisplayType display, const DisplayScene &scene) = 0;
/**
+ * @brief Update display color data. This function is expected to be called
+ * in the context of HWC::presentDisplay, if the display scene has changed
+ * since the Update call for HWC::validateDisplay.
+ *
+ * @param display The display relating to the scene.
+ * @param scene Display scene data to use during the update.
+ * @return OK if successful, error otherwise.
+ */
+ virtual int UpdatePresent(DisplayType display, const DisplayScene &scene) = 0;
+
+ /**
+ * @brief Check if refresh rate regamma compensation is enabled.
+ *
+ * @param refresh_rate The new refresh rate will apply.
+ * @return true for yes.
+ */
+ virtual bool IsRrCompensationEnabled(DisplayType display, float refresh_rate) = 0;
+
+ /**
* @brief Get a map of supported ColorModes, and supported RenderIntents for
* each ColorMode.
* @param display The display to get the color modes and render intents.