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

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

Merge "SF: Clean up forced refresh and repaint"

parents 6553dbd9 8da6b0e1
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -47,9 +47,6 @@ struct CompositionRefreshArgs {
    // All the layers that have queued updates.
    Layers layersWithQueuedFrames;

    // If true, forces the entire display to be considered dirty and repainted
    bool repaintEverything{false};

    // Controls how the color mode is chosen for an output
    OutputColorSetting outputColorSetting{OutputColorSetting::kEnhanced};

+1 −2
Original line number Diff line number Diff line
@@ -221,8 +221,7 @@ public:
    virtual OutputCompositionState& editState() = 0;

    // Gets the dirty region in layer stack space.
    // If repaintEverything is true, this will be the full display bounds.
    virtual Region getDirtyRegion(bool repaintEverything) const = 0;
    virtual Region getDirtyRegion() const = 0;

    // Returns whether the output includes a layer, based on their respective filters.
    // See Output::setLayerFilter.
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ public:
    compositionengine::RenderSurface* getRenderSurface() const override;
    void setRenderSurface(std::unique_ptr<compositionengine::RenderSurface>) override;

    Region getDirtyRegion(bool repaintEverything) const override;
    Region getDirtyRegion() const override;

    bool includesLayer(ui::LayerFilter) const override;
    bool includesLayer(const sp<LayerFE>&) const override;
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ public:
    MOCK_CONST_METHOD0(getState, const OutputCompositionState&());
    MOCK_METHOD0(editState, OutputCompositionState&());

    MOCK_CONST_METHOD1(getDirtyRegion, Region(bool));
    MOCK_METHOD(Region, getDirtyRegion, (), (const));

    MOCK_CONST_METHOD1(getOutputLayerForLayer,
                       compositionengine::OutputLayer*(const sp<compositionengine::LayerFE>&));
+1 −2
Original line number Diff line number Diff line
@@ -361,8 +361,7 @@ void Display::finishFrame(const compositionengine::CompositionRefreshArgs& refre
    // 1) It is being handled by hardware composer, which may need this to
    //    keep its virtual display state machine in sync, or
    // 2) There is work to be done (the dirty region isn't empty)
    if (GpuVirtualDisplayId::tryCast(mId) &&
        getDirtyRegion(refreshArgs.repaintEverything).isEmpty()) {
    if (GpuVirtualDisplayId::tryCast(mId) && getDirtyRegion().isEmpty()) {
        ALOGV("Skipping display composition");
        return;
    }
Loading