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

Commit 620b0824 authored by Jeykumar Sankaran's avatar Jeykumar Sankaran Committed by toastcfh
Browse files

QCOM: SurfaceFlinger: Add support for c2d composition while calculating FB layer count

This change considers both gpu and c2d compositions while calculating FB layer count

Change-Id: I57fe19650030bb49f8bf1afe88fe26c6731b91da
parent 3a01442c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -34,6 +34,10 @@
#include "HWComposer.h"
#include "SurfaceFlinger.h"

#ifdef QCOM_HARDWARE
#include <qcom_ui.h>
#endif

namespace android {
// ---------------------------------------------------------------------------

@@ -119,6 +123,12 @@ status_t HWComposer::prepare() const {
                case HWC_FRAMEBUFFER:
                    numFBLayers++;
                    break;
#ifdef QCOM_HARDWARE
                default:
                    if(isUpdatingFB((HWCCompositionType)l.compositionType))
                        numFBLayers++;
                    break;
#endif
            }
        }
        mNumOVLayers = numOVLayers;