diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-10-09 19:04:34 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-10-09 19:04:34 +0000 |
commit | a0efb9658f3c3f123e0a342ed174cb2dce6a0746 (patch) | |
tree | 7eb3d2bd745c1e8c895194a4d3f20b7d2260a941 | |
parent | c7453bf843f7d535dae3f74a059111d9f64bec7c (diff) | |
parent | f8dc03228fa91479da54514cda7965d5fe6276bb (diff) | |
download | drm_hwcomposer-a0efb9658f3c3f123e0a342ed174cb2dce6a0746.tar.gz |
Snap for 4384531 from f8dc03228fa91479da54514cda7965d5fe6276bb to oc-m2-releaseandroid-8.1.0_r8android-8.1.0_r52android-8.1.0_r50android-8.1.0_r47android-8.1.0_r46android-8.1.0_r43android-8.1.0_r41android-8.1.0_r36android-8.1.0_r35android-8.1.0_r33android-8.1.0_r30android-8.1.0_r26android-8.1.0_r25android-8.1.0_r20android-8.1.0_r2oreo-m7-releaseoreo-m6-s4-releaseoreo-m6-s3-releaseoreo-m6-s2-releaseoreo-m2-s5-releaseoreo-m2-s4-releaseoreo-m2-s3-releaseoreo-m2-s2-releaseoreo-m2-s1-releaseoreo-m2-release
Change-Id: If15f6e1c69c40a9e9a6e2ac82b57e6eeddb4c573
-rw-r--r-- | drmdisplaycompositor.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
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); |