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

Commit 614e142c authored by Chia-I Wu's avatar Chia-I Wu
Browse files

surfaceflinger: initialize DisplayDevice data members

Initialize mActiveRenderIntent and mCompositionDataSpace.

Bug: 80170891
Test: libsurfaceflinger_unittest
Change-Id: I7af510679f94332509b39a7ee54f68ff767c3da7
(cherry picked from commit 437efc23)
parent 45c41a89
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -100,7 +100,6 @@ DisplayDevice::DisplayDevice(
      mFrame(Rect::INVALID_RECT),
      mFrame(Rect::INVALID_RECT),
      mPowerMode(initialPowerMode),
      mPowerMode(initialPowerMode),
      mActiveConfig(0),
      mActiveConfig(0),
      mActiveColorMode(ColorMode::NATIVE),
      mColorTransform(HAL_COLOR_TRANSFORM_IDENTITY),
      mColorTransform(HAL_COLOR_TRANSFORM_IDENTITY),
      mHasWideColorGamut(hasWideColorGamut),
      mHasWideColorGamut(hasWideColorGamut),
      mHasHdr10(false),
      mHasHdr10(false),
+3 −3
Original line number Original line Diff line number Diff line
@@ -274,10 +274,10 @@ private:
    // Current active config
    // Current active config
    int mActiveConfig;
    int mActiveConfig;
    // current active color mode
    // current active color mode
    ui::ColorMode mActiveColorMode;
    ui::ColorMode mActiveColorMode = ui::ColorMode::NATIVE;
    // Current active render intent.
    // Current active render intent.
    ui::RenderIntent mActiveRenderIntent;
    ui::RenderIntent mActiveRenderIntent = ui::RenderIntent::COLORIMETRIC;
    ui::Dataspace mCompositionDataSpace;
    ui::Dataspace mCompositionDataSpace = ui::Dataspace::UNKNOWN;
    // Current color transform
    // Current color transform
    android_color_transform_t mColorTransform;
    android_color_transform_t mColorTransform;


+1 −4
Original line number Original line Diff line number Diff line
@@ -507,10 +507,7 @@ struct WideColorNotSupportedVariant {
    static void setupComposerCallExpectations(DisplayTransactionTest* test) {
    static void setupComposerCallExpectations(DisplayTransactionTest* test) {
        EXPECT_CALL(*test->mComposer, getColorModes(Display::HWC_DISPLAY_ID, _))
        EXPECT_CALL(*test->mComposer, getColorModes(Display::HWC_DISPLAY_ID, _))
                .WillOnce(DoAll(SetArgPointee<1>(std::vector<ColorMode>()), Return(Error::NONE)));
                .WillOnce(DoAll(SetArgPointee<1>(std::vector<ColorMode>()), Return(Error::NONE)));
        EXPECT_CALL(*test->mComposer,
        EXPECT_CALL(*test->mComposer, setColorMode(_, _, _)).Times(0);
                    setColorMode(Display::HWC_DISPLAY_ID, ColorMode::NATIVE,
                                 RenderIntent::COLORIMETRIC))
                .WillOnce(Return(Error::NONE));
    }
    }
};
};