diff options
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
| -rw-r--r-- | services/surfaceflinger/Layer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 30a4d79c5b..4d04072f25 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -1058,8 +1058,13 @@ void Layer::setCompositionType(int32_t hwcId, HWC2::Composition type, } HWC2::Composition Layer::getCompositionType(int32_t hwcId) const { + if (hwcId == DisplayDevice::DISPLAY_ID_INVALID) { + // If we're querying the composition type for a display that does not + // have a HWC counterpart, then it will always be Client + return HWC2::Composition::Client; + } if (mHwcLayers.count(hwcId) == 0) { - ALOGE("getCompositionType called without a valid HWC layer"); + ALOGE("getCompositionType called with an invalid HWC layer"); return HWC2::Composition::Invalid; } return mHwcLayers.at(hwcId).compositionType; |