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

Commit 7e9316b5 authored by Justin Philip's avatar Justin Philip Committed by Manish Kumar
Browse files

Fix for VirtualDisplay CTS issues.

Following CTS cases fails without the change
1. testEncodeVirtualDisplay
2. testMultipleVirtualDisplays
3. testSingleVirtualDisplay
4. testPrivatePresentationVirtualDisplay
5. testPrivateVirtualDisplay

Issue happens because displaySurface not being initialized
as its becoming local variable and loosing the context.

Change-Id: I54ce623f611faf7fc5d4d00b0d042f9943b57bbe
parent c3781a62
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1381,12 +1381,13 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
                            property_get("persist.sys.wfd.virtual", value, "0");
                            int wfdVirtual = atoi(value);
                            if(!wfdVirtual) {
                                sp<VirtualDisplaySurface> dispSurface =
                                sp<VirtualDisplaySurface> vds =
                                              new VirtualDisplaySurface(
                                    *mHwc, hwcDisplayId, state.surface, bq,
                                    state.displayName);
                                dispSurface = vds;
                                if (hwcDisplayId >= 0) {
                                   producer = dispSurface;
                                   producer = vds;
                                } else {
                                  // There won't be any interaction with HWC for this virtual display,
                                  // so the GLES driver can pass buffers directly to the sink.