diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-11-28 23:31:38 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-11-28 23:31:38 +0000 |
commit | 18b28de76767dbc3469dc165bb288a120fbf36b1 (patch) | |
tree | 7eb3d2bd745c1e8c895194a4d3f20b7d2260a941 | |
parent | ff9b7ec9eef776079be91dbac2d0b1ed533ce775 (diff) | |
parent | f8dc03228fa91479da54514cda7965d5fe6276bb (diff) | |
download | drm_hwcomposer-18b28de76767dbc3469dc165bb288a120fbf36b1.tar.gz |
Snap for 4448085 from f8dc03228fa91479da54514cda7965d5fe6276bb to oc-m3-releaseandroid-8.1.0_r9android-8.1.0_r7android-8.1.0_r22android-8.1.0_r21android-8.1.0_r18android-8.1.0_r17android-8.1.0_r14android-8.1.0_r13oreo-m5-releaseoreo-m3-release
Change-Id: I71d79fc467f4913b0188dffc806c01c75aae13a4
-rw-r--r-- | drmdisplaycomposition.cpp | 3 | ||||
-rw-r--r-- | drmdisplaycompositor.cpp | 16 |
2 files changed, 13 insertions, 6 deletions
diff --git a/drmdisplaycomposition.cpp b/drmdisplaycomposition.cpp index 949f4a3..b7f8d1a 100644 --- a/drmdisplaycomposition.cpp +++ b/drmdisplaycomposition.cpp @@ -375,6 +375,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; diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index 3d27f13..14b87aa 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -982,10 +982,13 @@ int DrmDisplayCompositor::SquashFrame(DrmDisplayComposition *src, goto move_layers_back; } - if (comp_plane.type() == DrmCompositionPlane::Type::kDisable) { + if (comp_plane.plane()->type() == DRM_PLANE_TYPE_PRIMARY) + squashed_comp.set_plane(comp_plane.plane()); + else dst->AddPlaneDisable(comp_plane.plane()); + + if (comp_plane.type() == DrmCompositionPlane::Type::kDisable) continue; - } for (auto i : comp_plane.source_layers()) { DrmHwcLayer &layer = src_layers[i]; @@ -1004,11 +1007,12 @@ int DrmDisplayCompositor::SquashFrame(DrmDisplayComposition *src, squashed_comp.source_layers().push_back( squashed_comp.source_layers().size()); } + } - if (comp_plane.plane()->type() == DRM_PLANE_TYPE_PRIMARY) - squashed_comp.set_plane(comp_plane.plane()); - else - dst->AddPlaneDisable(comp_plane.plane()); + if (squashed_comp.plane() == NULL) { + ALOGE("Primary plane not found for squash"); + ret = -ENOTSUP; + goto move_layers_back; } ret = dst->SetLayers(dst_layers.data(), dst_layers.size(), false); |