Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: ui/ozone/platform/dri/hardware_display_plane_manager.cc

Issue 812913003: ozone: fix HDPMLegacy - do the PF after overlays, also clear old overlays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698