From d6b1474f2db64718b544741c91354a693a5c5b91 Mon Sep 17 00:00:00 2001 From: Kevin Matlage Date: Wed, 11 Jan 2012 10:42:50 -0700 Subject: [PATCH] Make SurfaceFlinger respect swapinterval property A Google modification to eglCreateWindowSurface was causing SurfaceFlinger to set its swap interval value back to 1, regardless of the value set in the debug.gr.swapinterval property. This patch modifies the fb_setSwapInterval function in gralloc to check the debug.gr.swapinterval property and not change the swap interval if a value is set there. CRs-fixed: 329524 Change-Id: I80463c1209addbff227db7832dd0023e94eb06ac --- libgralloc/framebuffer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libgralloc/framebuffer.cpp b/libgralloc/framebuffer.cpp index 2011c1c..92f07a5 100644 --- a/libgralloc/framebuffer.cpp +++ b/libgralloc/framebuffer.cpp @@ -159,6 +159,12 @@ msm_copy_buffer(buffer_handle_t handle, int fd, static int fb_setSwapInterval(struct framebuffer_device_t* dev, int interval) { + char pval[PROPERTY_VALUE_MAX]; + property_get("debug.gr.swapinterval", pval, "-1"); + int property_interval = atoi(pval); + if (property_interval >= 0) + interval = property_interval; + fb_context_t* ctx = (fb_context_t*)dev; private_module_t* m = reinterpret_cast( dev->common.module);