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

Commit b32210f3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "SF: Allow display layer clip bounds to be overriden" into rvc-dev am: 7cfab4e3

Change-Id: I6e14f92891b4ccee6204857adf2a747c067f058f
parents 4617a564 7cfab4e3
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -2364,6 +2364,10 @@ void SurfaceFlinger::postComposition()
    }
    }
}
}


FloatRect SurfaceFlinger::getLayerClipBoundsForDisplay(const DisplayDevice& displayDevice) const {
    return displayDevice.getViewport().toFloatRect();
}

void SurfaceFlinger::computeLayerBounds() {
void SurfaceFlinger::computeLayerBounds() {
    for (const auto& pair : mDisplays) {
    for (const auto& pair : mDisplays) {
        const auto& displayDevice = pair.second;
        const auto& displayDevice = pair.second;
@@ -2374,7 +2378,7 @@ void SurfaceFlinger::computeLayerBounds() {
                continue;
                continue;
            }
            }


            layer->computeBounds(displayDevice->getViewport().toFloatRect(), ui::Transform(),
            layer->computeBounds(getLayerClipBoundsForDisplay(*displayDevice), ui::Transform(),
                                 0.f /* shadowRadius */);
                                 0.f /* shadowRadius */);
        }
        }
    }
    }
+7 −0
Original line number Original line Diff line number Diff line
@@ -643,6 +643,13 @@ protected:
            REQUIRES(mStateLock);
            REQUIRES(mStateLock);
    virtual void commitTransactionLocked();
    virtual void commitTransactionLocked();


    // Used internally by computeLayerBounds() to gets the clip rectangle to use for the
    // root layers on a particular display in layer-coordinate space. The
    // layers (and effectively their children) will be clipped against this
    // rectangle. The base behavior is to clip to the visible region of the
    // display.
    virtual FloatRect getLayerClipBoundsForDisplay(const DisplayDevice&) const;

private:
private:
    /* ------------------------------------------------------------------------
    /* ------------------------------------------------------------------------
     * Layer management
     * Layer management