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

Commit c09b5510 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "SurfaceFlinger: Let HWC handle an alpha blending when...

Merge "SurfaceFlinger: Let HWC handle an alpha blending                 when either C2D or DYN is set" into ics
parents 314daaaf 9fa95adb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -177,7 +177,8 @@ 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)
                if ((strncmp(property, "c2d", 3) == 0) ||
                    (strncmp(property, "dyn", 3) == 0))
                    mFlags |= C2D_COMPOSITION;
                else if ((strncmp(property, "mdp", 3)) == 0)
                    mFlags |= MDP_COMPOSITION;
+0 −0

File mode changed from 100644 to 100755.

+7 −3
Original line number Diff line number Diff line
@@ -205,10 +205,14 @@ void Layer::setGeometry(hwc_layer_t* hwcl)
    // we can't do alpha-fade with the hwc HAL. C2D composition
    // can handle fade cases
    const State& s(drawingState());
    if ((s.alpha < 0xFF) &&
        !(DisplayHardware::C2D_COMPOSITION & hw.getFlags())) {
    if (s.alpha < 0xFF) {
        if ((DisplayHardware::C2D_COMPOSITION & hw.getFlags()) && (!isOpaque())) {
            hwcl->blending = mPremultipliedAlpha ?
                HWC_BLENDING_PREMULT : HWC_BLENDING_COVERAGE;
        } else {
            hwcl->flags = HWC_SKIP_LAYER;
        }
    }

    hwcl->alpha = s.alpha;
#else