Index: ui/ozone/platform/dri/hardware_display_plane_manager.cc |
diff --git a/ui/ozone/platform/dri/hardware_display_plane_manager.cc b/ui/ozone/platform/dri/hardware_display_plane_manager.cc |
index e7899cec33bf9ca1fd7d04cd453012d607bcfeb4..f465e6c1ffc7ecfd1c2d1977fb0000ba4b21e09a 100644 |
--- a/ui/ozone/platform/dri/hardware_display_plane_manager.cc |
+++ b/ui/ozone/platform/dri/hardware_display_plane_manager.cc |
@@ -23,7 +23,7 @@ const float kFixedPointScaleValue = 65536.0f; |
} // namespace |
-HardwareDisplayPlaneList::HardwareDisplayPlaneList() { |
+HardwareDisplayPlaneList::HardwareDisplayPlaneList() : committed(false) { |
} |
HardwareDisplayPlaneList::~HardwareDisplayPlaneList() { |
for (auto* plane : plane_list) { |
@@ -151,10 +151,13 @@ bool HardwareDisplayPlaneManager::AssignOverlayPlanes( |
const OverlayPlaneList& overlay_list, |
uint32_t crtc_id, |
CrtcController* crtc) { |
- for (auto* plane : plane_list->old_plane_list) { |
- plane->set_in_use(false); |
+ // If we had previously committed this set, mark all owned planes as free. |
+ if (plane_list->committed) { |
+ plane_list->committed = false; |
+ for (auto* plane : plane_list->old_plane_list) { |
+ plane->set_in_use(false); |
+ } |
} |
- plane_list->old_plane_list.clear(); |
int crtc_index = LookupCrtcIndex(crtc_id); |
if (crtc_index < 0) { |