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

Commit 8f87ac5e authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13221802 from e7069737 to 25Q2-release

Change-Id: I20f8e05dbfa0d781db8487948bd987f6a05f1b2c
parents 5c0bf35e e7069737
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ pub struct RpcServerConnection {
    ctx: *mut c_void,
}

// SAFETY: The opaque handle: `ctx` points into a dynamic allocation,
// and not tied to anything specific to the current thread.
unsafe impl Send for RpcServerConnection {}

impl Drop for RpcServerConnection {
    fn drop(&mut self) {
        // We do not need to close handle_fd since we do not own it.
+2 −5
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@
#include <ui/ColorSpace.h>

#include "include/core/SkColorSpace.h"
#include "src/core/SkColorFilterPriv.h"

using aidl::android::hardware::graphics::composer3::LutProperties;

@@ -116,7 +115,7 @@ static const SkString kShader = SkString(R"(
                linear = mix(c0, c1, linear.b);
            }
        }
        return float4(linear, rgba.a);
        return float4(fromLinearSrgb(linear), rgba.a);
    })");

// same as shader::toColorSpace function
@@ -289,9 +288,7 @@ sk_sp<SkShader> LutShader::lutShader(sk_sp<SkShader>& input,
                                      lutProperties[i].samplingKey, srcDataspace);
        }

        auto colorXformLutToDst =
                SkColorFilterPriv::MakeColorSpaceXform(lutMathColorSpace, outColorSpace);
        input = input->makeWithColorFilter(colorXformLutToDst);
        input = input->makeWithWorkingColorSpace(outColorSpace);
    }
    return input;
}
+5 −0
Original line number Diff line number Diff line
@@ -62,10 +62,15 @@ struct CompositionEngineTest : public testing::Test {
    void SetUp() override {
        EXPECT_CALL(*mOutput1, getDisplayId)
                .WillRepeatedly(Return(std::make_optional<DisplayId>(kDisplayId1)));
        EXPECT_CALL(*mOutput1, getDisplayIdVariant).WillRepeatedly(Return(kDisplayId1));

        EXPECT_CALL(*mOutput2, getDisplayId)
                .WillRepeatedly(Return(std::make_optional<DisplayId>(kDisplayId2)));
        EXPECT_CALL(*mOutput2, getDisplayIdVariant).WillRepeatedly(Return(kDisplayId2));

        EXPECT_CALL(*mOutput3, getDisplayId)
                .WillRepeatedly(Return(std::make_optional<DisplayId>(kDisplayId3)));
        EXPECT_CALL(*mOutput3, getDisplayIdVariant).WillRepeatedly(Return(kDisplayId3));

        // Most tests will depend on the outputs being enabled.
        for (auto& state : mOutputStates) {
+0 −11
Original line number Diff line number Diff line
@@ -50,17 +50,6 @@ namespace android {

namespace hal = hardware::graphics::composer::hal;

namespace gui {
inline std::string_view to_string(ISurfaceComposer::OptimizationPolicy optimizationPolicy) {
    switch (optimizationPolicy) {
        case ISurfaceComposer::OptimizationPolicy::optimizeForPower:
            return "optimizeForPower";
        case ISurfaceComposer::OptimizationPolicy::optimizeForPerformance:
            return "optimizeForPerformance";
    }
}
} // namespace gui

DisplayDeviceCreationArgs::DisplayDeviceCreationArgs(
        const sp<SurfaceFlinger>& flinger, HWComposer& hwComposer, const wp<IBinder>& displayToken,
        std::shared_ptr<compositionengine::Display> compositionDisplay)
+11 −0
Original line number Diff line number Diff line
@@ -67,6 +67,17 @@ namespace display {
class DisplaySnapshot;
} // namespace display

namespace gui {
inline const char* to_string(ISurfaceComposer::OptimizationPolicy optimizationPolicy) {
    switch (optimizationPolicy) {
        case ISurfaceComposer::OptimizationPolicy::optimizeForPower:
            return "optimizeForPower";
        case ISurfaceComposer::OptimizationPolicy::optimizeForPerformance:
            return "optimizeForPerformance";
    }
}
} // namespace gui

class DisplayDevice : public RefBase {
public:
    constexpr static float sDefaultMinLumiance = 0.0;
Loading