OSDN Git Service

Set the WM refresh rate to 60 Hz for tuna devices only DO
authorMathias Agopian <mathias@google.com>
Sat, 5 Nov 2011 01:46:11 +0000 (18:46 -0700)
committerDave Burke <daveburke@google.com>
Thu, 10 Nov 2011 00:01:07 +0000 (16:01 -0800)
NOT MERGE

This approach is TEMPORARY until we can do this properly.

Change-Id: I81a8f852df501b2faccffdae7cac954855a6c98f

services/surfaceflinger/Android.mk
services/surfaceflinger/DisplayHardware/DisplayHardware.cpp

index 61a8358..10686c0 100644 (file)
@@ -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=60
+endif
+
 
 LOCAL_SHARED_LIBRARIES := \
        libcutils \
index f4be168..329c052 100644 (file)
@@ -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;