Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c50c01e0 authored by Fred Fettinger's avatar Fred Fettinger Committed by Dan Stoza
Browse files

HWC2On1Adapter: populateCapabilities: fix virtual display query

To determine whether a HWComposer implementation supports virtual
displays, HWC2On1Adapter::populateCapabilities() calls
query(HWC_DISPLAY_TYPES_SUPPORTED). However, it incorrectly uses
HWC_DISPLAY_VIRTUAL instead of HWC_DISPLAY_VIRTUAL_BIT. Update the
check to use the correct bitmask.

Change-Id: I1ad95d5222a0353816ee65936cf033e5244c80cc
parent 4931fb29
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2333,7 +2333,7 @@ void HWC2On1Adapter::populateCapabilities()
        int supportedTypes = 0;
        auto result = mHwc1Device->query(mHwc1Device,
                HWC_DISPLAY_TYPES_SUPPORTED, &supportedTypes);
        if ((result == 0) && ((supportedTypes & HWC_DISPLAY_VIRTUAL) != 0)) {
        if ((result == 0) && ((supportedTypes & HWC_DISPLAY_VIRTUAL_BIT) != 0)) {
            ALOGI("Found support for HWC virtual displays");
            mHwc1SupportsVirtualDisplays = true;
        }