Skip to contentSkip to conversation

drm_hwcomposer: reorder source layers according to zorder

PATCH Applied Adrian Salido 3 participants 3 messages Sep 21, 2017 – Sep 22, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm_hwcomposer: reorder source layers according to zorder

Precomp layers may be added to the back at different points which may cause elements to be unsorted. Make sure that these are sorted after provisioning planes to ensure right composition based on zorder.

---
 drmdisplaycomposition.cpp | 3 +++
 1 file changed, 3 insertions(+)
drmdisplaycomposition.cpp +3 -0
index 293160bfd012..0f8084b39706 100644
@@ -379,6 +379,9 @@ int DrmDisplayComposition::Plan(SquashState *squash,
     if (!i.plane())
       continue;
 
+    // make sure that source layers are ordered based on zorder
+    std::sort(i.source_layers().begin(), i.source_layers().end());
+
     std::vector<DrmPlane *> *container;
     if (i.plane()->type() == DRM_PLANE_TYPE_PRIMARY)
       container = primary_planes;
Signature · 6 lines
2.14.1.821.g8fa685d3b7-goog

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Adrian Salido

Precomp layers may be added to the back at different points which may cause elements to be unsorted. Make sure that these are sorted after provisioning planes to ensure right composition based on zorder.

Quoted 21 lines
---
 drmdisplaycomposition.cpp | 3 +++
 1 file changed, 3 insertions(+)
drmdisplaycomposition.cpp +3 -1
index 293160bfd012..0f8084b39706 100644
@@ -379,6 +379,9 @@ int DrmDisplayComposition::Plan(SquashState *squash,
     if (!i.plane())
       continue;
 
+    // make sure that source layers are ordered based on zorder
+    std::sort(i.source_layers().begin(), i.source_layers().end());
+
     std::vector<DrmPlane *> *container;
     if (i.plane()->type() == DRM_PLANE_TYPE_PRIMARY)
       container = primary_planes;
--

2.14.1.821.g8fa685d3b7-goog

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Applied
#2 lore raw
Quoted 7 lines · Zach Reizner
Quoted 5 lines · Adrian Salido

Precomp layers may be added to the back at different points which may cause elements to be unsorted. Make sure that these are sorted after provisioning planes to ensure right composition based on zorder.

Applied.

Sean

Quoted 29 lines
Quoted 21 lines
---
 drmdisplaycomposition.cpp | 3 +++
 1 file changed, 3 insertions(+)
drmdisplaycomposition.cpp +3 -1
index 293160bfd012..0f8084b39706 100644
@@ -379,6 +379,9 @@ int DrmDisplayComposition::Plan(SquashState *squash,
     if (!i.plane())
       continue;
 
+    // make sure that source layers are ordered based on zorder
+    std::sort(i.source_layers().begin(), i.source_layers().end());
+
     std::vector<DrmPlane *> *container;
     if (i.plane()->type() == DRM_PLANE_TYPE_PRIMARY)
       container = primary_planes;
--

2.14.1.821.g8fa685d3b7-goog

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel