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

Commit 0ac32310 authored by Naseer Ahmed's avatar Naseer Ahmed Committed by Giulio Cervera
Browse files

DisplayHardware: Set MDP composition flag correctly

parent 43b0306d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -177,10 +177,10 @@ void DisplayHardware::init(uint32_t dpy)
        } else {
            // We have hardware composition enabled. Check the composition type
            if (property_get("debug.composition.type", property, NULL) > 0) {
                if(((strncmp(property, "c2d", 3)) == 0) ||
                   ((strncmp(property, "mdp", 3)) == 0)) {
                        mFlags |= (((strncmp(property, "c2d", 3)) == 0)) ? C2D_COMPOSITION:0;
                }
                if((strncmp(property, "c2d", 3)) == 0)
                    mFlags |=  C2D_COMPOSITION;
                else if ((strncmp(property, "mdp", 3)) == 0)
                    mFlags |= MDP_COMPOSITION;
            }
#endif
        }
+2 −1
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ public:
        SWAP_RECTANGLE              = 0x00080000,
#ifdef QCOM_HARDWARE
        C2D_COMPOSITION             = 0x00100000,   // C2D composition
        MDP_COMPOSITION             = 0x00200000    // MDP composition
#endif
    };

+1 −1
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
#ifdef QCOM_HARDWARE
        const DisplayHardware& hw(graphicPlane(0).displayHardware());
        
        bool avoidTex = (hw.getFlags() & DisplayHardware::C2D_COMPOSITION) ?
        bool avoidTex = (hw.getFlags() & DisplayHardware::MDP_COMPOSITION) ?
                          true : false;

        if (mSurfaceTexture->updateTexImage(avoidTex) < NO_ERROR) {