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

Commit 481e26b2 authored by Neti Ravi Kumar's avatar Neti Ravi Kumar Committed by Giulio Cervera
Browse files

Remove 'Bypass Texture Creation' hack in frameworks

Graphics driver (ADRENO) was updated to convert the texture on
first use. Hence this change is no longer required.

CRs-fixed: 338153
parent bc4d35fe
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -145,12 +145,7 @@ public:
    status_t updateTexImage();
#else
    //
    // In certain cases, we might not want to bind the texture because it
    // is not going to be used later (surface flinger not using
    // GPU for composition). During these times "avoidBindTexture" can be
    // set to true. This will avoid binding textures for formats that are
    // not directly supported in hardware.
    status_t updateTexImage(bool avoidBindTexture = false, bool isComposition  = false);
    status_t updateTexImage(bool isComposition  = false);
#endif

    // setBufferCountServer set the buffer count. If the client has requested
+2 −4
Original line number Diff line number Diff line
@@ -843,7 +843,7 @@ status_t SurfaceTexture::setScalingMode(int mode) {
}

#ifdef QCOM_HARDWARE
status_t SurfaceTexture::updateTexImage(bool avoidBindTexture, bool isComposition) {
status_t SurfaceTexture::updateTexImage(bool isComposition) {
#else
status_t SurfaceTexture::updateTexImage() {
#endif
@@ -865,9 +865,7 @@ status_t SurfaceTexture::updateTexImage() {
        EGLImageKHR image = mSlots[buf].mEglImage;
        EGLDisplay dpy = eglGetCurrentDisplay();
#ifdef QCOM_HARDWARE
        if (isGPUSupportedFormat(mSlots[buf].mGraphicBuffer->format) &&
            ((avoidBindTexture == false) ||
            (isGPUSupportedFormatInHW(mSlots[buf].mGraphicBuffer->format)))) {
        if (isGPUSupportedFormat(mSlots[buf].mGraphicBuffer->format)) {
#endif
        if (image == EGL_NO_IMAGE_KHR) {
            if (mSlots[buf].mGraphicBuffer == 0) {
+1 −6
Original line number Diff line number Diff line
@@ -494,18 +494,13 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
        }

#ifdef QCOM_HARDWARE
        const DisplayHardware& hw(graphicPlane(0).displayHardware());
        
        bool avoidTex = (hw.getFlags() & DisplayHardware::MDP_COMPOSITION) ?
                          true : false;

        // While calling updateTexImage() from SurfaceFlinger, let it know
        // by passing an extra parameter
        // This will be true always.

        bool isComposition = true;

        if (mSurfaceTexture->updateTexImage(avoidTex, isComposition) < NO_ERROR) {
        if (mSurfaceTexture->updateTexImage(isComposition) < NO_ERROR) {
#else
        if (mSurfaceTexture->updateTexImage() < NO_ERROR) {
#endif