uint32_t* outNumRequests,
android::sp<android::Fence>* outPresentFence, uint32_t* state);
+ // Most methods in this class write a command to a command buffer. The
+ // command buffer is implicitly submitted in validate, present, and
+ // presentOrValidate. This method provides a way to discard the commands,
+ // which can be used to discard stale commands.
+ void discardCommands();
+
// Other Display methods
Device& getDevice() const { return mDevice; }
auto& hwcDisplay = displayData.hwcDisplay;
if (displayData.validateWasSkipped) {
+ hwcDisplay->discardCommands();
auto error = displayData.presentError;
if (error != HWC2::Error::None) {
ALOGE("skipValidate: failed for display %d: %s (%d)",