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

Commit 6c2a8b0b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SF: Move layer visibility state to CompositionEngine"

parents e1e10b01 a2468669
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -161,7 +161,8 @@ std::optional<renderengine::LayerSettings> BufferLayer::prepareClientComposition
                finished = true;
                return;
            }
            under.orSelf(layer->visibleRegion);

            under.orSelf(layer->getScreenBounds());
        });
        // if not everything below us is covered, we plug the holes!
        Region holes(targetSettings.clip.subtract(under));
+0 −4
Original line number Diff line number Diff line
@@ -56,10 +56,6 @@ struct LayerFECompositionState {
    Region geomActiveTransparentRegion;
    FloatRect geomLayerBounds;

    // TODO(lpique): b/121291683 Remove this one we are sure we don't need the
    // value recomputed / set every frame.
    Region geomVisibleRegion;

    /*
     * Presentation
     */
+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@

#include <compositionengine/LayerFECompositionState.h>
#include <renderengine/Mesh.h>
#include <ui/Region.h>

namespace android {

@@ -28,7 +29,7 @@ namespace compositionengine::impl {

struct LayerCompositionState {
    /*
     * State intended to be set by LayerFE::getCompositionState
     * State set by LayerFE::getCompositionState
     */

    LayerFECompositionState frontEnd;
+11 −2
Original line number Diff line number Diff line
@@ -40,9 +40,18 @@ class HWComposer;
namespace compositionengine::impl {

struct OutputLayerCompositionState {
    // The region of this layer which is visible on this output
    // The portion of the layer that is not obscured by opaque layers on top
    Region visibleRegion;

    // The portion of the layer that is not obscured and is also opaque
    Region visibleNonTransparentRegion;

    // The portion of the layer that is obscured by opaque layers on top
    Region coveredRegion;

    // The visibleRegion transformed to output space
    Region outputSpaceVisibleRegion;

    // If true, client composition will be used on this output
    bool forceClientComposition{false};

@@ -62,7 +71,7 @@ struct OutputLayerCompositionState {
    ui::Dataspace dataspace{ui::Dataspace::UNKNOWN};

    // The Z order index of this layer on this output
    uint32_t z;
    uint32_t z{0};

    /*
     * HWC state
+1 −1
Original line number Diff line number Diff line
@@ -601,7 +601,7 @@ std::vector<renderengine::LayerSettings> Output::generateClientCompositionReques
        const auto& layerFEState = layer->getLayer().getState().frontEnd;
        auto& layerFE = layer->getLayerFE();

        const Region clip(viewportRegion.intersect(layerFEState.geomVisibleRegion));
        const Region clip(viewportRegion.intersect(layerState.visibleRegion));
        ALOGV("Layer: %s", layerFE.getDebugName());
        if (clip.isEmpty()) {
            ALOGV("  Skipping for empty clip");
Loading