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

Commit 917321d2 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am a5be0cd4: Merge "don\'t call hwc with non-empty layer lists for blanked...

am a5be0cd4: Merge "don\'t call hwc with non-empty layer lists for blanked displays" into jb-mr1-dev

* commit 'a5be0cd4':
  don't call hwc with non-empty layer lists for blanked displays
parents 791dcea0 a5be0cd4
Loading
Loading
Loading
Loading
+18 −15
Original line number Diff line number Diff line
@@ -753,18 +753,19 @@ void SurfaceFlinger::rebuildLayerStacks() {
        ATRACE_CALL();
        mVisibleRegionsDirty = false;
        invalidateHwcGeometry();

        const LayerVector& currentLayers(mDrawingState.layersSortedByZ);
        for (size_t dpy=0 ; dpy<mDisplays.size() ; dpy++) {
            Region opaqueRegion;
            Region dirtyRegion;
            Vector< sp<LayerBase> > layersSortedByZ;
            const sp<DisplayDevice>& hw(mDisplays[dpy]);
            const Transform& tr(hw->getTransform());
            const Rect bounds(hw->getBounds());

            Region opaqueRegion;
            Region dirtyRegion;
            computeVisibleRegions(currentLayers,
            if (hw->canDraw()) {
                SurfaceFlinger::computeVisibleRegions(currentLayers,
                        hw->getLayerStack(), dirtyRegion, opaqueRegion);

            Vector< sp<LayerBase> > layersSortedByZ;
                const size_t count = currentLayers.size();
                for (size_t i=0 ; i<count ; i++) {
                    const sp<LayerBase>& layer(currentLayers[i]);
@@ -777,6 +778,7 @@ void SurfaceFlinger::rebuildLayerStacks() {
                        }
                    }
                }
            }
            hw->setVisibleLayersSortedByZ(layersSortedByZ);
            hw->undefinedRegion.set(bounds);
            hw->undefinedRegion.subtractSelf(tr.transform(opaqueRegion));
@@ -1776,6 +1778,7 @@ void SurfaceFlinger::onScreenReleased() {
        mEventThread->onScreenReleased();
        hw->releaseScreen();
        getHwComposer().release();
        mVisibleRegionsDirty = true;
        // from this point on, SF will stop drawing
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -351,8 +351,8 @@ private:
     * Compositing
     */
    void invalidateHwcGeometry();
    void computeVisibleRegions(const LayerVector& currentLayers,
            uint32_t layerStack,
    static void computeVisibleRegions(
            const LayerVector& currentLayers, uint32_t layerStack,
            Region& dirtyRegion, Region& opaqueRegion);

    void preComposition();