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

Commit 3f24589e authored by Mathias Agopian's avatar Mathias Agopian Committed by Android (Google) Code Review
Browse files

Merge "workaround to set the WM refresh rate to 48 Hz for tuna devices only" into ics-mr1

parents 88061d6b 222357f3
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -226,11 +226,6 @@ public class WindowManagerService extends IWindowManager.Stub
     */
    static final int DEFAULT_FADE_IN_OUT_DURATION = 400;

    /**
     * Frame rate. TODO: Replace with Display.getRefreshRate() when that is reliable.
     */
    static final int FRAME_RATE = 48;

    /**
     * If true, the window manager will do its own custom freezing and general
     * management of the screen during rotation.
@@ -8687,7 +8682,8 @@ public class WindowManagerService extends IWindowManager.Stub
        if (needRelayout) {
            requestAnimationLocked(0);
        } else if (animating) {
            requestAnimationLocked(currentTime+(1000/FRAME_RATE)-SystemClock.uptimeMillis());
            final int refreshTimeUs = (int)(1000 / mDisplay.getRefreshRate());
            requestAnimationLocked(currentTime + refreshTimeUs - SystemClock.uptimeMillis());
        }

        // Finally update all input windows now that the window changes have stabilized.
+4 −0
Original line number Diff line number Diff line
@@ -30,6 +30,10 @@ ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
	LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY -DNEVER_DEFAULT_TO_ASYNC_MODE
endif

ifneq (,$(findstring $(TARGET_DEVICE),tuna toro maguro))
	LOCAL_CFLAGS += -DREFRESH_RATE=48
endif


LOCAL_SHARED_LIBRARIES := \
	libcutils \
+11 −0
Original line number Diff line number Diff line
@@ -141,6 +141,17 @@ void DisplayHardware::init(uint32_t dpy)
    mDpiY = mNativeWindow->ydpi;
    mRefreshRate = fbDev->fps;


/* FIXME: this is a temporary HACK until we are able to report the refresh rate
 * properly from the HAL. The WindowManagerService now relies on this value.
 */
#ifndef REFRESH_RATE
    mRefreshRate = fbDev->fps;
#else
    mRefreshRate = REFRESH_RATE;
#warning "refresh rate set via makefile to REFRESH_RATE"
#endif

    EGLint w, h, dummy;
    EGLint numConfigs=0;
    EGLSurface surface;