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

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

Merge "SF: Restructure OutputLayer creation to remove displayId argument"

parents a64ca00e df336d9f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -138,11 +138,14 @@ public:
    // this output, or nullptr if the layer does not have one
    virtual OutputLayer* getOutputLayerForLayer(Layer*) const = 0;

    // Creates an OutputLayer instance for this output
    virtual std::unique_ptr<OutputLayer> createOutputLayer(const std::shared_ptr<Layer>&,
                                                           const sp<LayerFE>&) const = 0;

    // 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::optional<DisplayId>,
                                                                std::shared_ptr<Layer>,
    virtual std::unique_ptr<OutputLayer> getOrCreateOutputLayer(std::shared_ptr<Layer>,
                                                                sp<LayerFE>) = 0;

    // Sets the new ordered set of output layers for this output
+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@ class OutputLayer {
public:
    virtual ~OutputLayer();

    // Sets the HWC2::Layer associated with this layer
    virtual void setHwcLayer(std::shared_ptr<HWC2::Layer>) = 0;

    // Gets the output which owns this output layer
    virtual const Output& getOutput() const = 0;

+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@ public:

    // compositionengine::Output overrides
    void dump(std::string&) const override;
    std::unique_ptr<compositionengine::OutputLayer> createOutputLayer(
            const std::shared_ptr<Layer>&, const sp<LayerFE>&) const override;
    void setColorTransform(const compositionengine::CompositionRefreshArgs&) override;
    void setColorProfile(const ColorProfile&) override;
    void chooseCompositionStrategy() override;
+3 −2
Original line number Diff line number Diff line
@@ -66,9 +66,10 @@ public:

    compositionengine::OutputLayer* getOutputLayerForLayer(
            compositionengine::Layer*) const override;
    std::unique_ptr<compositionengine::OutputLayer> createOutputLayer(
            const std::shared_ptr<Layer>&, const sp<LayerFE>&) const override;
    std::unique_ptr<compositionengine::OutputLayer> getOrCreateOutputLayer(
            std::optional<DisplayId>, std::shared_ptr<compositionengine::Layer>,
            sp<LayerFE>) override;
            std::shared_ptr<compositionengine::Layer>, sp<LayerFE>) override;
    void setOutputLayersOrderedByZ(OutputLayers&&) override;
    const OutputLayers& getOutputLayersOrderedByZ() const override;

+5 −5
Original line number Diff line number Diff line
@@ -34,11 +34,11 @@ namespace impl {

class OutputLayer : public compositionengine::OutputLayer {
public:
    OutputLayer(const compositionengine::Output&, std::shared_ptr<compositionengine::Layer>,
                sp<compositionengine::LayerFE>);
    OutputLayer(const compositionengine::Output&, const std::shared_ptr<compositionengine::Layer>&,
                const sp<compositionengine::LayerFE>&);
    ~OutputLayer() override;

    void initialize(const CompositionEngine&, std::optional<DisplayId>);
    void setHwcLayer(std::shared_ptr<HWC2::Layer>) override;

    const compositionengine::Output& getOutput() const override;
    compositionengine::Layer& getLayer() const override;
@@ -86,8 +86,8 @@ private:
};

std::unique_ptr<compositionengine::OutputLayer> createOutputLayer(
        const CompositionEngine&, std::optional<DisplayId>, const compositionengine::Output&,
        std::shared_ptr<compositionengine::Layer>, sp<compositionengine::LayerFE>);
        const compositionengine::Output&, const std::shared_ptr<compositionengine::Layer>&,
        const sp<compositionengine::LayerFE>&);

} // namespace impl
} // namespace android::compositionengine
Loading