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

Commit 1b7198fc authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't fallback to global capability when skipping client transform" into main

parents 509f6297 227bfac9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -308,7 +308,7 @@ bool Display::getSkipColorTransform() const {
                                        DisplayCapability::SKIP_CLIENT_COLOR_TRANSFORM);
                                        DisplayCapability::SKIP_CLIENT_COLOR_TRANSFORM);
    }
    }


    return hwc.hasCapability(Capability::SKIP_CLIENT_COLOR_TRANSFORM);
    return Output::getSkipColorTransform();
}
}


bool Display::allLayersRequireClientComposition() const {
bool Display::allLayersRequireClientComposition() const {
+3 −0
Original line number Original line Diff line number Diff line
@@ -1705,6 +1705,9 @@ void Output::resetCompositionStrategy() {
}
}


bool Output::getSkipColorTransform() const {
bool Output::getSkipColorTransform() const {
    // TODO: This needs to be true because the color transform is a global across all displays, but
    // use-cases like screen recording don't want the color transform. Please make color transforms
    // actually a per-display concept :(
    return true;
    return true;
}
}


+0 −2
Original line number Original line Diff line number Diff line
@@ -689,8 +689,6 @@ using DisplayGetSkipColorTransformTest = DisplayWithLayersTestCommon;
using aidl::android::hardware::graphics::composer3::DisplayCapability;
using aidl::android::hardware::graphics::composer3::DisplayCapability;


TEST_F(DisplayGetSkipColorTransformTest, checksCapabilityIfGpuDisplay) {
TEST_F(DisplayGetSkipColorTransformTest, checksCapabilityIfGpuDisplay) {
    EXPECT_CALL(mHwComposer, hasCapability(Capability::SKIP_CLIENT_COLOR_TRANSFORM))
            .WillOnce(Return(true));
    auto args = getDisplayCreationArgsForGpuVirtualDisplay();
    auto args = getDisplayCreationArgsForGpuVirtualDisplay();
    auto gpuDisplay{impl::createDisplay(mCompositionEngine, args)};
    auto gpuDisplay{impl::createDisplay(mCompositionEngine, args)};
    EXPECT_TRUE(gpuDisplay->getSkipColorTransform());
    EXPECT_TRUE(gpuDisplay->getSkipColorTransform());