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

Commit 947d2a48 authored by Brian Johnson's avatar Brian Johnson
Browse files

Plumb through Output::getSkipColorTransform() into CachedSet, to match

the behavior in Output::composeSurfaces().

Bug: 240293363
Test: atest libcompositionengine_test. Fixed tests, added CachedSetTest::renderWhitePointNoColorTransform

Change-Id: Ic0317b34978c2ae8d5c057c0a39ed889b86b3da0
Merged-In: Ic0317b34978c2ae8d5c057c0a39ed889b86b3da0
parent 1cf6d7f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ public:

    // Renders the cached set with the supplied output composition state.
    void render(renderengine::RenderEngine& re, TexturePool& texturePool,
                const OutputCompositionState& outputState);
                const OutputCompositionState& outputState, bool deviceHandlesColorTransform);

    void dump(std::string& result) const;

+2 −1
Original line number Diff line number Diff line
@@ -106,7 +106,8 @@ public:

    // Renders the newest cached sets with the supplied output composition state
    void renderCachedSets(const OutputCompositionState& outputState,
                          std::optional<std::chrono::steady_clock::time_point> renderDeadline);
                          std::optional<std::chrono::steady_clock::time_point> renderDeadline,
                          bool deviceHandlesColorTransform);

    void setTexturePoolEnabled(bool enabled) { mTexturePool.setEnabled(enabled); }

+2 −1
Original line number Diff line number Diff line
@@ -65,7 +65,8 @@ public:
    // Rendering a pending cached set is optional: if the renderDeadline is not far enough in the
    // future then the planner may opt to skip rendering the cached set.
    void renderCachedSets(const OutputCompositionState& outputState,
                          std::optional<std::chrono::steady_clock::time_point> renderDeadline);
                          std::optional<std::chrono::steady_clock::time_point> renderDeadline,
                          bool deviceHandlesColorTransform);

    void setTexturePoolEnabled(bool enabled) { mFlattener.setTexturePoolEnabled(enabled); }

+2 −1
Original line number Diff line number Diff line
@@ -1494,7 +1494,8 @@ void Output::postFramebuffer() {

void Output::renderCachedSets(const CompositionRefreshArgs& refreshArgs) {
    if (mPlanner) {
        mPlanner->renderCachedSets(getState(), refreshArgs.scheduledFrameTime);
        mPlanner->renderCachedSets(getState(), refreshArgs.scheduledFrameTime,
                                   getState().usesDeviceComposition || getSkipColorTransform());
    }
}

+4 −1
Original line number Diff line number Diff line
@@ -159,7 +159,8 @@ void CachedSet::updateAge(std::chrono::steady_clock::time_point now) {
}

void CachedSet::render(renderengine::RenderEngine& renderEngine, TexturePool& texturePool,
                       const OutputCompositionState& outputState) {
                       const OutputCompositionState& outputState,
                       bool deviceHandlesColorTransform) {
    ATRACE_CALL();
    const Rect& viewport = outputState.layerStackSpace.getContent();
    const ui::Dataspace& outputDataspace = outputState.dataspace;
@@ -170,6 +171,8 @@ void CachedSet::render(renderengine::RenderEngine& renderEngine, TexturePool& te
            .physicalDisplay = outputState.framebufferSpace.getContent(),
            .clip = viewport,
            .outputDataspace = outputDataspace,
            .colorTransform = outputState.colorTransformMatrix,
            .deviceHandlesColorTransform = deviceHandlesColorTransform,
            .orientation = orientation,
            .targetLuminanceNits = outputState.displayBrightnessNits,
    };
Loading