surfaceflinger: discard stale commands

When we skip validate, we may have stale commands on the command
buffer.  They should be discarded.

Bug: 62906801
Test: manual
Change-Id: Ie7921ba75ab2252b834cda6924e1fcfdf236f759
diff --git a/services/surfaceflinger/DisplayHardware/HWC2.cpp b/services/surfaceflinger/DisplayHardware/HWC2.cpp
index 95689d9..c48a28f 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWC2.cpp
@@ -717,6 +717,12 @@
     }
     return error;
 }
+
+void Display::discardCommands()
+{
+    mDevice.mComposer->resetCommands();
+}
+
 // For use by Device
 
 int32_t Display::getAttribute(hwc2_config_t configId, Attribute attribute)