Output::presentFrameAndReleaseLayers: flush pending commands for OFF displays
Most work from this method can be skipped if the display is not enabled.
However, uncaching buffers should still occur. If the display is
disabled and there are buffers to uncache, still flush pending commands.
They should only contain commands that are meaningful for a disabled
display, like bufferSlotsToClear.
Bug: 330806421
Test: libcompositionengine_test
Flag: flush_buffer_slots_to_uncache
Change-Id: I7baa3e76af86329fb266395e63e92a0ba38967f4
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h
index bc32cda..9368b7b 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.h
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.h
@@ -160,6 +160,8 @@
HalDisplayId,
std::optional<std::chrono::steady_clock::time_point> earliestPresentTime) = 0;
+ virtual status_t executeCommands(HalDisplayId) = 0;
+
// set power mode
virtual status_t setPowerMode(PhysicalDisplayId, hal::PowerMode) = 0;
@@ -361,6 +363,8 @@
HalDisplayId,
std::optional<std::chrono::steady_clock::time_point> earliestPresentTime) override;
+ status_t executeCommands(HalDisplayId) override;
+
// set power mode
status_t setPowerMode(PhysicalDisplayId, hal::PowerMode mode) override;