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

Commit 59fda04b authored by Chia-I Wu's avatar Chia-I Wu Committed by Android (Google) Code Review
Browse files

Merge changes from topic "boot-splash" into pi-dev

* changes:
  surfaceflinger: default to DisplayColorSetting::ENHANCED
  surfaceflinger: signalRefresh after boot animation starts
parents 8cbb4015 197dc1fd
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -223,6 +223,7 @@ SurfaceFlinger::SurfaceFlinger(SurfaceFlinger::SkipInitializationTag)
        mVisibleRegionsDirty(false),
        mGeometryInvalid(false),
        mAnimCompositionPending(false),
        mBootStage(BootStage::BOOTLOADER),
        mDebugRegion(0),
        mDebugDDMS(0),
        mDebugDisableHWC(0),
@@ -231,7 +232,6 @@ SurfaceFlinger::SurfaceFlinger(SurfaceFlinger::SkipInitializationTag)
        mLastSwapBufferTime(0),
        mDebugInTransaction(0),
        mLastTransactionTime(0),
        mBootFinished(false),
        mForceFullDamage(false),
        mPrimaryDispSync("PrimaryDispSync"),
        mPrimaryHWVsyncEnabled(false),
@@ -498,6 +498,7 @@ void SurfaceFlinger::bootFinished()

    sp<LambdaMessage> readProperties = new LambdaMessage([&]() {
        readPersistentProperties();
        mBootStage = BootStage::FINISHED;
    });
    postMessageAsync(readProperties);
}
@@ -1527,7 +1528,7 @@ void SurfaceFlinger::onMessageReceived(int32_t what) {
            bool refreshNeeded = handleMessageTransaction();
            refreshNeeded |= handleMessageInvalidate();
            refreshNeeded |= mRepaintEverything;
            if (refreshNeeded) {
            if (refreshNeeded && CC_LIKELY(mBootStage != BootStage::BOOTLOADER)) {
                // Signal a refresh if a transaction modified the window state,
                // a new buffer was latched, or if HWC has requested a full
                // repaint
@@ -2886,6 +2887,12 @@ bool SurfaceFlinger::handlePageFlip()
        signalLayerUpdate();
    }

    // enter boot animation on first buffer latch
    if (CC_UNLIKELY(mBootStage == BootStage::BOOTLOADER && newDataLatched)) {
        ALOGI("Enter boot animation");
        mBootStage = BootStage::BOOTANIMATION;
    }

    // Only continue with the refresh if there is actually new work to do
    return !mLayersWithQueuedFrames.empty() && newDataLatched;
}
+8 −2
Original line number Diff line number Diff line
@@ -808,6 +808,13 @@ private:
    sp<Fence> mPreviousPresentFence = Fence::NO_FENCE;
    bool mHadClientComposition = false;

    enum class BootStage {
        BOOTLOADER,
        BOOTANIMATION,
        FINISHED,
    };
    BootStage mBootStage;

    struct HotplugEvent {
        hwc2_display_t display;
        HWC2::Connection connection = HWC2::Connection::Invalid;
@@ -828,7 +835,6 @@ private:
    nsecs_t mLastSwapBufferTime;
    volatile nsecs_t mDebugInTransaction;
    nsecs_t mLastTransactionTime;
    bool mBootFinished;
    bool mForceFullDamage;
    bool mPropagateBackpressure = true;
    std::unique_ptr<SurfaceInterceptor> mInterceptor =
@@ -878,7 +884,7 @@ private:
    static bool useVrFlinger;
    std::thread::id mMainThreadId;

    DisplayColorSetting mDisplayColorSetting = DisplayColorSetting::MANAGED;
    DisplayColorSetting mDisplayColorSetting = DisplayColorSetting::ENHANCED;
    // Applied on Display P3 layers when the render intent is non-colorimetric.
    mat4 mEnhancedSaturationMatrix;