summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Anderson <brianderson@google.com>2017-04-04 16:43:11 -0700
committerBrian Anderson <brianderson@google.com>2017-04-11 14:29:54 -0700
commit49018a55ae145ec39514cc5df46571fb7d4bd964 (patch)
treeb19500100bf43ff7d043f52cddc53054fc451dbf
parent3623fbace2d01c89411b00d930372831eb9e9957 (diff)
downloadlibhardware-49018a55ae145ec39514cc5df46571fb7d4bd964.tar.gz
Add PRESENT_FENCE_IS_NOT_RELIABLE
Test: adb shell /data/nativetest/libgui_test/libgui_test --gtest_filter=*GetFrameTimestamps* Bug: 36730849, 36887025 Change-Id: I09a543e7143542a4ed2952e7af1add17d864e3f2
-rw-r--r--include/hardware/hwcomposer2.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/hardware/hwcomposer2.h b/include/hardware/hwcomposer2.h
index 35eedb08..d5a0d6f0 100644
--- a/include/hardware/hwcomposer2.h
+++ b/include/hardware/hwcomposer2.h
@@ -94,6 +94,16 @@ typedef enum {
* the client. This will prevent the client from applying the color
* transform during its composition step. */
HWC2_CAPABILITY_SKIP_CLIENT_COLOR_TRANSFORM = 2,
+
+ /* Specifies that the present fence must not be used as an accurate
+ * representation of the actual present time of a frame.
+ * This capability must never be set by HWC2 devices.
+ * This capability may be set for HWC1 devices that use the
+ * HWC2On1Adapter where emulation of the present fence using the retire
+ * fence is not feasible.
+ * In the future, CTS tests will require present time to be reliable.
+ */
+ HWC2_CAPABILITY_PRESENT_FENCE_IS_NOT_RELIABLE = 3,
} hwc2_capability_t;
/* Possible composition types for a given layer */
@@ -335,6 +345,8 @@ static inline const char* getCapabilityName(hwc2_capability_t capability) {
case HWC2_CAPABILITY_SIDEBAND_STREAM: return "SidebandStream";
case HWC2_CAPABILITY_SKIP_CLIENT_COLOR_TRANSFORM:
return "SkipClientColorTransform";
+ case HWC2_CAPABILITY_PRESENT_FENCE_IS_NOT_RELIABLE:
+ return "PresentFenceIsNotReliable";
default: return "Unknown";
}
}
@@ -551,6 +563,7 @@ enum class Capability : int32_t {
Invalid = HWC2_CAPABILITY_INVALID,
SidebandStream = HWC2_CAPABILITY_SIDEBAND_STREAM,
SkipClientColorTransform = HWC2_CAPABILITY_SKIP_CLIENT_COLOR_TRANSFORM,
+ PresentFenceIsNotReliable = HWC2_CAPABILITY_PRESENT_FENCE_IS_NOT_RELIABLE,
};
TO_STRING(hwc2_capability_t, Capability, getCapabilityName)