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

Commit 2c2c7b39 authored by Matt Buckley's avatar Matt Buckley Committed by Automerger Merge Worker
Browse files

Merge "Send load up hint for cache rendering" into udc-d1-dev am: 29e77e6b am: ca145342

parents c42bc2bd ca145342
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -37,6 +37,15 @@ struct BorderRenderInfo {
    half4 color;
    std::vector<int32_t> layerIds;
};

// Interface of composition engine power hint callback.
struct ICEPowerCallback {
    virtual void notifyCpuLoadUp() = 0;

protected:
    ~ICEPowerCallback() = default;
};

/**
 * A parameter object for refreshing a set of outputs
 */
@@ -96,6 +105,8 @@ struct CompositionRefreshArgs {
    std::vector<BorderRenderInfo> borderInfoList;

    bool hasTrustedPresentationListener = false;

    ICEPowerCallback* powerCallback = nullptr;
};

} // namespace android::compositionengine
+3 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
// TODO(b/129481165): remove the #pragma below and fix conversion issues
#pragma clang diagnostic pop // ignored "-Wconversion -Wextra"

#include <compositionengine/CompositionRefreshArgs.h>
#include <compositionengine/ProjectionSpace.h>
#include <renderengine/BorderRenderInfo.h>
#include <ui/LayerStack.h>
@@ -167,6 +168,8 @@ struct OutputCompositionState {
    uint64_t lastOutputLayerHash = 0;
    uint64_t outputLayerHash = 0;

    ICEPowerCallback* powerCallback = nullptr;

    // Debugging
    void dump(std::string& result) const;
};
+1 −0
Original line number Diff line number Diff line
@@ -843,6 +843,7 @@ void Output::writeCompositionState(const compositionengine::CompositionRefreshAr

    editState().earliestPresentTime = refreshArgs.earliestPresentTime;
    editState().expectedPresentTime = refreshArgs.expectedPresentTime;
    editState().powerCallback = refreshArgs.powerCallback;

    compositionengine::OutputLayer* peekThroughLayer = nullptr;
    sp<GraphicBuffer> previousOverride = nullptr;
+3 −0
Original line number Diff line number Diff line
@@ -162,6 +162,9 @@ void CachedSet::render(renderengine::RenderEngine& renderEngine, TexturePool& te
                       const OutputCompositionState& outputState,
                       bool deviceHandlesColorTransform) {
    ATRACE_CALL();
    if (outputState.powerCallback) {
        outputState.powerCallback->notifyCpuLoadUp();
    }
    const Rect& viewport = outputState.layerStackSpace.getContent();
    const ui::Dataspace& outputDataspace = outputState.dataspace;
    const ui::Transform::RotationFlags orientation =
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ public:
    MOCK_METHOD(void, setExpensiveRenderingExpected, (DisplayId displayId, bool expected),
                (override));
    MOCK_METHOD(bool, isUsingExpensiveRendering, (), (override));
    MOCK_METHOD(void, notifyCpuLoadUp, (), (override));
    MOCK_METHOD(void, notifyDisplayUpdateImminentAndCpuReset, (), (override));
    MOCK_METHOD(bool, usePowerHintSession, (), (override));
    MOCK_METHOD(bool, supportsPowerHintSession, (), (override));
Loading