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

Commit 0710cc13 authored by Ramakant Singh's avatar Ramakant Singh Committed by Linux Build Service Account
Browse files

sf: Use property to set default app buffer count

For memory optimization (based on RAM size and
screen resolution) making default app buffers count as configurable.

Change-Id: I584c33e956d56ba21af10ad1f7ad465ce506ee96
parent b4ff4390
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -161,6 +161,14 @@ void Layer::onFirstRef() {
    mSurfaceFlingerConsumer->setDefaultMaxBufferCount(2);
#else
    mSurfaceFlingerConsumer->setDefaultMaxBufferCount(3);

#ifdef QCOM_BSP
    char property[PROPERTY_VALUE_MAX];
    if (property_get("ro.sf.default_app_buffer", property, NULL) > 0) {
        mSurfaceFlingerConsumer->setDefaultMaxBufferCount(atoi(property));
    }
#endif

#endif

    const sp<const DisplayDevice> hw(mFlinger->getDefaultDisplayDevice());