Merge "hwcomposer2: add seamlessPossible callback"
diff --git a/include/hardware/hwcomposer2.h b/include/hardware/hwcomposer2.h
index f9e5e1f..ba17ec5 100644
--- a/include/hardware/hwcomposer2.h
+++ b/include/hardware/hwcomposer2.h
@@ -80,6 +80,7 @@
HWC2_CALLBACK_VSYNC = 3,
HWC2_CALLBACK_VSYNC_2_4 = 4,
HWC2_CALLBACK_VSYNC_PERIOD_TIMING_CHANGED = 5,
+ HWC2_CALLBACK_SEAMLESS_POSSIBLE = 6,
} hwc2_callback_descriptor_t;
/* Optional capabilities which may be supported by some devices. The particular
@@ -492,6 +493,7 @@
case HWC2_CALLBACK_VSYNC: return "Vsync";
case HWC2_CALLBACK_VSYNC_2_4: return "Vsync2.4";
case HWC2_CALLBACK_VSYNC_PERIOD_TIMING_CHANGED: return "VsyncPeriodTimingChanged";
+ case HWC2_CALLBACK_SEAMLESS_POSSIBLE: return "SeamlessPossible";
default: return "Unknown";
}
}
@@ -802,6 +804,7 @@
Vsync = HWC2_CALLBACK_VSYNC,
Vsync_2_4 = HWC2_CALLBACK_VSYNC_2_4,
VsyncPeriodTimingChanged = HWC2_CALLBACK_VSYNC_PERIOD_TIMING_CHANGED,
+ SeamlessPossible = HWC2_CALLBACK_SEAMLESS_POSSIBLE,
};
TO_STRING(hwc2_callback_descriptor_t, Callback, getCallbackDescriptorName)
@@ -1176,6 +1179,22 @@
typedef void (*HWC2_PFN_VSYNC_PERIOD_TIMING_CHANGED)(hwc2_callback_data_t callbackData,
hwc2_display_t display, hwc_vsync_period_change_timeline_t* updated_timeline);
+/* SeamlessPossible(..., display)
+ * Descriptor: HWC2_CALLBACK_SEAMLESS_POSSIBLE
+ * Optional for HWC2 devices for composer 2.4
+ *
+ * Notifies the client that the conditions which previously led to returning SEAMLESS_NOT_POSSIBLE
+ * from setActiveConfigWithConstraints have changed and now seamless may be possible. Client should
+ * retry calling setActiveConfigWithConstraints.
+ *
+ *
+ * Parameters:
+ * display - a display setActiveConfigWithConstraints previously failed with
+ * SEAMLESS_NOT_POSSIBLE.
+ */
+typedef void (*HWC2_PFN_SEAMLESS_POSSIBLE)(hwc2_callback_data_t callbackData,
+ hwc2_display_t display);
+
/*
* Device Functions
*
@@ -2935,6 +2954,11 @@
* seamlessRequired - if true, requires that the vsync period
* change must happen seamlessly without
* a noticeable visual artifact.
+ * When the conditions change and it may be
+ * possible to change the vsync period
+ * seamlessly, HWC2_CALLBACK_SEAMLESS_POSSIBLE
+ * callback must be called to indicate that
+ * caller should retry.
* outTimeline - the timeline for the vsync period change.
*
* Returns HWC2_ERROR_NONE or one of the following errors: