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

Commit 0da5ba5a authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am 6f1ee600: am 35e4a497: Merge "fix [3369743] SurfaceFlinger reads hardware...

am 6f1ee600: am 35e4a497: Merge "fix [3369743] SurfaceFlinger reads hardware composer hints before calling hwc.prepare()" into honeycomb

* commit '6f1ee60033ba49365777776b05ef18d6d2e9cc50':
  fix [3369743] SurfaceFlinger reads hardware composer hints before calling hwc.prepare()
parents 3205864e 0390c7ce
Loading
Loading
Loading
Loading
+26 −20
Original line number Diff line number Diff line
@@ -868,15 +868,19 @@ void SurfaceFlinger::composeSurfaces(const Region& dirty)
        for (size_t i=0 ; i<count ; i++) {
            const sp<LayerBase>& layer(layers[i]);
            layer->setPerFrameData(&cur[i]);
        }
        err = hwc.prepare();
        LOGE_IF(err, "HWComposer::prepare failed (%s)", strerror(-err));

        if (err == NO_ERROR) {
            for (size_t i=0 ; i<count ; i++) {
                if (cur[i].hints & HWC_HINT_CLEAR_FB) {
                    const sp<LayerBase>& layer(layers[i]);
                    if (!(layer->needsBlending())) {
                        transparent.orSelf(layer->visibleRegionScreen);
                    }
                }
            }
        err = hwc.prepare();
        LOGE_IF(err, "HWComposer::prepare failed (%s)", strerror(-err));
    }

            /*
             *  clear the area of the FB that need to be transparent
@@ -894,6 +898,8 @@ void SurfaceFlinger::composeSurfaces(const Region& dirty)
                    glClear(GL_COLOR_BUFFER_BIT);
                }
            }
        }
    }


    /*