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

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

Merge "SF: Move management of HWC layers to compositionengine::OutputLayer"

parents c1072d30 07e33212
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -69,13 +69,6 @@ BufferLayer::BufferLayer(const LayerCreationArgs& args)

BufferLayer::~BufferLayer() {
    mFlinger->deleteTextureAsync(mTextureName);

    if (destroyAllHwcLayersPlusChildren()) {
        ALOGE("Found stale hardware composer layers when destroying "
              "surface flinger layer %s",
              mName.string());
    }

    mFlinger->mTimeStats->onDestroy(getSequence());
}

+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,10 @@ namespace android::compositionengine {
 * Used by LayerFE::getCompositionState
 */
struct LayerFECompositionState {
    // TODO(lpique): b/121291683 Remove this one we are sure we don't need the
    // value recomputed / set every frame.
    Region geomVisibleRegion;

    /*
     * Presentation
     */
+5 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#pragma once

#include <cstdint>
#include <optional>
#include <string>

#include <math/mat4.h>
@@ -25,6 +26,8 @@
#include <ui/Transform.h>
#include <utils/StrongPointer.h>

#include "DisplayHardware/DisplayIdentification.h"

namespace android::compositionengine {

class DisplayColorProfile;
@@ -117,7 +120,8 @@ public:
    // Gets the OutputLayer corresponding to the input Layer instance from the
    // current ordered set of output layers. If there is no such layer, a new
    // one is created and returned.
    virtual std::unique_ptr<OutputLayer> getOrCreateOutputLayer(std::shared_ptr<Layer>,
    virtual std::unique_ptr<OutputLayer> getOrCreateOutputLayer(std::optional<DisplayId>,
                                                                std::shared_ptr<Layer>,
                                                                sp<LayerFE>) = 0;

    // Sets the new ordered set of output layers for this output
+4 −0
Original line number Diff line number Diff line
@@ -16,14 +16,18 @@

#pragma once

#include <optional>
#include <string>

#include <utils/StrongPointer.h>

#include "DisplayHardware/DisplayIdentification.h"

namespace android {

namespace compositionengine {

class CompositionEngine;
class Output;
class Layer;
class LayerFE;
+2 −1
Original line number Diff line number Diff line
@@ -67,7 +67,8 @@ public:
    compositionengine::OutputLayer* getOutputLayerForLayer(
            compositionengine::Layer*) const override;
    std::unique_ptr<compositionengine::OutputLayer> getOrCreateOutputLayer(
            std::shared_ptr<compositionengine::Layer>, sp<LayerFE>) override;
            std::optional<DisplayId>, std::shared_ptr<compositionengine::Layer>,
            sp<LayerFE>) override;
    void setOutputLayersOrderedByZ(OutputLayers&&) override;
    const OutputLayers& getOutputLayersOrderedByZ() const override;

Loading