commit | 0c6ce4608fc022608537162dd919e7f729b9cb77 | [log] [tgz] |
---|---|---|
author | Chia-I Wu <olv@google.com> | Thu Jun 22 10:48:28 2017 -0700 |
committer | Chia-I Wu <olv@google.com> | Thu Jun 22 19:01:07 2017 +0000 |
tree | 69694d8a31d0f59f84ffe52f34ae00e9893caf8a | |
parent | 249c0ae80a6e5690d091294c4447cb3facafbc37 [diff] [blame] |
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)