It is invalid to add a DrmCompositionDisplayLayersMap for the virtual
display because the corresponding physical display resources (such as
crtc, connector, etc.) do not exist.
BUG=
24985282
TEST=verify that no crash occurs
Change-Id: I24a6671e7f94032a38104ae7ed3eb0da79479601
for (size_t i = 0; i < num_displays; ++i) {
hwc_display_contents_1_t *dc = sf_display_contents[i];
DrmHwcDisplayContents &display_contents = displays_contents[i];
- if (!sf_display_contents[i])
+ if (!sf_display_contents[i] || i == HWC_DISPLAY_VIRTUAL)
continue;
layers_map.emplace_back();
*value = 1000 * 1000 * 1000 / 60;
break;
case HWC_DISPLAY_TYPES_SUPPORTED:
- *value = HWC_DISPLAY_PRIMARY | HWC_DISPLAY_EXTERNAL | HWC_DISPLAY_VIRTUAL;
+ *value = HWC_DISPLAY_PRIMARY_BIT | HWC_DISPLAY_EXTERNAL_BIT |
+ HWC_DISPLAY_VIRTUAL_BIT;
break;
}
return 0;