Index: ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc |
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc |
index 6cb003078c4b6280cb799c0872fc575111266c5e..2aa2f113a5c950ea640b59bb73110923b9f7d7de 100644 |
--- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc |
+++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc |
@@ -83,9 +83,15 @@ bool HardwareDisplayPlaneManagerLegacy::Commit( |
} |
} |
} |
- plane_list->plane_list.swap(plane_list->old_plane_list); |
- plane_list->plane_list.clear(); |
- plane_list->legacy_page_flips.clear(); |
+ |
+ if (ret) { |
+ plane_list->plane_list.swap(plane_list->old_plane_list); |
+ plane_list->plane_list.clear(); |
+ plane_list->legacy_page_flips.clear(); |
+ } else { |
+ ResetCurrentPlaneList(plane_list); |
+ } |
+ |
return ret; |
} |