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

Commit f613f073 authored by Matthew Bouyack's avatar Matthew Bouyack Committed by android-build-merger
Browse files

Merge "DO NOT MERGE: Eliminate redundant changes to hardware vsync state." into cw-f-dev

am: 9e558593

Change-Id: I3b534f26c60bd8d6cf0736da7de807cf339a1cdd
parents 21e93977 9e558593
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2642,7 +2642,8 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw,
            ALOGW("Couldn't set SCHED_OTHER on display off");
        }

        if (type == DisplayDevice::DISPLAY_PRIMARY) {
        if (type == DisplayDevice::DISPLAY_PRIMARY &&
            currentMode != HWC_POWER_MODE_DOZE_SUSPEND) {
            disableHardwareVsync(true); // also cancels any in-progress resync

            // FIXME: eventthread only knows about the main display right now
@@ -2656,7 +2657,8 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw,
               mode == HWC_POWER_MODE_NORMAL) {
        // Update display while dozing
        getHwComposer().setPowerMode(type, mode);
        if (type == DisplayDevice::DISPLAY_PRIMARY) {
        if (type == DisplayDevice::DISPLAY_PRIMARY &&
            currentMode == HWC_POWER_MODE_DOZE_SUSPEND) {
            // FIXME: eventthread only knows about the main display right now
            mEventThread->onScreenAcquired();
            resyncToHardwareVsync(true);
+4 −2
Original line number Diff line number Diff line
@@ -2558,7 +2558,8 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw,
            ALOGW("Couldn't set SCHED_OTHER on display off");
        }

        if (type == DisplayDevice::DISPLAY_PRIMARY) {
        if (type == DisplayDevice::DISPLAY_PRIMARY &&
            currentMode != HWC_POWER_MODE_DOZE_SUSPEND) {
            disableHardwareVsync(true); // also cancels any in-progress resync

            // FIXME: eventthread only knows about the main display right now
@@ -2572,7 +2573,8 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& hw,
               mode == HWC_POWER_MODE_NORMAL) {
        // Update display while dozing
        getHwComposer().setPowerMode(type, mode);
        if (type == DisplayDevice::DISPLAY_PRIMARY) {
        if (type == DisplayDevice::DISPLAY_PRIMARY &&
            currentMode == HWC_POWER_MODE_DOZE_SUSPEND) {
            // FIXME: eventthread only knows about the main display right now
            mEventThread->onScreenAcquired();
            resyncToHardwareVsync(true);